Skip to content
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

Remove some outdated configurations in tools #52800

Merged
merged 9 commits into from Feb 14, 2023

Conversation

huoyaoyuan
Copy link
Member

  • Making generators run on AnyCPU
    Introduced in 2016. I can't imagine any reason to run on x64 only today.
  • Remove AutoGenerateBindingRedirects
    Defaults to on now.
  • Remove PlatformTargets

The only remaining non-AnyCPU project is BuildActionTelemetryTable, which depends on x86 implementation of GetHashCode. With VS2022 moving to x64, it can be also moved to AnyCPU in dev17.

@huoyaoyuan huoyaoyuan requested review from a team as code owners April 21, 2021 14:39
@jinujoseph jinujoseph added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Apr 21, 2021
@jinujoseph jinujoseph added this to InQueue in IDE: CommunityPR via automation Apr 21, 2021
@jinujoseph jinujoseph moved this from InQueue to BuddyAssigned in IDE: CommunityPR Apr 21, 2021
@huoyaoyuan
Copy link
Member Author

Any comment on this PR? Are these changes wanted?

src/Tools/IdeBenchmarks/IdeBenchmarks.csproj Show resolved Hide resolved
@@ -2,17 +2,10 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Platform Condition="'$(Platform)' == ''">x64</Platform>
<PlatformTarget>x64</PlatformTarget>
<Platforms>x64</Platforms>
Copy link
Member

Choose a reason for hiding this comment

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

🤷‍♂️ This change doesn't seem necessary but will leave for @dotnet/roslyn-compiler to review

@sharwell sharwell moved this from BuddyAssigned to BackToCommunity in IDE: CommunityPR Feb 4, 2022
Copy link
Member

@sharwell sharwell left a comment

Choose a reason for hiding this comment

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

Still needs two sign-offs from compiler

IDE: CommunityPR automation moved this from BackToCommunity to LGTM Feb 7, 2022
@jinujoseph jinujoseph moved this from LGTM to BuddyAssigned in IDE: CommunityPR Feb 7, 2022
@sharwell sharwell moved this from BuddyAssigned to LGTM in IDE: CommunityPR Feb 8, 2022
@CyrusNajmabadi
Copy link
Member

@huoyaoyuan could you bring this PR up to date? Moving to draft in the meantime. Thanks!

@CyrusNajmabadi CyrusNajmabadi marked this pull request as draft June 3, 2022 18:20
@huoyaoyuan
Copy link
Member Author

@CyrusNajmabadi Done

@huoyaoyuan huoyaoyuan marked this pull request as ready for review June 4, 2022 04:14
@jcouv
Copy link
Member

jcouv commented Feb 3, 2023

Apologies. The team is small at the moment and we've not reviewed this PR in a timely fashion. As a result it went out-of-date with other changes that went in...
I'll mark this PR as draft for now and commit to review it myself if it can be brought up-to-date. Please ping when the PR is published again and we should take a look (weekly is fine). Thanks

@jcouv jcouv marked this pull request as draft February 3, 2023 00:12
@huoyaoyuan
Copy link
Member Author

@jcouv Updated. Most of the conflicts are about updating net6.0 to net7.0.

Apologies. The team is small at the moment and we've not reviewed this PR in a timely fashion.

I will be interested if you consider to hire more members in the future 😄

