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

fix: let nix not cache bash generated file #1395

Merged
merged 2 commits into from
Aug 20, 2024
Merged

Conversation

Atry
Copy link
Contributor

@Atry Atry commented Aug 19, 2024

Originally, bash generates /dev/fd/63 from "file+file://"<(printf %s "$PWD") and nix caches the file content with TTL 3600 seconds, as a result, if two flake-parts based devenv projects are created under different paths, they would interfere each other's cache for /dev/fd/63, and result in wrong DEVENV_ROOT.

This PR disables the nix file cache to avoid the problem.

@Atry Atry changed the title fix: Don't cache bash generated file fix: let nix not cache bash generated file Aug 19, 2024
@Atry
Copy link
Contributor Author

Atry commented Aug 20, 2024

Another solution is to create a flag like --override-input devenv-root "https://postman-echo.com/get?devenv-root=$PWD"

https://postman-echo.com is a service to print the request information, for example, given the URL https://postman-echo.com/get?devenv-root=/home/myuser/myproject , we can use builtins.fromJSON to get the query string of devenv-root.

@domenkozar domenkozar merged commit 4c01733 into cachix:main Aug 20, 2024
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.

2 participants