-
Notifications
You must be signed in to change notification settings - Fork 5
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
Issue13 #38
base: master
Are you sure you want to change the base?
Issue13 #38
Conversation
What is the best way to test this?
|
Do you have a folder with many uvl files that you can share with us. Maybe as a zip file? |
I used the uvl files from this repo: https://github.com/SoftVarE-Group/feature-model-benchmark/tree/scripts_overhaul/feature_models/uvl |
I guess there are still (or again) issues with the Windows File System. Could you please tell us, where exactly file accesses happen? That way we can resolve the issue on our systems. Additionally, where did you find files with a lot of imports? I think the repo you mentioned does not have a single file with any imports. |
The problem shown should give these error messages because namespaces are ignored. It should be Mendonca2009 or Perreira2016 as the import, then it should work. Auto-completion should actually show the correct names. If there is a problem with the file system there too, this is handled in completion::994 with the method from cache::273 all_sub_files(...). If you still get error messages, then the file access is done in pipeline::506 in the method loade_imports(...). I also don't have an UVL file with many imports. |
i opened the suggested files from the big uvl collection
Seems to work
Worked only if the files have been opened before once. Probably a windows issue, i suspect. EDIT: I think I fixed it on windows with the latest commit.
I think this is a windows issue after all: EDIT: I think i "fixed" this issue but it's not pretty at all and I don't know if it works properly.
Namespaces are not recognized correctly. It says |
uvls/src/ide/completion.rs
Outdated
name, | ||
path.clone(), | ||
len, | ||
TextOP::Put(path), |
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 think you should replace the slashes with dots here for proper completion
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.
yes should actually be so, just made a mistake that should be fixed in the next push
uvls/src/core/ast/transform.rs
Outdated
path.extend_from_slice(&ns.names); | ||
} | ||
let path = uri_to_path(&uri).unwrap(); | ||
// without this Code namespaces are ignored for imports and the normal path is used |
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 think it's a good idea to keep this within the code.
Does this work like a "switch" or does it need additional changes to make the import work like before?
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.
LGTM
you are right
In Linux it works even without the UVL file loaded
The next push should fix this error |
Now I can not reproduce it anymore. With a small sample file the configuration works without problems. Maybe it takes too long to index all files. Waiting for the next push, after that it's good to merge. |
I did as suggested and had some probelms:
I have the same issue as tobi had: Worked only if the files have been opened before once. Probably a windows issue, i suspect.
This worked but when i initially open my ide in a folder all the imports get taged as: I also have some really weird bugs:
This said, I don't have any of the above mentioned issues on MacOS, except for the delete file issue. I have the log for a uvl file with 3 imports, one of which has an error:
|
I played around with this feature and at first it worked as intended, but then I came across a weird bug. I made a screen recording for better understanding. Screen.Recording.2023-09-01.at.16.14.08.movHere are logs after typing the import and I also clicked on the error2.uvl afterwards (Not the logs from the video):
|
LGTM! |
fixes issue #13
All data in the current directory and all subdirectories are no longer loaded. Instead, now only the opened uvl files and the files imported there are loaded.
To make this possible, namespaces are no longer taken into account during import, but only the path with the file name.
If the uvl.json was opened and the corresponding uvl file was not loaded yet, it will be loaded afterward.
Hints: