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

feat: Added initial Trimming support. #21

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

Conversation

HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Jun 7, 2024

Closes #20

But because preview version of System.Memory.Data does not explicitly support net6.0, this warning appears here

0>System.Text.Encodings.Web.targets(4,5): Warning  : System.Text.Encodings.Web 9.0.0-preview.4.24266.19 doesn't support net6.0 and has not been tested with it. Consider upgrading your TargetFramework to net8.0 or later. You may also set <SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings> in the project file to ignore this warning and attempt to run in this unsupported configuration at your own risk.
0>Microsoft.Bcl.AsyncInterfaces.targets(4,5): Warning  : Microsoft.Bcl.AsyncInterfaces 9.0.0-preview.4.24266.19 doesn't support net6.0 and has not been tested with it. Consider upgrading your TargetFramework to net8.0 or later. You may also set <SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings> in the project file to ignore this warning and attempt to run in this unsupported configuration at your own risk.
0>System.Text.Json.targets(4,5): Warning  : System.Text.Json 9.0.0-preview.4.24266.19 doesn't support net6.0 and has not been tested with it. Consider upgrading your TargetFramework to net8.0 or later. You may also set <SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings> in the project file to ignore this warning and attempt to run in this unsupported configuration at your own risk.
0>System.Memory.Data.targets(4,5): Warning  : System.Memory.Data 9.0.0-preview.4.24266.19 doesn't support net6.0 and has not been tested with it. Consider upgrading your TargetFramework to net8.0 or later. You may also set <SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings> in the project file to ignore this warning and attempt to run in this unsupported configuration at your own risk.

There are two ways out:

  • Ignore, this can work without problems
  • Add #ifdef/ MSBuild Conditions to use old behavior for net6 and new for net8/netstandard

I'm waiting for feedback

@HavenDV HavenDV marked this pull request as ready for review June 7, 2024 07:40
Copy link
Collaborator

@KrzysztofCwalina KrzysztofCwalina left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! The core fixes look good! I just have a question and a change request I commented inline in the sources.

OpenAI.sln Outdated Show resolved Hide resolved
src/OpenAI.csproj Outdated Show resolved Hide resolved
src/OpenAI.csproj Outdated Show resolved Hide resolved
@jcoc611-microsoft
Copy link

@HavenDV @KrzysztofCwalina any chance we could revive this PR and merge it in? would be super useful to get NAOT support (plus source generated JSON parsing would likely be more efficient than reflection)

@KrzysztofCwalina
Copy link
Collaborator

@HavenDV @KrzysztofCwalina any chance we could revive this PR and merge it in? would be super useful to get NAOT support (plus source generated JSON parsing would likely be more efficient than reflection)

Once you remove the trimming helper, I can unblock this PR.

# Conflicts:
#	OpenAI.sln
#	src/Custom/Common/InternalListHelpers.cs
#	src/Custom/OpenAIModelFactory.cs
#	src/OpenAI.csproj
@HavenDV
Copy link
Contributor Author

HavenDV commented Nov 15, 2024

@HavenDV @KrzysztofCwalina any chance we could revive this PR and merge it in? would be super useful to get NAOT support (plus source generated JSON parsing would likely be more efficient than reflection)

Once you remove the trimming helper, I can unblock this PR.

It has been removed

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.

Trimming/NativeAOT support
5 participants