-
Notifications
You must be signed in to change notification settings - Fork 33
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
[BUG]: Import does not work for any *.obj *.step #4147
Labels
Comments
Thank you for reporting this. We found the cause, and we'll do our best to push a fix as soon as we can. |
nrc
changed the title
[BUG]: Import does not work for any *.obj *.step in the Windows App
[BUG]: Import does not work for any *.obj *.step
Oct 13, 2024
adamchalmers
pushed a commit
that referenced
this issue
Oct 17, 2024
Addresses #4080. (Not ready to close it yet.) # Important Requires a fix for #4147 before it can work in ZMA. # Overview ```kcl // numbers.kcl export fn inc = (x) => { return x + 1 } ``` ```kcl import inc from "numbers.kcl" answer = inc(41) ``` This also implements multiple imports with optional renaming. ```kcl import inc, dec from "numbers.kcl" import identity as id, length as len from "utils.kcl" ``` Note: Imported files _must_ be in the same directory. Things for a follow-up PR: - #4147. Currently, we cannot read files in WebAssembly, i.e. ZMA. - Docs - Should be an error to `import` anywhere besides the top level. Needs parser restructuring to track the context of a "function body". - Should be an error to have `export` anywhere besides the top level. It has no effect, but we should tell people it's not valid instead of silently ignoring it. - Error message for cycle detection is funky because the Rust side doesn't actually know the name of the first file. Message will say "b -> a -> b" instead of "a -> b -> a" when "a" is the top-level file. - Cache imported files so that they don't need to be re-parsed and re-executed.
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
model = import('cube.obj')
Steps to Reproduce
model = import('cube.obj')
Expected Behavior
the files imported properly
Screenshots and Recordings
Desktop OS
Windows 11 x64
Browser
No response
Version
v0.25.6
Additional Context
No response
The text was updated successfully, but these errors were encountered: