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

Allow builds without dream.lock #199

Closed
wmertens opened this issue Jul 15, 2022 · 4 comments
Closed

Allow builds without dream.lock #199

wmertens opened this issue Jul 15, 2022 · 4 comments

Comments

@wmertens
Copy link
Contributor

I don't quite understand the whole system yet, but it occurred to me that with #195 the translate step is entirely stateless if the package-lock.json file is v2.

So it would be nice to not have to maintain a separate dream-lock file in git.

How about providing the minimum information in flake.nix (I believe just the package names?), and then running a stateless translate step before the build?

Then direnv could be told to watch package-lock.json and when it changes, update the devShell, no resolveImpure step needed.

@DavHau
Copy link
Member

DavHau commented Jul 15, 2022

The way you describe it is how it works already. There exist pure and impure translators in dream2nix. If your project can be translated by a pure translator, which is the case if you have either a package-lock.json or yarn.lock file there is no need to execute resovleImpure. resolveImpure is only needed if a lock file is not present.

@wmertens
Copy link
Contributor Author

Hmm, but without resolveImpure you don't have devShell?

@DavHau
Copy link
Member

DavHau commented Jul 15, 2022

Hmm, but without resolveImpure you don't have devShell?

If that is the case, than this is a bug that needs to be fixed

@DavHau
Copy link
Member

DavHau commented Jul 15, 2022

I just tested and I get the devShell outputs also without resolveImpure. If you have a project where this is not the case, please file an issue providing a flake.

@DavHau DavHau closed this as completed Jul 15, 2022
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