Skip to content

Conversation

@ban-xiu
Copy link
Contributor

@ban-xiu ban-xiu commented Feb 11, 2026

Close #152482

@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 Feb 11, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 11, 2026

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, Zalathar, clubby789, jieyouxu

Copy link
Member

@SpriteOvO SpriteOvO left a comment

Choose a reason for hiding this comment

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

I also see open calls without specifying encoding= elsewhere in Python scripts. For example

with open(include_path) as included_toml:

Would it be better to override the default locale to UTF-8 using CLI option -X utf8 or env var PYTHONUTF8? I'm not a Python expert, just wanted to bring this up.

View changes since this review

@jieyouxu
Copy link
Member

Would it be better to override the default locale to UTF-8 using CLI option -X utf8 or env var PYTHONUTF8? I'm not a Python expert, just wanted to bring this up.

We are unlikely to be able to rely on either approach, because the entry python scripts are not just run under CI conditions.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

# Give a hard error if `--config` or `RUST_BOOTSTRAP_CONFIG` are set to a missing path,
# but not if `bootstrap.toml` hasn't been created.
if not using_default_path or os.path.exists(toml_path):
with open(toml_path) as config:
Copy link
Member

Choose a reason for hiding this comment

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

Remark: we should go through bootstrap.py and make sure we specific explicit open() encodings, as far as I am aware there is a reasonable desire to want to make a future change in Python 3.* where open() defaults to UTF-8 encoding, which could break open() on binary files called elsewhere in this script.

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 12, 2026

📌 Commit f48448e has been approved by jieyouxu

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Feb 12, 2026
Zalathar added a commit to Zalathar/rust that referenced this pull request Feb 12, 2026
rust-bors bot pushed a commit that referenced this pull request Feb 12, 2026
Rollup of 17 pull requests

Successful merges:

 - #142415 (Add note when inherent impl for a alias type defined outside of the crate)
 - #142680 (Fix passing/returning structs with the 64-bit SPARC ABI)
 - #150768 (Don't compute FnAbi for LLVM intrinsics in backends)
 - #151152 (Add FCW for derive helper attributes that will conflict with built-in attributes)
 - #151814 (layout: handle rigid aliases without params)
 - #151863 (Borrowck: simplify diagnostics for placeholders)
 - #152159 (Add note for `?Sized` params in int-ptr casts diag)
 - #152434 (Clarify names of `QueryVTable` functions for "executing" a query)
 - #152478 (Remove tm_factory field from CodegenContext)
 - #152498 (Partially revert "resolve: Update `NameBindingData::vis` in place")
 - #152316 (fix: add continue)
 - #152394 (Correctly check if a macro call is actually a macro call in rustdoc highlighter)
 - #152425 (Port #![test_runner] to the attribute parser)
 - #152481 (Use cg_ssa's produce_final_output_artifacts in cg_clif)
 - #152485 (fix issue#152482)
 - #152495 (Clean up some subdiagnostics)
 - #152502 (Implement `BinaryHeap::from_raw_vec`)
@rust-bors rust-bors bot merged commit 5822878 into rust-lang:main Feb 12, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 12, 2026
rust-timer added a commit that referenced this pull request Feb 12, 2026
Rollup merge of #152485 - ban-xiu:fix-issue-152482, r=jieyouxu

fix issue#152482

Close #152482
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 Script Error on Windows

4 participants