Notes for working on this repo.
- .NET SDK 10 or newer
- PowerShell 5.1+ on Windows; PowerShell 7+ on Linux/macOS (install: https://learn.microsoft.com/powershell/scripting/install/installing-powershell). The build scripts (
build/pack-dev.ps1,build/pack-release.ps1) are pwsh-only.
The dev workflow assumes you have this repo cloned alongside its sibling repos (most importantly Rezoom) under a common parent directory. The parent's name doesn't matter, but the siblings need to be together.
my-rezoom-source-code/
.localfeed/ (NuGet feed for in-progress dev packages)
NuGet.config (configures .localfeed as a package source)
Rezoom/
Rezoom.SQL/ (this repo)
FParsec-Pipes/
LicenseToCIL/
You need a NuGet.config at the parent level so package restore finds
.localfeed ahead of nuget.org:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="local" value=".localfeed" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>If you're only working on Rezoom.SQL and don't need to iterate on Rezoom,
you can use the latest published Rezoom from nuget.org. If you're changing
both, pack Rezoom into the same .localfeed first using whatever script that
repo provides.
Rezoom.SQL has two artifacts that interact awkwardly during dev:
-
The type provider (
Rezoom.SQL.Provider) is loaded byfscat compile time, not at the consumer's runtime. To test a TP change, a project has to reference a NuGet-installed version of the provider, not a project-reference to its source. (Project references don't trigger the same TP loading path.) -
The TP user smoke tests (in
src/TypeProviderUsers/) exercise the TP exactly the way a consumer would — theyPackageReferencethe wrapper meta-packages (e.g.Rezoom.SQL.Provider.SQLite) which transitively bring inRezoom.SQL.Provider. So testing a TP change means packing your changes, then letting the TPUs restore the new package and rebuild.
The local feed + version-bump dance encodes this. Run build/pack-dev.ps1
after a Provider change; the TPUs (and any consumer in the repo) automatically
restore the new version on their next build.
All Rezoom.SQL packages share a single version. Two files compose it:
version.props(committed):RezoomSqlVersion = 0.13.0, represents the upcoming or current release version. Bumped only at actual releases.version.local.props(gitignored): written bypack-dev.ps1, containsRezoomSqlVersionSuffix = dev.N. The combined version becomes0.13.0-dev.N. Bumped extremely frequently during development, every time we have to smoke-test the TPUs.
Every package and consumer reads these via Directory.Build.props. Wrapper
csprojs and TPU / demo fsprojs reference our packages as
Version="$(RezoomSqlPkgVersion)", which resolves to the current dev or
release version automatically.
Bumps the dev counter (one above the highest existing prerelease in the local
feed), writes version.local.props, packs all six packages. Run after any
change you want the TPUs or demos to see.
./build/pack-dev.ps1Deletes version.local.props so the build has no prerelease suffix, then
packs all six packages at the release version. Errors out if the working
tree is dirty (override with -Force). After it succeeds, tag and push:
./build/pack-release.ps1
git tag v1.0.0
git push origin v1.0.0Drop the .nupkgs into wherever your nuget.org push lives.
Packs the three parent libs (FParsec-Pipes, LicenseToCIL, Rezoom) from their sibling repos at the versions declared in each fsproj. Use this when you've edited a parent and want Rezoom.SQL to pick up the fresh bits.
./build/pack-parents.ps1 # all three
./build/pack-parents.ps1 -Only Rezoom # one at a timeThe parents don't participate in the centralized version.props mechanism
(they change rarely; their versions are bumped manually). If you're
publishing parent changes, bump the parent's <Version> first, then run
this script.
Rewrites the breadcrumb + prev/next nav blocks at the top and bottom of
every doc page listed in SUMMARY.md. Run after editing SUMMARY.md
(adding pages, reordering, renaming) to bring all nav links back into sync.
./build/regen-doc-nav.ps1Each rewritten block is fenced by HTML comment markers (<!-- nav-top --> /
<!-- nav-bottom -->) so the script can rerun cleanly.
Runs dotnet test on both TPU projects. SQLite can make its own DB file, but Postgres auto-
skips when no server is reachable. Either set up your local Postgres like mine, with an
rz user and password testtest, or use REZOOM_TPU_POSTGRES to override the
connection string.
The TPUs reference the wrapper packages via NuGet, not via project reference.
Putting them in the same sln as Rezoom.SQL.Provider is confusing: opening
the sln in VS suggests project-ref semantics, but the TPUs actually consume
whatever's currently packed into .localfeed. Changing Provider source
without running pack-dev.ps1 would silently leave the TPUs on the old
version.
They live as standalone fsprojs under src/TypeProviderUsers/. Open them
individually (or via the test runner script) when you need to verify TP
behavior end-to-end.
- Edit something in
src/Rezoom.SQL.Provider/,Rezoom.SQL.Compiler/, orRezoom.SQL.Mapping/. - Run
./build/pack-dev.ps1. New version is0.13.0-dev.<N+1>. - Run
./src/TypeProviderUsers/test-tp-users.ps1(ordotnet testthe specific one you care about). Restore picks up the new dev version automatically. - Iterate.
If something doesn't update as expected, the usual suspect is a stale entry
in ~/.nuget/packages/<pkg>/<version>/. pack-dev.ps1 clears those for the
version it's about to publish, but if you manually pack something else into
the feed, you may need to clear by hand.
- Update
RezoomSqlVersioninversion.propsfor the new release. - Update
<PackageReleaseNotes>in the relevant csprojs/fsprojs. - Update
CHANGELOG.md(when one exists) and any docs that mention versions. - Commit. Working tree should be clean.
- Run
./build/pack-release.ps1. Verify the resulting.nupkgs in the feed. - Push to nuget.org via your usual mechanism.
- Tag
v<version>and push the tag.