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

update Dapper and enable Dapper.AOT #1930

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

update Dapper and enable Dapper.AOT #1930

wants to merge 3 commits into from

Conversation

mgravell
Copy link
Contributor

@mgravell mgravell commented Nov 15, 2023

With .NET 8 shipped, Dapper.AOT can also ship, yay!

This change:

  • updates the Dapper package (although I believe it won't actually be used any more, although I haven't checked the outputs)
  • adds the Dapper.AOT package which contains generator support and a small runtime library akin to Dapper (no ref-emit)
  • adds [DapperAot] usage to enable the generator (this step is opt-in)
    • explicitly turns AOT in one broken scenario (will fix external lib ASAP)
  • adds [CacheCommand] usage to allow DbCommand reuse
  • enables interceptor support in the build SDK
  • suppresses a warning about a particular usage (alternative options cited in comments, but left "as is" for comparison purposes)

@DamianEdwards
Copy link
Member

Wondering if there's any value in keeping both Dapper and Dapper.AOT and testing them both? Or do you think we should just move to Dapper.AOT now?

@mgravell
Copy link
Contributor Author

@DamianEdwards interesting question; I'm happy with either; I need to remember how to kick off test runs against branches - the data might help steer us there, although if it is useful I'm fine with keeping both - it just might complicate reporting

@DamianEdwards
Copy link
Member

Perhaps for now we set the projects up to enable/disable Dapper.AOT via an MSBuild property that guards a compiler directive (#ifdef) even if just continue to report on one variant for now, we can do ad-hoc runs against either to compare? TBC I'm only talking about the benchmarks that aren't currently actually publishing native AOT. Our native AOT benchmarks should get new Dapper.AOT variants that we track.

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.

None yet

2 participants