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

--noNimblePath should unconditionally be set for projects with lock files #1004

Closed
Tracked by #47
arnetheduck opened this issue Jun 20, 2022 · 6 comments · Fixed by #1062 or nim-lang/Nim#21266
Closed
Tracked by #47

Comments

@arnetheduck
Copy link

If a project has a lock file, plain nim and tooling should be prevented from ever looking into the nimble folder, so as to avoid that random code from the global nimble cache infects the project.

The current strategy with a conditional when fileExists("nimble.paths"): breaks before nimble setup has been run, because nimble.paths does not exist on a freshly cloned repository.

@arnetheduck
Copy link
Author

This also needs a corresponding patch on the Nim side - ie this issue should not be closed yet (but there's no reopen button)

@ringabout ringabout reopened this Jan 15, 2023
@arnetheduck
Copy link
Author

One could even go further and say that once this has been fixed in Nim itself, #1062 is no longer needed / redundant..

@SolitudeSF
Copy link
Contributor

so, is nimsuggest supposed to be nimble aware now, if you want to use lock files?

@arnetheduck
Copy link
Author

so, is nimsuggest supposed to be nimble aware now, if you want to use lock files?

the other way around - if you use lock files, the special nimble support in the compiler is disabled so that nimsuggest doesn't pick up legacy nimble code from the global cache.

your project still needs to have an explicit configuration to use the paths from the lock files (which then are picked up by nimble)

@SolitudeSF
Copy link
Contributor

your project still needs to have an explicit configuration to use the paths from the lock files (which then are picked up by nimble)

that what i meant. and where are the facilities to provide that configuration?

@arnetheduck
Copy link
Author

right now, nimble edits config.nims as part of the project setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants