Deprecation in 1.x without fix
vidartf opened this issue · comments
Description
Using the latest 1.x release, I'm encountering a depreciation warning that IDragEvent
is deprecated and will be removed in 2.x in favor of Drag.Event
. I think "oh, thanks for the warning, I will change that immediately", and change the code to use Drag.Event
, but now get told that it doesn't exist. So I'm left to wonder what the purpose of the depreciation warning was 😅
Reproduce
- Import
IDragEvent
in an editor that gives hints. It will still compile, but your IDE will give you a warning.
Expected behavior
The "in favor of" solution should exist in the 1.x branch, or the warning should be removed.
Context
- Operating System and version:
- Browser and version:
- JupyterLab version:
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here. You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.
The interface IDragEvent
also exists in Lumino 2. along with the deprecation tag.
lumino/packages/dragdrop/src/index.ts
Lines 14 to 20 in 133d872
So maybe the right answer is to remove the deprecation tag in Lumino 1, as in your alternate suggestion, and allow people to change their code once they upgrade to Lumino 2.
Yes, that's probably the best solution. I know in Python it is possible to differentiate between "this will be deprecated in the future" and "this is currently deprecated ", but I don't think jsdoc tags support that distinction?