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

[Announcement] Intention to update target frameworks #2561

Closed
jskeet opened this issue Oct 6, 2023 · 10 comments
Closed

[Announcement] Intention to update target frameworks #2561

jskeet opened this issue Oct 6, 2023 · 10 comments
Labels
type: process A process-related concern. May include testing, release, or the like.

Comments

@jskeet
Copy link
Collaborator

jskeet commented Oct 6, 2023

We are planning on opting the libraries in this repository into the Google .NET Support Policy. One of the benefits of this policy is that it provides customers with predictability and confidence in what platforms will be supported over time, while providing the maintainers the opportunity to drop support for obsolete platforms without requiring a major version bump, which would be disruptive to both customers and maintainers.

In early January 2024, we plan to release a new minor version of all the libraries in this repository (both API-specific client libraries and support libraries), with the following targets:

  • net462 (.NET Framework 4.6.2)
  • netstandard2.0 (.NET Standard 2.0)
  • net6.0 (.NET 6.0)

(The one exception to this set of targets is Google.Apis.Auth.AspNetCore3, as described below.)

Older versions of .NET Framework and .NET/.NET Core have been out of mainstream Microsoft support for at least a year.

Auth helper packages

The source code for Google.Apis.Auth.Mvc has been deleted from the repository, but the package has not been delisted. This was a very old package, predating the current maintainers. We don't believe it provides significant value. If customers request that we restore the source code and release new versions, we can certainly do so - but we'd like to discuss it further with such customers to see if we can provide a more useful package.

The project file for Google.Apis.Auth.AspNetCore (sharing most of the same source code as Google.Apis.Auth.AspNetCore3) has been deleted and the package has been delisted on nuget.org. This supported .NET Core 2.1, which has been out of support for a long time.

The Google.Apis.Auth.AspNetCore3 package and source code are still present and will continue to be released for the time being, continuing to target netcoreapp3.0. We expect to create a new package (Google.Apis.Auth.AspNetCore6) targeting net6.0, and potentially another targeting net8.0. We expect to retire Google.Apis.Auth.AspNetCore3 (deleting the source code and delisting the package) in July 2024.

PlatformServices assemblies

As part of the new release, we will remove Google.Apis.PlatformServices from the Google.Apis package, and Google.Apis.Auth.PlatformServices from the Google.Apis.Auth package. Since June 2017, these assemblies have only contained type-forwarding attributes. Strictly speaking, this is a breaking change - but it will only affect users who have an assembly which was built against a version of Google.Apis or Google.Apis.Auth older than 1.26.2, and which refers to types that were previously in a PlatformServices assembly.

We don't expect this to break any customers, due to the long period over which the types have been present in the "main" assemblies. If customers are broken by this, and are unable to rebuild the relevant assemblies against more modern versions, we can reinstate the type forwarding assemblies in another release. (We'd just prefer not to, in order to reduce technical debt and complexity.)

Feedback

We welcome your feedback on this plan. Ultimately we can't maintain packages targeting obsolete frameworks forever, but if there are particular reasons why the plan will cause difficulties for customers, we'd rather hear them ahead of time so we can collaborate on a way forward. Please leave comments below.

A pull request prototyping these changes is available - comments are welcome on that too.

@jskeet jskeet added the type: process A process-related concern. May include testing, release, or the like. label Oct 6, 2023
jskeet added a commit to jskeet/google-api-dotnet-client that referenced this issue Oct 6, 2023
@StasPerekrestov
Copy link

StasPerekrestov commented Oct 6, 2023

Hello @jskeet ,
First, I'm sorry for being slightly off-topic, however, could you shine some light on whether you expect similar target framework changes in https://github.com/googleapis/google-cloud-dotnet? Thanks.

jskeet added a commit that referenced this issue Oct 6, 2023
@jskeet
Copy link
Collaborator Author

jskeet commented Oct 6, 2023

@StasPerekrestov: google-cloud-dotnet platforms are generally driven by gax-dotnet platforms. We aim for a major version every 12-24 months for GAX, and typically update target frameworks on new major versions, but with the new policy we could potentially drop very old frameworks within a major version. At the moment we have no specific plans to drop anything though.

@RusselRillema
Copy link

Once this has been completed, will the following code work when running a C# application on an Android device?

GoogleWebAuthorizationBroker.AuthorizeAsync

For additional information I am using AvaloniaUI. When running the Desktop application this works just fine but when running the Android or Browser project I get the following error

Failed to launch browser with "https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&code_challenge=XXX" for authorization; platform not supported.

@amanda-tarafa
Copy link
Contributor

@RusselRillema no, this works will have no effect on GoogleWebAuthorizationBroker.AuthorizeAsync working or not on Avalonia UI, or any other similar platforms like Xamarin, Unity, etc. Please see Unsupported Frameworks for more information.

@RusselRillema
Copy link

Thanks @amanda-tarafa for the feedback. I did see the unsupported frameworks but Avalonia wasn't explicitly mentioned. Though I did try and it didn't work so I assume it was not supported for similar reasons.

I am not sure if this is an appropriate place to ask, but is there a preferred or advised method of obtaining a UserCredential object, or something similar to what the GoogleWebAuthorizationBroker.AuthorizeAsync returns, when running C# on an Android device?

I am happy to have different sign-in methods across the different platforms but I don't see any samples on how to achieve this on Android using C#.

@amanda-tarafa
Copy link
Contributor

@RusselRillema can you create a separete issue with your question? Thanks.

jskeet added a commit to jskeet/gapic-generator-csharp that referenced this issue Jan 9, 2024
jskeet added a commit to googleapis/gapic-generator-csharp that referenced this issue Jan 9, 2024
amanda-tarafa added a commit that referenced this issue Jan 12, 2024
Features:

- Update to more modern target frameworks. See #2561 for details.
amanda-tarafa added a commit that referenced this issue Jan 12, 2024
Features:

- Update to more modern target frameworks. See #2561 for details.
@iloabn
Copy link

iloabn commented Jan 13, 2024

I think this makes a lot of sense and can't really imagine any negative impact on neither my non-profit or enterprise work 🙂

I did notice that the description includes a link to the closed pr #2530, is the purpose with that to keep it transparent with the history? Or would it make sense to point to the newer #2644? (I got a little confused myself when I saw that it pointed to a closed PR while this issue was still open)

PS. Not used to navigating Google repos so that might just be a pattern/process I'm not used to.

@jskeet
Copy link
Collaborator Author

jskeet commented Jan 13, 2024

We could update it, but I'm expecting we'll close that issue early next week anyway as we complete the process :)

Glad it all makes sense though!

@jskeet
Copy link
Collaborator Author

jskeet commented Jan 15, 2024

Description now updated :)

amanda-tarafa added a commit that referenced this issue Jan 16, 2024
Features:

- Update to more modern target frameworks. See #2561 for details.
amanda-tarafa added a commit that referenced this issue Jan 16, 2024
Features:

- Update to more modern target frameworks. See #2561 for details.
@amanda-tarafa
Copy link
Contributor

We have updated target frameworks as per this announcement.
We have released v1.66.0 of all libraries, which targets the new set of frameworks.

jpassing added a commit to GoogleCloudPlatform/iap-desktop that referenced this issue Jan 19, 2024
* Update managed dependencies (except NUnit, tools)
* Remove PlatformServices DLLs from MSI as per [1]

[1] googleapis/google-api-dotnet-client#2561
jpassing added a commit to GoogleCloudPlatform/iap-desktop that referenced this issue Jan 19, 2024
* Update managed dependencies (except NUnit, tools)
* Remove PlatformServices DLLs from MSI as per [1]

[1] googleapis/google-api-dotnet-client#2561
jpassing added a commit to GoogleCloudPlatform/iap-desktop that referenced this issue Jan 19, 2024
* Update managed dependencies (except NUnit, tools)
* Remove PlatformServices DLLs from MSI as per [1]

[1] googleapis/google-api-dotnet-client#2561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

No branches or pull requests

5 participants