-
Notifications
You must be signed in to change notification settings - Fork 62
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
WebIDE does not support subdirectory imports #172
Comments
Fixed in #161 and available for testing at https://ide.kaitai.io/devel/. The difference in Web IDE versions is explained at https://doc.kaitai.io/user_guide.html#web-ide.
Yeah, as already discussed in #30, the "Create folder" button unfortunately only looks like it creates a folder. In reality, the files you seemingly put into it effectively still go to the root level (with everything that comes with it). In theory, this shouldn't be that hard to fix properly (i.e. finally implement folders) but apparently nobody has gotten around to it yet. In the meantime, I believe we should indeed at least disable the "Create folder" button as suggested in #30 (comment) so that it doesn't confuse newcomers (but that doesn't solve the problem for existing Web IDE users who already have some "directory structure" persisted in their local browser storage and haven't noticed this problem yet). |
thanks for highlighting the hosted devel version - I had forgotten that was running + was trying to avoid spinning up the repo to run locally. i'm OK to close this issue as a dupe unless you think it's otherwise valuable to renew tracking of a fix / disabling the button as per #30. |
It seems that using imports within the webIDE, where the desired file is nested in a folder, causes an error whereas it otherwise works on the compiler interface. For example:
will work fine, provided that a
something.ksy
file exists which provides the typesomething
.However,
will provide the unclear error "Cannot read properties of null (reading 'indexOf')" as it gets a null value back from resolving
another/another
, even if the fileanother/another.ksy
provides the type. Instead, it seems that the directory structure is flattened for localfs, and the file is retrieved via justanother
.This unclear "cannot read properties of null" error will get emitted if you import any nonexistent file (e.g.
kaitaiIde.app.compilerService.jsImporter.importYaml('garbage/path', 'rel')
) and should be replaced with a more clear indication. Further, if directories are supported in the UI, those directories should be respected in the fs lookups, rather than replacing them with a flattened copy.This is loosely documented in #30, but I wanted to re-draw attention to it with a more aptly named issue since it's still an open limitation (from 7 years ago).
The text was updated successfully, but these errors were encountered: