Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add files for JupyterLite #45
Add files for JupyterLite #45
Changes from 17 commits
9746f9b
50ef4f0
fa84108
30acded
8aa0b0f
15529ad
69b59e8
6ac0067
2793fe8
4dfc4cf
705fb47
54c06b7
bda05cb
f970d15
8716b15
811ad2e
af44b45
6e5c3e9
1a36704
d6f2146
1272212
a4bd702
025fe66
0a3d877
9351b63
91a8af0
33a8e83
87061b3
616151a
4ee7b9d
47b0c47
cce4489
cbd17f0
d79acff
60c5193
ae65e5f
29755f9
a66a5d1
ea6f13f
6d53846
aa39dd6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 would prefer
example.ts
(since we do run typescript, just without strict checking of types)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.
Right, there might 2 reasons for this for now:
.ts
file as base64 encoded (probably a lite issue, to be investigated)Happy to revisit this and make TS the default, but could also be done as a follow-up.
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.
can't know'em all: need to add to
extra_file_types
.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 right I thought we had this one by default already.
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.
Switched back to
example.ts
, although still thinking that a JS example could be relevant to folks new to the JS / TS ecosystem. We can get feedback about this and iterate as needed.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 see your point. Well, maybe we could have both? I guess it does not matter as much for lite until we have LSP support. But once we have LSP in lite (which should be doable here), the TS/JS server gives better hints in TS mode (obviouly).
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.
Oh, indeed. That's been low-prof on my backburner for a while. As, I've mentioned, I think an in-browser
json-language-server
would have huge bang for the buck as being shipped in-core Lab, not just lite.Getting to full-on pygls-based servers like jedi-language-server would be the next target... but the general case, often requiring
subprocess.Popen
or equivalent, is going to be real hard. Indeed, I reckon my whole "LSP-over-comms" rant would actually be even more relevant in lite, as at present, you'd need a second emcsripten computer with a big PROXYFS to run a blocking language server.Yerp: I can't usually in good conscience suggest someone write non-TS labextensions, even to start with. The hill is already quite steep from "i got nothing" or "jquery-and-pray" to full-on you can't do anything without Generics, Promises, Signals, Interfaces, Tokens and doing so by "save-reload-refresh-ooops-hard-refresh" is maddening.
For now, I feel we should "push the veal" with a default
.ts
(and not.tsx
).It's worth exploring a baseline
.js
entirely annotated and typecheckable (and checked) with JSDoc-style annotations the never actually gets transpiled... which, alas, will never be the case, due to webpack and babel. Being able to learn abouttsconfig.json
interactively is indeed one of the things the plugin playground probably should do.To that earlier notational point, it's frustrating that the
requires
andoptional
positional types for anactivate
, which one can't really avoid interacting with, are as poor as they are, but I can't imagine how confusing they would be without types. My kingdom for something that required zero types (much less generics), but still gave one the full benefits:To the earlier point: all would be right in the world if
.mjs
worked perfectly, and deduplicating module federation somehow worked fully off validateablepackage.json
data (again with LSP support), and you could author code directly into yourlabextension/dist
withoutjupyter lab build
... but we can't really solve that problem here.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.
Did you see https://github.com/tc39/proposal-type-annotations? Agree on other bits.
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.
maybe break up into lines and sort
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.
also add link to docs in the
setup.py
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.
Hoping to do more cleanups in #51