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 net6.0 multitarget for improved compatibility #98

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

trrwilson
Copy link
Collaborator

As described at:
Azure/azure-sdk-for-net#44709

These problems are specific to using the OpenAI library via an intermediate class library targeting netstandard2.0; in that case, the multi-target is causing the executing project to pick up the uplevel framework target that's incompatible with downlevel intermediate library.

Although there may be other approaches to mitigate, it seems reasonable to not expressly multi-target net6.0 if netstandard2.0 is sufficient.

@@ -7,7 +7,7 @@
<VersionPrefix>2.0.0</VersionPrefix>
<VersionSuffix>beta.7</VersionSuffix>

<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this target 8.0 instead?

@@ -7,7 +7,7 @@
<VersionPrefix>2.0.0</VersionPrefix>
<VersionSuffix>beta.7</VersionSuffix>

<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
Copy link
Contributor

Choose a reason for hiding this comment

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

This may cause issues with sync-over-async in the SCM pipeline, which relies on newer net6.0 sync APIs being available for HttpClient APIs to avoid sync-over-async for the majority case. Removing this target would require sync-over-async for all sync HttpClient calls.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we will start doing sync over async, unless this OpenAI dll calls the sync HTTP APIs directly. The System.ClientModel implementation (6+ or NS2) is picked based on the runtime of the program, not based on framework target of OpenAI. @ericstj, could you confirm or deny?

Copy link
Collaborator

@KrzysztofCwalina KrzysztofCwalina Aug 7, 2024

Choose a reason for hiding this comment

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

Having said that, I don't think we should be removing NETx target. I think we should always cross target to the latest LTS target.

@joy-sarkar-bain
Copy link

Hello all,

Is there any likelihood of this PR being merged? The targeting issue seems to be a blocker for me; if there is some resolution (either via this PR or some other method?), it might unlock a lot of use cases.

Thanks in advance
JS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants