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

NativeAOT support: get to zero warnings #1947

Open
roji opened this issue Mar 7, 2023 · 8 comments
Open

NativeAOT support: get to zero warnings #1947

roji opened this issue Mar 7, 2023 · 8 comments
Labels
🙌 Up-for-Grabs Issues that are ready to be picked up for anyone interested. Please self-assign and remove the label

Comments

@roji
Copy link
Member

roji commented Mar 7, 2023

Right now, when publishing a NativeAOT app using SqlClient, many warnings are emitted. To properly support NativeAOT, SqlClient will need to get to a place where no warnings are emitted, so the user can be 100% confident that the application will function correctly.

Note that this is related, but not the same as #1942, which is about reducing the binary size. However, the same technique can be used for both: if an entry point (e.g. slim data source builder) is introduced, which by default doesn't include functionality that is large and/or unsafe for NativeAOT, then programs not explicitly bringing in that functionality won't get warnings etc.

@kant2002
Copy link
Contributor

kant2002 commented Mar 7, 2023

I add project settings to be enable trimming analysis here #1943 , That allow bookkeeping warnings which should be fixed.

@lcheunglci lcheunglci added the 🆕 Triage Needed For new issues, not triaged yet. label Mar 8, 2023
@lcheunglci lcheunglci added 🙌 Up-for-Grabs Issues that are ready to be picked up for anyone interested. Please self-assign and remove the label and removed 🆕 Triage Needed For new issues, not triaged yet. labels Mar 14, 2023
@lozn00
Copy link

lozn00 commented May 20, 2023

This error did not appear before, is it a compatibility issue with different 7.0 versions of aot? I plan to downgrade, but uninstalling directly is difficult to downgrade @jkotas

@lozn00
Copy link

lozn00 commented May 20, 2023

I tried uninstalling the application using aspnetcore-runtime-7.0.5-win-x64 dotnet-sdk-7.0.302-win-x64 (1) or after the window->installed application was uninstalled,
I still see 7.0.5 when using dotnet --info, this 7.0.5 is buggy, bug A type initializer threw an exception home computer uses 7.0.4 to test sql The client library is normal.

So, I directly used dotnet --info to get the 7.0.5 folder, and directly brute-deleted it, but got other headaches
fatal error LNK1123: 转换到 COFF 期间失败

I also upgraded to net 8.0 but also got some bugs that frustrated me very much
System.MissingMethodException

Before I reinstalled the computer, my source code worked, I reinstalled the computer, the version of the computer was .net 7.0.5 Therefore, I think that I was able to work properly because I used an old version of .NET 7.0

@steveberdy
Copy link

@roji @jkotas I'd like to take a stab at this if you could assign it to me.

@roji
Copy link
Member Author

roji commented Dec 6, 2024

@steveberdy this is SqlClient - neither @jkotas nor myself are owners/maintainers in this repo. I highly suggested first discussing the plan around this with the SqlClient owners and proceeding step-by-step.

@steveberdy
Copy link

Thanks, sorry about that. @cheenamalhotra are you a code owner? It looks like you have approved and merged PRs. If so, it'd be great if we could have a discussion on implementing AOT compatibility

@cheenamalhotra
Copy link
Member

Hi @steveberdy

Yes, I am one of the engineers on the team. I noticed your #2742 (comment) as well, did you want to propose the changes to Active Directory Auth provider as you mentioned here? Let us know your thoughts, and we're here to review and support.

@steveberdy
Copy link

steveberdy commented Dec 6, 2024

@cheenamalhotra I'd be happy to! I'm working on the changes, and I'm setting up AOT-compatibility, trim warnings, etc. I'll make a PR. If there are any trim or AOT issues, I'd be happy to check them out as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙌 Up-for-Grabs Issues that are ready to be picked up for anyone interested. Please self-assign and remove the label
Projects
None yet
Development

No branches or pull requests

6 participants