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

Can we call nix-instantiate without --parse? #212

Open
itsfarseen opened this issue Mar 17, 2022 · 1 comment
Open

Can we call nix-instantiate without --parse? #212

itsfarseen opened this issue Mar 17, 2022 · 1 comment

Comments

@itsfarseen
Copy link

In linter.ts#L95, we call nix-instantiate with the --parse argument.
If we omit it, we will also get diagnosis for things like pkgs.foozz doesn't exist.
Currently it only analyzes syntatical errors like misplaced semicolons/parens etc and missing top-level variables.

Other than the fact that omiting --parse is slow, is there any other reason we can't use that?
nix-instantiate takes 1.4s to execute on my machine. Whereas, nix-instantiate --parse only takes 0.1s.

If there are no other issues, I think I'll be able to do a PR that runs nix-instantiate --parse first, and then fires off nix-instantiate in the background and update the output once it completes.

@jnoortheen
Copy link
Collaborator

I will be glad to accept the PR if it is opt-in while explaining the tradeoffs in the settings.

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

No branches or pull requests

2 participants