-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ICodeMirror, more type imports, order plugin for fixer #576
Use ICodeMirror, more type imports, order plugin for fixer #576
Conversation
A heads-up: I am unlikely to finish this work in the next few days, unless everything basically works the first time... |
I guess re: size: not shipping codemirror probably saves ~150kb, so we could start tracking the wheel/sdist size, and fail builds that increase it above a certain size... I don't see any particular tools out there for doing so, but would be easy enough to add to our test suite, if we don't mind hoisting the hardcoded value to... somewhere. Maybe just expect it in an environment variable, and ignore if not set. |
Well, looks like some stuff is passing, so it's probably not entirely broken... once I can pull the built artifacts, I'll try to put together a CI check for the artifact size. |
Also the sdist artifact size appears about right: 310kb (from pypi) vs 251.5kb (just built). Unfortunately, neither |
@@ -25,8 +25,8 @@ | |||
"vscode-css-languageserver-bin": "^1.4.0", | |||
"vscode-html-languageserver-bin": "^1.4.0", | |||
"vscode-json-languageserver-bin": "^1.0.1", | |||
"yaml-language-server": "^0.12.0", | |||
"vscode-json-languageservice": "^3.9.1 <3.10.0" | |||
"vscode-json-languageservice": "^3.9.1 <3.10.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you remember why we have the pin for <3.10.0
? It looks like we could update to 3.11.0 or 4.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alas, i do not... it's one of the language servers that might not get updated very often...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try bumping it then, to make sure we don't stay behind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, it was yaml. they are up on 0.17 now, so presumably work with the newer service.
Of course, it is irrelevant to our JSON language server, because it's a hella old static dump of... some snapshot or another. Anyhow, would prefer to not move too many more rocks on this PR... very scared of finding more things.
scripts/distcheck.py
Outdated
BAD_CHUNK_PATTERNS = { | ||
( | ||
"codemirror_codemirror", | ||
"codemirror_lib", | ||
): """ | ||
Please ensure is CodeMirror is imported by type, e.g. | ||
|
||
import type * as CodeMirror from 'codemirror' | ||
|
||
see https://github.com/krassowski/jupyterlab-lsp/issues/575 | ||
""" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test of not having codemirror_codemirror
or codemirror_lib
in our dev build is the best I could come up with, seems to be working:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gah, and a typo...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welp, guess i'll fix that typo and call this done...
Yep, tried some more looking, and short of upstreaming something to the eslint plugin, don't see how we can enforce the codemirror issue. The post-dev-build test will have to be good enough for now. |
References
Code changes
import type
for most/allimport 'codemirror'
ICodeMirror.CodeMirror
for theCMSyntaxHighlighting.get_mode
codeMirror
to the baselinelab_integration
...import-plugin
plugin for eslint to see if everything's goodexport class
andexport namespace
pun: i never did much, either, but here we arecodemirror
withimport type
, haven't found yettsc
(and all the schema stuff) before linting...jlpm bootstrap
as suchdev
build, thenode_modules__codemirror__codemirror_js
shows up... but perhaps there's a way to look at a productionremoteEntry
and find magic strings...User-facing changes
Backwards-incompatible changes
Chores