-
Notifications
You must be signed in to change notification settings - Fork 92
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
Unresolved import causes nls
to panic
#1935
Comments
Hi, thanks for the report. The issue isn't that the import isn't resolved (which is usually entirely fine for the LSP and the typechecker, if it can't be found), but rather that the import has been resolved at some point but the corresponding source isn't in the source cache anymore. I wonder how that could have happened, as besides a few exceptions (temporary holders for error messages) we never remove stuff from the source cache; have you done anything special, like having a valid import that you deleted at some point while NLS was active? I just tried your example, both with the error (you're missing a closing Would you have a minimal, complete and reproducible example that triggers the bug for you, to help us address the issue? |
Hi @yannham I will try to produce an example |
Hello @mkatychev, even without a small example, does this still happen on 1.7 ? We suspect #1944 might have solved the problem. Let us know! |
Thanks for the followup @yannham let me get to it tomorrow. The issue was a bit hard to reproduce but that ticket looks like the right steps to make it happen since I was heavily refactoring imported modules |
I'm not able to reproduce the issue w/ 1.7, thanks for the fix @jneem! |
Describe the bug
To Reproduce
Declare an import in an ncl that has no resolution:
let ObjectThatDoesNotExist = import "real_file.ncl in
Expected behavior
nls
should be fault tolerant to an unresolved dependency tree and turn the panic below into an error or log for NLS:nickel/core/src/typecheck/mod.rs
Lines 2817 to 2819 in c8e8401
Environment
Additional context
neovim default LSP
The text was updated successfully, but these errors were encountered: