Package closure and validation
The shipped packages are Devolutions.Ahtola.Core,
Devolutions.Ahtola.Data.Sqlite, and
Devolutions.Ahtola.EntityFrameworkCore.Sqlite. Package layout is
intentional and enforced by two gates.
The embedding: Ahtola.Data is not a standalone package
Ahtola.Data (ADO.NET core, provider dispatch, Hrana remote client) has
IsPackable=false. It is embedded into Devolutions.Ahtola.Data.Sqlite
via an AddProjectReferencesToPackage BuildOutputInPackage target — its
output is compiled into the shipped provider nupkg. Consequences:
- Do not turn
Ahtola.Datainto its own nupkg. - Anything
Ahtola.Datareferences ends up in the shipped provider, so it must be pure-managed and AOT/trim-clean (seepure-managed-closureandnativeaot-trim-safe). - Do not add a
PackageReferencetoAhtola.Datafrom a consumer; depend onDevolutions.Ahtola.Data.Sqlite.
EF Core version constraint
Directory.Build.props centralizes:
$(AhtolaEntityFrameworkCoreVersion)=10.0.10on net10.0 /9.0.9elsewhere$(AhtolaEntityFrameworkCoreVersionRange)=[10.0.0,11.0.0)on net10.0 /[9.0.9,10.0.0)on net8.0/net9.0
The closure validator enforces that
Devolutions.Ahtola.EntityFrameworkCore.Sqlite declares exactly one
Microsoft.EntityFrameworkCore.Sqlite.Core dependency per framework with the
matching range. If you bump EF Core, update the props and the validator's
expectation together in one change.
The gates
./build.ps1 validate-package # pack + consumer restore/build/run/publish across net8/9/10
./build.ps1 validate-project-closure # regex-scan project files for native/Rust refs
./build.ps1 validate-packed-closure # validate built .nupkg contents/assets/publish
validate-project-closure runs Assert-ManagedProjectClosure (project-file
scan). validate-packed-closure runs
scripts/Validate-ManagedPackageClosure.ps1 against built .nupkg entries,
project.assets.json, and publish output — catching native
runtimes//native/ assets that slip in transitively.
Rules
- Keep
IsPackable=falseonAhtola.Data. If you think it should ship standalone, that is a design change — discuss first. - Don't add
Content/Noneincludes that pullruntimes/<rid>/native/assets or theturso-src/submodule into a shipped project. - The packaged-consumer gate
samples/ManagedPackageConsumerexercises the real nupkg restore/build/run/publish path — don't bypass it by testing only project references.