Skip to content

Apply changes for source build and remove patches#52999

Merged
sharwell merged 15 commits intodotnet:features/source-buildfrom
sharwell:remove-patches
May 6, 2021
Merged

Apply changes for source build and remove patches#52999
sharwell merged 15 commits intodotnet:features/source-buildfrom
sharwell:remove-patches

Conversation

@sharwell
Copy link
Contributor

@sharwell sharwell commented Apr 28, 2021

Closes #52958

@sharwell sharwell force-pushed the remove-patches branch 2 times, most recently from dca266b to e010f99 Compare April 29, 2021 16:25
@333fred 333fred self-requested a review April 29, 2021 16:59
@333fred 333fred added the Source-Build Tracking dotnet/source-build related tasks. label Apr 29, 2021
@sharwell sharwell changed the title Restore net472 builds Apply changes for source build and remove patches Apr 30, 2021
@sharwell sharwell marked this pull request as ready for review April 30, 2021 04:59
@sharwell sharwell requested review from a team as code owners April 30, 2021 04:59
Now that the compiler builds against the original target framework, it
no longer needs suppressions for use of members added in later
frameworks.
333fred
333fred previously approved these changes May 5, 2021
Copy link
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

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

LGTM (commit 15)

@333fred 333fred dismissed their stale review May 5, 2021 17:13

Questions

Copy link
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

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

LGTM (commit 15). Questions answered

@MichaelSimons
Copy link
Member

@crummel and @dseefeld, can you please review since you are both familiar with the history on the patches?

@MichaelSimons MichaelSimons requested review from crummel and dseefeld May 5, 2021 23:40
Copy link
Member

@MichaelSimons MichaelSimons left a comment

Choose a reason for hiding this comment

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

What resolved the need for the following patches?

  1. 0002-Do-not-build-NET-Fx-binaries-in-source-build
  2. 0008-remove-RichCodeNav.EnvVarDump-on-source-build

@dseefeld
Copy link
Contributor

dseefeld commented May 6, 2021

What resolved the need for the following patches?

  1. 0002-Do-not-build-NET-Fx-binaries-in-source-build
  2. 0008-remove-RichCodeNav.EnvVarDump-on-source-build

I'm not sure if 0002 is required. I know we have similar patches in other repos. @crummel, do you have any idea on this one?

It looks like 0008 has been applied to eng/targets/Settings.props.

@MichaelSimons
Copy link
Member

MichaelSimons commented May 6, 2021

It looks like 0008 has been applied to eng/targets/Settings.props.

You're right, I somehow overlooked that. Thanks

@sharwell
Copy link
Contributor Author

sharwell commented May 6, 2021

0002-Do-not-build-NET-Fx-binaries-in-source-build

@MichaelSimons This was an unnecessary patch. The net472 reference assemblies are available in source build on all platforms. Even though these outputs aren't executable in source build, we have no difficulty in accurately producing them. It's better to produce additional (accurate) assemblies from the build than to increase conditional logic that moves source build further away from real builds.

@sharwell sharwell merged commit 35b9628 into dotnet:features/source-build May 6, 2021
@sharwell sharwell deleted the remove-patches branch May 6, 2021 15:36
@sharwell
Copy link
Contributor Author

sharwell commented May 6, 2021

This highlights my primary concern with the way source build is getting rolled out:

image

The initial proposal was thousands of lines of code, but I'm concerned most users won't realize that almost all of them are extraneous. By the time it was corrected for #53225, only ~50 changed lines remained.

@MichaelSimons
Copy link
Member

@sharwell

This highlights my primary concern with the way source build is getting rolled out

Are you referring to the past (pre 6.0) or with the 6.0 ArPow plan? I don't think you will get much argument from folks that the previous SB approach had issues which is the motivation behind ArPow. The approach of utilizing patches outside the source repos is not maintainable and introduces quality issues. I just want to make sure you are onboard with ArPow.

@sharwell
Copy link
Contributor Author

sharwell commented May 6, 2021

@MichaelSimons My comment relates to the rollout process itself. For example, if Roslyn infrastructure was consulted earlier in the process, we could have provided information that these two extensive patches were completely unnecessary, and avoided all the work to create and then remove (without applying) them:

0002-Do-not-build-NET-Fx-binaries-in-source-build.patch
0012-Build-Roslyn-as-net6.0-in-source-build.patch

@333fred
Copy link
Member

333fred commented May 6, 2021

My comment relates to the rollout process itself. For example, if Roslyn infrastructure was consulted earlier in the process

Well, I think that's the pre-6.0 stuff. These patches were added between 2.2 and 6.0, and I've already given the feedback that we could have absolutely incorporated them (or shown that they were unnecessary) if we had been alerted that they had been added. That ship is several years sailed however.

@MichaelSimons
Copy link
Member

@sharwell, Thanks for the clarification. The ArPow rollout process involves taking the existing source-build patches that exist in 5.0 and check them into the product repos along with the ArPow infrastructure. The consultation that you are referring to should have happened at the time of the initial patch creation. Certainly collaboration between source-build and repos owners in the past should have been better but keep in mind resources and timelines have always been a hinderance.

@sharwell
Copy link
Contributor Author

sharwell commented May 6, 2021

@MichaelSimons These are the most problematic statements from #52958:

The changes in these .patch files should be incorporated into the main branch of this repo to remove this possibility.

This issue tracks using git am eng/source-build-patches/*.patch and submitting a PR to incorporate the patches, or making changes to the repo that accomplish the same goals as the patches.

It would be better if the issue highlighted the fact that most of the proposed changes are unnecessary/obsolete, and the desired outcome for any unnecessary changes is deleting the patch without application rather than applying it. The current working reads as though this is either discouraged or not an option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Infrastructure Source-Build Tracking dotnet/source-build related tasks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants