-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use our own release profile to insulate from custom release profiles #17
Conversation
I was not able to run the tests on my computer so lets see how CI feels |
ok that is what I saw on my computer so it's not just a Windows moment. |
We have Windows on CI so I'd hope that on master, tests work for you? If not, please open an issue. |
557e538
to
0d0e3df
Compare
Yeah they work I just was dumb and didn't check |
0d0e3df
to
a01a250
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, the general direction looks good!
Was wondering if this could be moved forward at all as I think this is a good change (which is mainly to say I still hit this issue). The options are
I chose this as I think it is the safest option. This allows the sysroot to be built by default exactly how we describe it, with known safe configuration options.
But there may be other weird configurations I do now know of that could break things in the future because all other potentially custom keys would be inherited. The biggest risk is that when Cargo stabilizes new profile keys, these will automatically be inherited from the release profile. Which means a potential custom release profile. For the almost all of the unstable keys I am aware of this isn't a big deal. But the To me, the second option seems to have more risk because it has all the risk of option 1 (potential future weird profiles), as well as more risk of inheriting possible current weird profiles. |
Option 1 has the extra risk that cargo may change the defaults and we fail to reflect that. I'm not happy about the prospect of having to maintain a copy of https://doc.rust-lang.org/cargo/reference/profiles.html#release. We also don't know why people override these things, and which problems could be caused by overwriting them back. That's why I prefer option 2. |
As a person who overwrites them, I do it so that my default release profile system wide is what I want it to be. Primarily because I'm not sure what you mean by "overwriting them back" as nothing is being overwritten. Just setting the default values for a custom sysroot build. Since it seems sysroots are sensitive to these settings, as that is why I even have had to do this, having safe defaults that need to be explicitly overridden by the user seems like the best bet. For example Cargo has been kicking around turning thin LTO on by default for release. I'm not sure how that could effect this project and/or miri sysroots, but it might. wrt maintaining a copy, I don't really see that as a huge maintenance burden as profiles are changed so slowly. Anyways I'll just change it to option 2 since getting this out the door is more important since currently I have to delete my cargo config file every time miri builds a new sysroot which is annoying. |
a01a250
to
cca83af
Compare
Thanks! |
Ok this should actually fix the issue with rust-lang/miri#3313 in a nice way.
It also allows people to override the profile, since profiles are at the lowest precedence. So if someone wants to build a sysroot with
-Cdebug-assertions=true
they still can and it will override the profile.