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

bazel wrapper: detect when nix-shell was modified #308

Open
leoluk opened this issue Jul 24, 2024 · 2 comments
Open

bazel wrapper: detect when nix-shell was modified #308

leoluk opened this issue Jul 24, 2024 · 2 comments
Assignees
Labels
c/dev-ux enhancement New feature or request

Comments

@leoluk
Copy link
Member

leoluk commented Jul 24, 2024

When updating to a later shell.nix, fail if we run bazel inside an outdated shell to avoid correctness issues.

@leoluk leoluk added enhancement New feature or request c/dev-ux labels Jul 24, 2024
@fionera fionera self-assigned this Jul 24, 2024
@fionera
Copy link
Contributor

fionera commented Jul 24, 2024

We could evaluate the file on every run but that would evaluate the file every time and takes "forever"

 time nix-instantiate shell.nix
/nix/store/xill2lxj8ja01a735v9q0ql1bqfxl6vf-monogon-nix-shell-env.drv
nix-instantiate shell.nix  1,28s user 0,56s system 83% cpu 2,213 total

@q3k
Copy link
Contributor

q3k commented Jul 30, 2024

So what's the issue we're trying to solve here?

You're in a nix-shell and you want to detect that if you exited nix-shell and re-entered it you would have a different shell?

Or do you want to make Bazel aware that the environment from which you're running the bazel CLI changed significantly enough that it should restart the server within the new nix-shell?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/dev-ux enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants