Skip to content

Add Documentation/MacTestEnv/ — macOS contributor dev/test environment#2334

Merged
JFriel merged 1 commit into
HicServices:developfrom
mtinti:docs/mac-test-env
May 22, 2026
Merged

Add Documentation/MacTestEnv/ — macOS contributor dev/test environment#2334
JFriel merged 1 commit into
HicServices:developfrom
mtinti:docs/mac-test-env

Conversation

@mtinti
Copy link
Copy Markdown
Contributor

@mtinti mtinti commented May 20, 2026

Proposed Change

A self-contained Docker-based dev/test environment for macOS contributors. Purely additive; no upstream files touched.

Documentation/MacTestEnv/
├── README.md            Walkthrough + 'Building a Windows binary from Mac' section
├── docker-compose.yml   SQL Server 2022 Developer, linux/amd64 under Rosetta on Apple Silicon
├── setup.sh             One-shot: start container, build rdmp CLI, create TEST_* DBs, install TestDatabases.txt
├── teardown.sh          Stop container; --purge wipes the data volume
├── run-tests.sh         Wrapper around `dotnet test` with the warnings-as-errors workaround
└── TestDatabases.txt    Mac-flavoured: localhost,1433 + sa (replaces (localdb)\MSSQLLocalDB)

Verified end-to-end on darwin/arm64, .NET SDK 10.0.107, Docker 28.x — Rdmp.Core.Tests --filter "FullyQualifiedName~CohortCreation" returns 102/102 passed in ~3 minutes under amd64 emulation.

The README also documents the cross-compile recipe for both the GUI and the CLI, including first-run notes for Windows (SmartScreen, Unblock).

Companion fix

This folder pairs with PR #2330 (KeywordHelp parser line endings). Without that fix, a binary cross-compiled on macOS via the recipe documented in this folder crashes on first launch on Windows. The two changes are independently mergeable but produce a complete contributor workflow when both land.

Reviewer notes

  • No behavioural change for end users. Purely additive contributor tooling.
  • One latent papercut left untouched: Rdmp.Core/Rdmp.Core.csproj line 20 overrides the inherited <NoWarn> instead of appending to it, which surfaces NU1902;NU1903;NU1904 as build errors when any vulnerable transitive package is resolved. The scripts side-step it on the command line (-p:WarningsNotAsErrors='"NU1902;NU1903;NU1904"'). Happy to ship a one-line .csproj fix as a follow-up if preferred.

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation-Only Update
  • Other (if none of the other choices apply) — contributor tooling

Checklist

By opening this PR, I confirm that I have:

  • Ensured that the PR branch is in sync with the target branch (i.e. it is automatically merge-able) — branched off latest origin/develop (a53edfd24).
  • Created or updated any tests if relevant — N/A, no production code change.
  • Have validated this change against the Test Plan — migration / performance / release-testing sections don't apply. The "new functionality" questions are addressed above (no GUI/CLI functionality changes, only contributor documentation).
  • Requested a review by one of the repository maintainers
  • Have written new documentation or updated existing documentation to detail any new or updated functionality and how to use it — Documentation/MacTestEnv/README.md, ~290 lines: walkthrough, daily commands, Windows cross-compile recipe, credentials, known issues, troubleshooting.
  • Have added an entry into the changelog

… macOS

Bootstraps a working Rdmp.Core.Tests environment on macOS (Apple Silicon
or Intel) using Docker.  The DB-backed tests need a real SQL Server
instance; this folder spins one up in a container, creates the four
platform databases the tests expect, and points the test runner at it.

Contents:

  README.md           Full setup walkthrough + 'Building a Windows binary
                      from Mac' section (cross-compile recipe + first-run
                      notes).  Pairs with the companion KeywordHelp
                      line-endings fix on this branch.
  docker-compose.yml  SQL Server 2022 Developer container, linux/amd64
                      under Rosetta on Apple Silicon, mssql-data volume
                      for persistence between sessions.
  setup.sh            One-shot bootstrap: starts the container, builds
                      the rdmp CLI, creates TEST_* platform databases,
                      installs TestDatabases.txt.
  teardown.sh         Stops the container, restores
                      Tests.Common/TestDatabases.txt.  --purge removes
                      the data volume too.
  run-tests.sh        Thin wrapper around 'dotnet test' that adds the
                      NU1902/NU1903/NU1904 warnings-as-errors workaround
                      Rdmp.Core.csproj currently needs.
  TestDatabases.txt   Mac-flavoured config that setup.sh copies into
                      Tests.Common/; uses localhost,1433 + sa instead of
                      (localdb)\\MSSQLLocalDB + integrated security.

Folder name matches the PascalCase convention used by sibling docs
(Catalogues, CodeTutorials, DataExtractions, LoadModules, ...).

Status: verified end-to-end on darwin/arm64, .NET SDK 10.0.107,
Docker 28.x.  All 102 CohortCreation tests pass in ~3 minutes under
amd64 emulation.

Purely additive — no edits to upstream project files.  The
warnings-as-errors workaround sidesteps a project-level NoWarn override
in Rdmp.Core.csproj (see README "Known issues") without touching it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@JFriel JFriel merged commit 17c8367 into HicServices:develop May 22, 2026
3 checks passed
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.

2 participants