-
Notifications
You must be signed in to change notification settings - Fork 1
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
Introduce Python-specific standard library #73
Comments
Experimenting on https://github.com/krzema12/kotlin-python/tree/python-stdlib Trying with
but getting
It fails here: kotlin-python/compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/JsIntrinsics.kt Line 31 in 52ad7cb
because the WASM stdlib (what I copied to create our stdlib from) doesn't have |
I'm unblocked and continuing with integrating the new stdlib. Current status can be found on python-stdlib branch. |
Iterating with:
|
I'm pausing it to focus on project cleanup. It now doesn't fail at runtime for some simple example, but I had to remove a lot of Python backend pieces, which results in incorrect output anyway. Will get back to it once cleanup is done. |
Looks like I have some progress here, will open a PR. |
Right now, after explicitly building Python stdlib ( Another observation and a thing to be changed: the Python stdlib mimics the build logic after JS library, while we should copy WASM's build logic. |
Could you elaborate please? From what I've briefly seen, the WASM build logic is quite specific because it's bound to JS. However, I can easily be wrong because I haven't spent much time on it. The problem I see is that we compile stdlib-py with the KJS compiler, so we get not only KLIB, but also JS. I guess it's not a big problem for now. |
I refer to https://kotlinlang.slack.com/archives/C0289CS37AS/p1637160755034700?thread_ts=1636875290.016700&cid=C0289CS37AS which is pretty vague, but I understand it as e.g. using |
Before this change, the Python-specific stdlib was used only in box tests. This change makes the stdlib present in `dist` directory and thus usable by e.g. end-to-end tests and GitHub workflows.
Before this change, the Python-specific stdlib was used only in box tests. This change makes the stdlib present in `dist` directory and thus usable by e.g. end-to-end tests and GitHub workflows.
Left to do: currently Python stdlib relies on copying some JS stdlib. It shouldn't happen - both should be independent. It's a matter of copying some files over to Python stdlib and adjusting build logic. |
https://kotlinlang.slack.com/archives/C0289CS37AS/p1636875290016700
We were advised by JetBrains to look at how kotlin-stdlib-wasm is implemented.
The text was updated successfully, but these errors were encountered: