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

Added explicit .NET 6 TFMs. #28911

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Added explicit .NET 6 TFMs. #28911

wants to merge 15 commits into from

Conversation

AraHaan
Copy link

@AraHaan AraHaan commented May 22, 2022

@ghost ghost added Azure.Core Azure.Identity EngSys This issue is impacting the engineering system. App Configuration Azure.ApplicationModel.Configuration Batch Cognitive - Form Recognizer Cognitive - Text Analytics Communication Digital Twins TimeseriesInsights Event Grid Event Hubs IoT KeyVault Search Service Bus Storage Storage Service (Queues, Blobs, Files) Tables customer-reported Issues that are reported by GitHub users external to the Azure organization. labels May 22, 2022
@ghost
Copy link

ghost commented May 22, 2022

Thank you for your contribution @AraHaan! We will review the pull request and get back to you soon.

@ghost ghost added the Community Contribution Community members are working on the issue label May 22, 2022
AraHaan added a commit to AraHaan/autorest.csharp that referenced this pull request May 22, 2022
AraHaan added a commit to AraHaan/autorest.csharp that referenced this pull request May 22, 2022
Copy link
Member

@jsquire jsquire left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution and for helping to improve the Azure SDK experience. Though this is still in draft form, there were a couple of things that caught my eye that I wanted to mention, and one request that I had for the overall pattern.

Please consider moving the conditionals to a new item group with the condition applied there. An explanation of why we're conditionalizing would also be appreciated.

Example:

<ItemGroup>
  <PackageReference Include="Azure.Core" />
</ItemGroup>

<!-- These packages are included as part net6.0; the external references are not needed. -->
<ItemGroup Condition="'$(TargetFramework)' != 'net6.0'">
  <PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
  <PackageReference Include="System.Text.Json" />
</ItemGroup>

@github-actions github-actions bot removed the no-recent-activity There has been no recent activity on this issue. label Jan 13, 2024
@AraHaan
Copy link
Author

AraHaan commented Feb 7, 2024

I feel like I might need to look into why the merge conflicts are present and if possible resolve them.

@thompson-tomo
Copy link

Merging main was painless. So I have done it via: AraHaan#504

@@ -13,8 +13,8 @@
<ItemGroup>
<PackageReference Include="Azure.Core" />
<PackageReference Include="Azure.Identity" />
<PackageReference Include="System.Memory" />
<PackageReference Include="System.Text.Json" />
<PackageReference Include="System.Memory" Condition="'$(TargetFramework)' != 'net6.0'" />

Choose a reason for hiding this comment

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

For consistency I feel these should be in an item group rather than directly on the reference.

@@ -12,8 +12,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Core" />
<PackageReference Include="System.Memory" />
<PackageReference Include="System.Text.Json" />
<PackageReference Include="System.Memory" Condition="'$(TargetFramework)' != 'net6.0'" />

Choose a reason for hiding this comment

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

For consistency I feel these should be in an item group rather than directly on the reference.

</ItemGroup>

<!-- These packages are included as part net6.0; the external references are not needed. -->
<ItemGroup Condition="'$(TargetFramework)' != 'net6.0'">

Choose a reason for hiding this comment

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

For maintainability should this be inverted so that adding future frameworks doesn't need the conditions to be touched?

</ItemGroup>

<!-- These packages are included as part net6.0; the external references are not needed. -->
<ItemGroup Condition="'$(TargetFramework)' != 'net6.0'">

Choose a reason for hiding this comment

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

For maintainability should this be inverted so that adding future frameworks doesn't need the conditions to be touched?

</ItemGroup>

<!-- These packages are included as part net6.0; the external references are not needed. -->
<ItemGroup Condition="'$(TargetFramework)' != 'net6.0'">

Choose a reason for hiding this comment

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

For maintainability should this be inverted so that adding future frameworks doesn't need the conditions to be touched?

</ItemGroup>

<!-- These packages are included as part net6.0; the external references are not needed. -->
<ItemGroup Condition="'$(TargetFramework)' != 'net6.0'">

Choose a reason for hiding this comment

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

For maintainability should this be inverted so that adding future frameworks doesn't need the conditions to be touched?

</ItemGroup>

<!-- These packages are included as part net6.0; the external references are not needed. -->
<ItemGroup Condition="'$(TargetFramework)' != 'net6.0'">

Choose a reason for hiding this comment

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

For maintainability should this be inverted so that adding future frameworks doesn't need the conditions to be touched?

</ItemGroup>

<!-- These packages are included as part net6.0; the external references are not needed. -->
<ItemGroup Condition="'$(TargetFramework)' != 'net6.0'">

Choose a reason for hiding this comment

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

For maintainability should this be inverted so that adding future frameworks doesn't need the conditions to be touched?

Comment on lines +116 to +119
#if NET6_0_OR_GREATER
uri.Host.Contains('.', StringComparison.InvariantCulture) &&
#elif NETCOREAPP3_1
uri.Host.Contains(".", StringComparison.InvariantCulture) &&

Choose a reason for hiding this comment

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

Should these be merged into 1 condition.

@@ -13,7 +13,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Core" />
<PackageReference Include="Azure.MixedReality.Authentication" />
<PackageReference Include="Azure.MixedReality.Authentication" VersionOverride="1.0.1" />

Choose a reason for hiding this comment

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

Is this version override needed?

Copy link
Author

Choose a reason for hiding this comment

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

I will need to check once more yeah.

Copy link

@lahma lahma left a comment

Choose a reason for hiding this comment

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

Added a comment about better way to check target platform that will work with newer NET versions too.

</ItemGroup>

<!-- These packages are included as part net6.0; the external references are not needed. -->
<ItemGroup Condition="'$(TargetFramework)' != 'net6.0'">
Copy link

Choose a reason for hiding this comment

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

It would be better to use Condition="!$([MSBuild]::IsTargetFrameworkCompatible($(TargetFramework), 'net6.0'))" for all such conditions, compatibility check is future-proof

Copy link
Author

Choose a reason for hiding this comment

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

That is true, alright I will do it when I can.

@AraHaan
Copy link
Author

AraHaan commented Apr 29, 2024

The issue that was open for this was automatically closed and locked so it could not be reopened by myself. Someone might have to manually reopen it that can do such.

Copy link

github-actions bot commented Jul 5, 2024

Hi @AraHaan. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label Jul 5, 2024
@AraHaan
Copy link
Author

AraHaan commented Jul 5, 2024

This is still a wip.

@github-actions github-actions bot removed the no-recent-activity There has been no recent activity on this issue. label Jul 5, 2024
Copy link

github-actions bot commented Sep 6, 2024

Hi @AraHaan. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label Sep 6, 2024
@AraHaan
Copy link
Author

AraHaan commented Sep 7, 2024

This is still a wip.

@github-actions github-actions bot removed the no-recent-activity There has been no recent activity on this issue. label Sep 7, 2024
@m-redding m-redding mentioned this pull request Oct 15, 2024
9 tasks
Copy link

github-actions bot commented Nov 8, 2024

Hi @AraHaan. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label Nov 8, 2024
@thompson-tomo
Copy link

We are still awaiting a review

@jsquire
Copy link
Member

jsquire commented Nov 8, 2024

Apologies for the long delay here; this turned out to be an issue with many more differing opinions than expected and required a good amount of internal discussion. From the feedback that was shared here and by other community members, we've formalized a plan for multitargeting going forward where we will always have an explicit target for the latest LTS. The working draft of this plan is:

  • All clients will target netstandard2.0 and latest LTS
  • Core libraries will target netstandard2.0 and latest LTS
  • We will remove LTS targets from both client and Core libraries six months after their End of Support date
  • We will have a goal to add the latest LTS target when it is released.
  • We strongly want to add an LTS target before the end of support date for an older LTS
  • We may choose to skip an LTS if there is a compelling reason to do so
  • We may choose to add a target for an STS is there is a compelling reason to do so

With the pending end-of-life for net6.0, we're in the process of adding a net8.0 target, setting up central infrastructure to trim package dependencies known to be included in the runtime for modern targets, and bumping dependency versions to the 8.x line. This workstream is tracked by Tracking .NET 8 and 9 updates (#46639). I think we can let this close out if the bot tags it again.

@github-actions github-actions bot removed the no-recent-activity There has been no recent activity on this issue. label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Configuration Azure.ApplicationModel.Configuration Azure.Core Azure.Identity Batch Cognitive - Form Recognizer Cognitive - Text Analytics Communication Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Digital Twins EngSys This issue is impacting the engineering system. Event Grid Event Hubs IoT KeyVault Search Service Bus Storage Storage Service (Queues, Blobs, Files) Tables TimeseriesInsights
Projects
Status: In Progress
Status: In Progress
Status: Untriaged
5 participants