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

Detect and report nix shell #115117

Merged
merged 3 commits into from
Aug 25, 2023
Merged

Conversation

pnkfelix
Copy link
Member

Better diagnostics for people using nix subshell on non-NixOS.

  1. Turned patch-binaries-for-nix from a boolean into a ternary flag: true, false, and unset.

  2. When patch-binaries-for-nix is unset, we continue with the existing NixOS detection heuristic (look for nixos in /etc/os-release, if present), but if we are not atop NixOS, then issue a note if we see the IN_NIX_SHELL environment variable telling the user to consider setting patch-binaries-for-nix explicitly.

Fix #115073

1. Turned patch-binaries-for-nix from a boolean into a ternary flag: true,
   false, and unset.

2. When patch-binaries-for-nix is unset, we continue with the existing NixOS
   detection heuristic (look for nixos in /etc/os-release, if present), but if
   we are not atop NixOS, then issue a note if we see the IN_NIX_SHELL
   environment variable telling the user to consider setting
   patch-binaries-for-nix explicitly.
@rustbot
Copy link
Collaborator

rustbot commented Aug 22, 2023

r? @albertlarsan68

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Aug 22, 2023
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@albertlarsan68 albertlarsan68 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!
r=me with tidy fixed

src/bootstrap/bootstrap.py Outdated Show resolved Hide resolved
In addition: Incorporated some review feedback (namely, removed a useless
initial assignment to True that was never read), and unified code a bit more
between bootstrap.py and download.rs (by using the same variable name for the
same concept).
@pnkfelix
Copy link
Member Author

@bors r=albertlarsan68 rollup

@bors
Copy link
Contributor

bors commented Aug 24, 2023

📌 Commit ec2c95e has been approved by albertlarsan68

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 24, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 25, 2023
Rollup of 9 pull requests

Successful merges:

 - rust-lang#114987 (elaborate a bit on the (lack of) safety in 'Mmap::map')
 - rust-lang#115084 (Add smir `predicates_of`)
 - rust-lang#115117 (Detect and report nix shell)
 - rust-lang#115124 (kmc-solid: Import `std::sync::PoisonError` in `std::sys::solid::os`)
 - rust-lang#115152 (refactor(lint): translate `RenamedOrRemovedLint`)
 - rust-lang#115154 (Move some ui tests to subdirectories)
 - rust-lang#115167 (Fix ub-int-array test for big-endian platforms)
 - rust-lang#115172 (Add more tests for if_let_guard)
 - rust-lang#115177 (Add symbols for Clippy usage)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4369e24 into rust-lang:master Aug 25, 2023
@rustbot rustbot added this to the 1.74.0 milestone Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bootstrap atop nix atop non-nix (old, Linux) OS fails with inscrutable errors
6 participants