Make target pointer width in target json an integer#144443
Make target pointer width in target json an integer#144443bors merged 5 commits intorust-lang:masterfrom
Conversation
|
|
|
This PR modifies cc @jieyouxu These commits modify compiler targets. Some changes occurred in src/tools/compiletest cc @jieyouxu |
Noratrieb
left a comment
There was a problem hiding this comment.
I'm unsure if it's worth breaking everyone over such a minor improvement.. maybe? maybe not?
This comment has been minimized.
This comment has been minimized.
|
I'm inclined to say yes, but it would probably be good to get this merged today so it can be in the same nightly as the other breaking change instead of two consecutive nightlies (it would also be fine to do that, but less cool) |
We already did that with #144443... the current state is just inconsistent. But, no strong opinion. |
bb5b5c5 to
283f21b
Compare
|
@Noratrieb what's the other breaking change? #142352 has been merged for over a month.. |
This comment has been minimized.
This comment has been minimized.
283f21b to
267f0bd
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Uh, but then why did Miri CI only start failing today? Something changed in 9748d87...b56aaec. |
b64ab4a to
b2871e5
Compare
|
The breaking change was probably #144218. |
|
It might be that the field of wrong type just got ignored, which is exactly why Nora ported this to serde. |
|
You are right indeed. The code in #142352: if let Some(s) = obj.remove(name).and_then(|b| b.as_u64()) {
base.$key_name = s as $int_ty;
}
|
This comment has been minimized.
This comment has been minimized.
To unblock the Rust CI in PR [1], use a temporary commit from Rust for Linux that supports the future target spec format. Link: rust-lang#144443 [1] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
fe01e35 to
2d8cb59
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
#145909 got merged, so this should be good to go. I can't imagine what else can break ^^' |
|
@WaffleLapkin It seems to be on S-waiting-on-author |
|
@bors r=Noratrieb |
|
yay :3 |
|
Just wanted to say, I'm really disappointed that such a trivial breaking charge was merged without any deprecation period and without making it just accept both forms for compatibility (which also would have been trivial), which would save a lot of pain for a lot of people. Not everyone wants to live on the bleeding edge of MSRV, and some people care that their software works on a wide range of rustc versions. |
|
Hm yeah maybe we should have accepted both forms for a while. OTOH, without a lint hardly anyone would have noticed so there would still have been breakage later when the old form is removed, and a lint would have been more extra work.
We have always been very clear that there is no stability on nightly.
|
|
Be that as it may, this is just pretty much an aesthetic change with no real practical benefit besides "it's nicer this way", it was "stable" and worked for years (even if not officially stabilized), there's no non-nightly alternative so those who need it are forced to use it, and many people depend on it. Doesn't the cost-benefit ratio here seem very skewed to you here? Sure, it would be extra work to make it temporarily accept both forms and add a lint for a few releases, but that extra work wasn't eliminated, just multiplied and pushed somewhere else, because now everyone who uses this and doesn't want to require a bleeding edge MSRV will now have to do the extra work to autodetect the compiler and support both. Anyway, I apologize if I may seem blunt; I know you're doing a thankless job. I just wish this would have been handled better; I suppose it's too late now to do anything about it? |
Someone could make a PR to accept both forms, if you still think that's useful. I think that'd be the first time we do a compatibility transition for the target JSON format so the compiler team would have to discuss whether they consider that precedent a good idea. |
|
The target.json format changes pretty often. Three changes come to mind for me:
So anyone using target.json with multiple compiler versions will have to use some sort of conditional logic when generating it, or just have multiple copies of it, and that's just how it is. If this particular case is the first time it happened for you, then I understand that it seems frivolous, and if it otherwise never changed in practice I might agree. But it changes often enough that I don't think this kind of thing makes sense. |
|
Another recent change is that c_int_width was changed from a string to an integer -- that's in fact what motivated this change. (However, apparently JSON targets in the wild don't often set c_int_width so this didn't cause much fallout.) |
r? Noratrieb
cc @RalfJung (https://github.com/rust-lang/rust/pull/142352/files#r2230380120)
try-job: x86_64-rust-for-linux