-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
sess: warn w/out fluent bundle w/ user sysroot #95716
sess: warn w/out fluent bundle w/ user sysroot #95716
Conversation
rustc_interface has this fallback logic for codegem backends: https://github.com/rust-lang/rust/blob/master/compiler/rustc_interface/src/util.rs#L272 |
ccbd796
to
a7eb311
Compare
Changed the approach this PR takes to use |
LGTM, but I would like someone else to review too. r? rust-lang/compiler |
Is this testable by just pointing a ui test to an empty directory or will that fail earlier due to other things? |
Instead of checking only the user provided sysroot or the default (when no sysroot is provided), search user provided sysroot and then check default sysroots for locale requested by the user. Signed-off-by: David Wood <[email protected]>
a7eb311
to
fc3cca2
Compare
I've added some more tests that I think cover most of the cases modified in this PR, more testing will be required when we actually have other translations and this mechanism is useful though. I don't think pointing the sysroot at an empty directory is too helpful because it'll still check the default sysroot (which may contain a locale?) after that, so I've just tested that by checking for Klingon translations, assuming that we won't have that (knowing full well that someone might go away and do that translation just because this test depends on it not existing and I'm pretty okay with that). I didn't use UI tests because we don't have a way to refer to get the path of a non-Rust auxiliary file like a custom Fluent resource, we've never needed that before. |
@bors r+ |
📌 Commit fc3cca2 has been approved by |
Rollup of 5 pull requests Successful merges: - rust-lang#95671 (feat: Allow usage of sudo [while not accessing root] in x.py) - rust-lang#95716 (sess: warn w/out fluent bundle w/ user sysroot) - rust-lang#95820 (simplify const params diagnostic on stable) - rust-lang#95900 (Fix documentation for wasm32-unknown-unknown) - rust-lang#95947 (`impl const Default for Box<[T]>` and `Box<str>`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Addresses #95512 (comment).
When a custom sysroot is requested, then don't error when translation resources are not found, only warn.
r? @bjorn3