Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ dotnet test test/SchemaKit.ApiProbes/SchemaKit.ApiProbes.csproj
# The consumer smoke test, on the server SCHEMAKIT_TEST_PG names; a folder of .nupkg as the argument tests those
SCHEMAKIT_TEST_PG="Host=localhost;Username=postgres;Password=…;Database=postgres" test/ConsumerSmokeTest/run.sh

# The same with the consumer on another EF Core than the packages reference (NU1608 where a package pins it)
SMOKE_EF_VERSION=11.0.0 SCHEMAKIT_TEST_PG="…" test/ConsumerSmokeTest/run.sh

# Spike B, the first version of the consumer smoke test; SPIKE_PG turns on the PostgreSQL paths
spikes/B.DesignTime/run.sh

Expand Down Expand Up @@ -533,6 +536,10 @@ Npgsql EF `11.0.0-rc.3` depends on EF Core `[11.0.0-rc.3.26522.148]`, exactly. E
in the repository stays on rc.3 until Npgsql ships 11.0.0, although EF Core 11.0.0 is out. A stable
package cannot depend on a prerelease, so SchemaKit ships previews until then.

A consumer that references EF Core 11.0.0 directly gets NU1608 for Npgsql's pin and a build. The
smoke test passed every row that way on 2026-11-14 (`SMOKE_EF_VERSION=11.0.0`, PostgreSQL 18.4,
#143): it says such a consumer works, not that the pins may move.

The probes drive Roslyn `5.12.0-1.26504.105` from the dotnet-tools feed
(`test/SchemaKit.ApiProbes/nuget.config` says why).

Expand Down
22 changes: 22 additions & 0 deletions test/ConsumerSmokeTest/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,19 @@ npgsql_ef_version=$(dependency "$pg_package" Npgsql.EntityFrameworkCore.PostgreS
[[ -n $ef_version && -n $npgsql_ef_version ]] || { log=; fail "the packages" "cannot read EF Core's and Npgsql EF's versions from the nuspecs"; }
echo " EF Core $ef_version, Npgsql EF $npgsql_ef_version"

# SMOKE_EF_VERSION: the consumer on another EF Core than the packages were built with, as one is
# that references EF Core directly. Every consumer then references
# Microsoft.EntityFrameworkCore.Relational at that version, and the design package, the host and
# dotnet-ef follow it. Where a package pins EF Core exactly, as a prerelease of Npgsql EF does,
# NuGet answers with NU1608 and builds: the run then says what such a consumer gets, not that the
# packages may reference that version.
ef_direct=
if [[ -n ${SMOKE_EF_VERSION:-} && $SMOKE_EF_VERSION != "$ef_version" ]]; then
echo " the consumer references EF Core $SMOKE_EF_VERSION directly, over the packages' $ef_version"
ef_version=$SMOKE_EF_VERSION
ef_direct="<ItemGroup Condition=\"'\$(MSBuildProjectName)' != 'Judge'\"><PackageReference Include=\"Microsoft.EntityFrameworkCore.Relational\" Version=\"$ef_version\" /></ItemGroup>"
fi

# From here on, nothing restores into the machine's package folder.
export NUGET_PACKAGES=$work/packages

Expand Down Expand Up @@ -224,6 +237,7 @@ write_props() { # Npgsql's version, once the consumer has restored it
<NpgsqlEfVersion>$npgsql_ef_version</NpgsqlEfVersion>
<NpgsqlVersion>$1</NpgsqlVersion>
</PropertyGroup>
$ef_direct
</Project>
EOF
}
Expand All @@ -242,6 +256,14 @@ else
fail "restore" "the consumer did not restore $version from $feed (found: ${restored:-nothing})"
fi

if [[ -n $ef_direct ]]; then
if has "$work/App/obj/project.assets.json" "\"Microsoft.EntityFrameworkCore.Relational/$ef_version\"" "\"Microsoft.EntityFrameworkCore/$ef_version\""; then
ok "EF Core $ef_version" "the consumer resolved it, over the version the packages reference"
else
fail "EF Core $ef_version" "the consumer did not resolve EF Core $ef_version"
fi
fi

# The judge takes the Npgsql the consumer took.
npgsql_version=$(find "$NUGET_PACKAGES/npgsql" -maxdepth 1 -mindepth 1 -type d -exec basename {} \; | sort -V | tail -n 1)
write_props "$npgsql_version"
Expand Down
Loading