Repository navigation
Source generator: ships in the Core package, on by default - #267
Merged
Merged
Conversation
The `Map<T>()` source generator is now part of `Open.Database.Extensions.Core`: the analyzer, built for Roslyn 4.14 or later so an older compiler never loads it, and the build targets that allow its interceptors. The other packages pass both on to their consumers. `<OdxGenerateMaps>false</OdxGenerateMaps>` switches it off, and holds even where the compiler does not receive the property. A partial model (or one with a partial base type) is checked once against the built type: if another source generator added constructors or settable properties this one could not see, the runtime map reads it, so no column is left unset. Fixed before it ships: on machines whose culture writes a minus sign C# does not read (Swedish, Norwegian, Persian and others), the generated file did not compile. A new test project references only the packed packages and runs the generator on, through MSSqlClient alone, switched off, and on C# 12, for net472, net10.0 and net11.0, against SQL Server LocalDB and a SQLite file. The generator CI job starts LocalDB, requires it, and runs those tests. Also adds tests for more declined and served model shapes. Documentation: a "Generated readers" section in the mapping article, the Core and generator READMEs, and a release note. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
electricessence
force-pushed
the
feat/generator-in-core
branch
from
November 30, 2026 21:43
54dd1ff to
3a2fbd1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Map<T>()source generator is now part ofOpen.Database.Extensions.Core:the analyzer, built for Roslyn 4.14 or later so an older compiler never loads
it, and the build targets that allow its interceptors. The other packages pass
both on to their consumers.
<OdxGenerateMaps>false</OdxGenerateMaps>switchesit off, and holds even where the compiler does not receive the property.
A partial model (or one with a partial base type) is checked once against the
built type: if another source generator added constructors or settable
properties this one could not see, the runtime map reads it, so no column is
left unset.
Fixed before it ships: on machines whose culture writes a minus sign C# does not
read (Swedish, Norwegian, Persian and others), the generated file did not
compile.
A new test project references only the packed packages and runs the generator
on, through MSSqlClient alone, switched off, and on C# 12, for net472, net10.0
and net11.0, against SQL Server LocalDB and a SQLite file. The generator CI job
starts LocalDB, requires it, and runs those tests. Also adds tests for more
declined and served model shapes.
Documentation: a "Generated readers" section in the mapping article, the Core
and generator READMEs, and a release note.
🤖 Generated with Claude Code