-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Make DotNetBuildFromSource work in more cases. #81480
Conversation
DotNetBuildFromSource is mostly used when this repository is built as part of source-build. With these changes the flag works in more cases, making it easier to reproduce the source-build behavior when building the runtime repository directly.
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
src/libraries/Common/tests/TestUtilities/System/WindowsIdentityFixture.cs
Show resolved
Hide resolved
Would it make sense to drop some now-duplicated configuration from Lines 35 to 54 in 842ec4a
|
src/libraries/Microsoft.NETCore.Platforms/tests/Microsoft.NETCore.Platforms.Tests.csproj
Outdated
Show resolved
Hide resolved
@omajid I don't know. That file doesn't actually set |
AFAIK, arcade sets both |
Source-build sets I don't know if it is possible to use If someone confirms it isn't, I'll remove the properties from the |
@MichaelSimons can you review the defaults being added here when |
Building with
IIRC there was a preference to try and localize all the source-build properties in SourceBuild.props rather than conditionalize them throughout the code base as it made it easier to determine the source-build configuration/settings. I have no strong preference and will leave that decision to the runtime folks. If these properties are defined, then yes I agree they should be removed from SourceBuild.props. |
I think Besides that use-case, I think it's desired to be able to directly use
I think |
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.
Great progress!
How do we guarantee that devs don't add new stuff to SourceBuild.props for non entry-point switches / properties? Should we add a big disclaimer to that file after the switches are passed in? What about the remaining non entrypoint properties that are still defined in the file?
Let's look at what is still there:
The properties that pass down arguments from the source-build top-level can stay. So from this list, I think we still want to move I'm not sure we need to set I'll add a comment that suggests properties that control the source-build build configuration should be added to the repository using the I ran the command I was using before again, and I noticed my target rid is |
This YML template is the only place that enables it:
|
I'm assuming it's safe to just remove this and I don't have to add it anywhere unless CI will tell me otherwise. |
I verified this command works as expected:
I don't have any more changes in mind. |
The CI failures seem unrelated. @ViktorHofer can you take a look at the latest changes? |
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 a lot 👍
@ViktorHofer thanks for your help! |
This commit seems to have broken builds where
Note how it is trying to use
That property is computed a few lines down in the |
DotNetBuildFromSource is mostly used when this repository is built as part of source-build.
With these changes the flag works in more cases, making it easier to reproduce the source-build behavior when building the runtime repository directly.
I came to these changes by fixing the errors that came up while running the following command on my Fedora machine:
cc @MichaelSimons @ViktorHofer @omajid