@huoyaoyuan huoyaoyuan marked this pull request as ready for review February 6, 2023 08:56
{909B656F-6095-4AC2-A5AB-C3F032315C45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{909B656F-6095-4AC2-A5AB-C3F032315C45}.Debug|Any CPU.Build.0 = Debug|Any CPU
{909B656F-6095-4AC2-A5AB-C3F032315C45}.Release|Any CPU.ActiveCfg = Release|Any CPU
{909B656F-6095-4AC2-A5AB-C3F032315C45}.Release|Any CPU.Build.0 = Release|Any CPU
Copy link
Member

Choose a reason for hiding this comment

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

nit: I noticed that some x64 configurations are left in this file. Should they be switched too?

Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (iteration 9)

@jcouv
Copy link
Member

jcouv commented Feb 7, 2023

@dotnet/roslyn-compiler for second review. Thanks

@jcouv
Copy link
Member

jcouv commented Feb 7, 2023

@dotnet/roslyn-compiler for another review. Thanks

2 similar comments
@jcouv
Copy link
Member

jcouv commented Feb 8, 2023

@dotnet/roslyn-compiler for another review. Thanks

@jcouv
Copy link
Member

jcouv commented Feb 9, 2023

@dotnet/roslyn-compiler for another review. Thanks

@jcouv jcouv requested a review from jaredpar February 9, 2023 19:14
@jcouv
Copy link
Member

jcouv commented Feb 14, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@jcouv jcouv enabled auto-merge (squash) February 14, 2023 05:52
@jcouv jcouv merged commit f2474c1 into dotnet:main Feb 14, 2023
IDE: CommunityPR automation moved this from LGTM to May-2022 Feb 14, 2023
@ghost ghost added this to the Next milestone Feb 14, 2023
@jcouv
Copy link
Member

jcouv commented Feb 14, 2023

Thanks for the contribution @huoyaoyuan !

@huoyaoyuan huoyaoyuan deleted the remove-legacy-config branch February 16, 2023 17:05
@RikkiGibson RikkiGibson modified the milestones: Next, 17.6 P2 Mar 2, 2023
@jaredpar
Copy link
Member

jaredpar commented Mar 9, 2023

Lesson learned from this change:

The removal of <PlatformTarget>AnyCPU</PlatformTarget> from our csproj files was not innocuous. When running a net472 application under Debug, if there is no explicit PlatformTarget then x86 will be used even when an x64 machine. This means our Rebuild leg went from running as a 64 bit app to 32 bit app. That app is right on the edge of the 2Gig boundary in terms of allocations at times and the small change in PR 67191 through it over the edge.

Putting out a PR to fix that but something we should keep in mind for future changes like this.

@jcouv, @jjonescz

@jaredpar jaredpar mentioned this pull request Mar 9, 2023
jaredpar added a commit to jaredpar/roslyn that referenced this pull request Mar 9, 2023
This fixes the following issues in Rebuild validation

1. Adds back `<PlatformTarget>AnyCPU</PlatformTarget>` so the exe runs
   under x64 in CI. Running in x86 in CI is putting us right up against
   the memory boundary and sometimes results in crashes.
2. Changes `LocalReferenceResolver` such that directories are only
   enumerated twice (once for exe and one for dll). In the past every
   new name request caused the entire directory set to be walked again.
   This change saved ~8 seconds on our CI runs.
3. When there is a misc error record it in the build artifacts instead
   of silently failing.

Related: dotnet#52800
@huoyaoyuan
Copy link
Member Author

if there is no explicit PlatformTarget then x86 will be used even when an x64 machine.

Is Prefer32Bit ever enabled?

jaredpar pushed a commit that referenced this pull request Mar 14, 2023
* Rebuild fixes

This fixes the following issues in Rebuild validation

1. Adds back `<PlatformTarget>AnyCPU</PlatformTarget>` so the exe runs
   under x64 in CI. Running in x86 in CI is putting us right up against
   the memory boundary and sometimes results in crashes.
2. Changes `LocalReferenceResolver` such that directories are only
   enumerated twice (once for exe and one for dll). In the past every
   new name request caused the entire directory set to be walked again.
   This change saved ~8 seconds on our CI runs.
3. When there is a misc error record it in the build artifacts instead
   of silently failing.

Related: #52800

* PR feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Area-Infrastructure Community The pull request was submitted by a contributor who is not a Microsoft employee.
Projects
IDE: CommunityPR
  
May-2022
Development

Successfully merging this pull request may close these issues.

None yet

7 participants