Skip to content
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

Nls import improvements #1795

Merged
merged 3 commits into from
Jan 31, 2024
Merged

Nls import improvements #1795

merged 3 commits into from
Jan 31, 2024

Conversation

jneem
Copy link
Member

@jneem jneem commented Jan 30, 2024

Adds support for NICKEL_IMPORT_PATH to nls. Fixes #1786.

Based on the discussion here I also looked into absolute paths. As far as I could tell, they work. But I ran into an issue when testing them: if you write "import foo.ncl" for a file that doesn't exist, nls will correctly flag it. If you then create that file, nls won't notice until you restart it. This PR fixed the issue as long as you open and/or create the missing import in your editor. (We aren't watching the filesystem for changes)

Depends on #1794.

We were already tracking import dependencies for cache invalidation,
but only for imports that exist. Here, we add support for imports that
fail because of I/O errors: we remember the filename of the failed import,
and whenever nls becomes aware of a new file with that name, it
invalidates the importers.
@github-actions github-actions bot temporarily deployed to pull request January 30, 2024 21:57 Inactive
@yannham yannham changed the base branch from master to bump-lsp January 31, 2024 09:37
Base automatically changed from bump-lsp to master January 31, 2024 09:41
Copy link

dpulls bot commented Jan 31, 2024

🎉 All dependencies have been resolved !

@jneem jneem added this pull request to the merge queue Jan 31, 2024
Merged via the queue into master with commit 65560d7 Jan 31, 2024
5 checks passed
@jneem jneem deleted the nls-import-improvements branch January 31, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[LSP] Support import path includes in the lsp
2 participants