-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add reloadability to nix develop #7235
Add reloadability to nix develop #7235
Conversation
This is my attempt to provide reloadability to Nix develop. There are three parts: - Adds a "reload" bash function to nix develop which execs with the same command nix develop was called with, destroying the old shell. - Adds a "--print-out-path" option to nix develop which prints the out path of the dev shell and exists. - Adds a "--auto-reload" option which checks if the shell out path has changed and calls reload if it does (experimental, it does make your shell kinda slow).
That's a pretty cool approach. Not sure that we'd want to integrate it, but it's pretty nice as a poor-man's Did you consider using something like |
Yeah I wasn't sure if we could repeatedly eval like that. I think we'd have to rework the rc script a little bit so it is idempotent. |
I don't think there's anything preventing it. That's (very roughly) what
Yes, I didn't expect it to really be a performance issue. It's more about the annoyance of having a garbled shell history and all that |
This won't work well because of the lack of escaping and the possibility that I don't think Development shell problems would be better solved in a new command, and that new command, which is rather open ended, would be better solved by making |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2023-07-24-nix-team-meeting-minutes-75/31112/1 |
Discussed during the Nix team meeting. Bottom-line: It's a cool idea, but shouldn't belong in Nix itself as it's increasing the conceptual complexity quite a bit and we'd rather have the tool concentrate on the basics |
@matthewbauer would you be willing to make a separate PR for the addition of |
This is my attempt to provide reloadability to Nix develop. There are three parts: