diff options
| author | Leitwolf11 | 2026-11-01 22:16:14 +0300 |
|---|---|---|
| committer | Leitwolf11 | 2026-11-01 22:16:14 +0300 |
| commit | da3c9d0880dbd4a74e0e43f092d10f5ae42c5043 (patch) | |
| tree | 4676a526585dbb0e2f6d8c9c18978ed01092c2e2 /docs | |
| parent | 241b5567d09d59e82bff18287c32ada480deb8c0 (diff) | |
| download | catch3-da3c9d0880dbd4a74e0e43f092d10f5ae42c5043.tar.gz | |
Move the tools from Python to C++17 and Bazel
The scripts in use become programs run with `bazelisk run //tools:<tool>`,
and arguments follow `--`:
amalgamate the single-file distribution; --check only compares it
check licenses, convenience headers, header guards, file names,
versions and whether the distribution is up to date
third-party compares third_party/ with its archives, or writes it
version prints the version, or moves every place that states it
release-notes prints a section of the release notes
repo-info reports the checkout and the tools on PATH; --json writes
it through yyjson, with the fields of Tala's repo-info
amalgamate writes what the Python script wrote, byte for byte, except for
the time of generation. That line is gone so that the output is
deterministic and --check can compare it.
MODULE.bazel now pins the archives of third_party/ by version and sha256,
so Bazel fetches and checks them instead of a tool of ours, and Renovate
reads the versions there.
Scripts nobody used are gone: fixWhitespace, updateDocumentSnippets,
buildAndTest, and updateDocumentToC, which rewrote unrelated documents.
CheckConvenienceHeaders leaves CTest, since //tools:check runs it in CI.
The Python of tests/TestScripts stays: those are tests, not tools.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/contributing.md | 30 | ||||
| -rw-r--r-- | docs/upstream-status.md | 2 |
2 files changed, 23 insertions, 9 deletions
diff --git a/docs/contributing.md b/docs/contributing.md index ecccf68f..ef47d541 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -47,13 +47,28 @@ Meson, Xmake and Premake builds exist as well and are checked in CI. Before you push, run the repository checks: ``` -python tools/scripts/checkLicense.py -python tools/scripts/checkConvenienceHeaders.py -python tools/scripts/checkDuplicateFilenames.py +bazelisk run //tools:check ``` -A change to anything under `src/` also regenerates the single-file -distribution with `python tools/scripts/generateAmalgamatedFiles.py`. +It checks licenses, convenience headers, header guards, file names, that every +place states the same version, and that the single-file distribution is up to +date. A change to anything under `src/` regenerates that distribution: + +``` +bazelisk run //tools:amalgamate +``` + +The tools in `tools/` are C++17 and run through Bazel, with arguments after +`--`: + +| Tool | Does | +| --- | --- | +| `//tools:amalgamate` | writes the single-file distribution; `-- --check` only compares it | +| `//tools:check` | runs the repository checks | +| `//tools:third-party` | `-- --check` compares `third_party/` with the archives `MODULE.bazel` pins, `-- --update` writes it | +| `//tools:version` | prints the version; `-- --next` or `-- <version>` moves every place that states it, and the distribution | +| `//tools:release-notes` | prints a section of the release notes, of `-- <version>` or the current one | +| `//tools:repo-info` | reports the checkout and the tools on `PATH`; `-- --json` writes it as JSON | ## Two parts, two sets of rules @@ -71,8 +86,7 @@ AdditionRef-Progmasoft-Exception-2.0`, follows the C++17, reports recoverable errors with `Expected` rather than exceptions, and is formatted with the `.clang-format` beside it. -`tools/scripts/checkLicense.py` checks that every source file carries the -header of its part. +`//tools:check` checks that every source file carries the header of its part. ## Tests @@ -88,7 +102,7 @@ comes with a test that fails without it. User documentation lives in `docs/`. A new page is linked from [the documentation index](Readme.md#top), and a page with sections gets a table -of contents; `python tools/scripts/updateDocumentToC.py` keeps them current. +of contents. A user-visible change gets a line in [the release notes](release-notes.md#top). diff --git a/docs/upstream-status.md b/docs/upstream-status.md index 0899e31d..93483fb3 100644 --- a/docs/upstream-status.md +++ b/docs/upstream-status.md @@ -36,7 +36,7 @@ backported, in upstream order, and the compatibility engine is now 3.16.1: Each applied without a conflict in the sources. The amalgamated distribution under `extras/` did conflict, because it is generated; it was generated again -from the sources of this repository with `generateAmalgamatedFiles.py`, which +from the sources of this repository with `//tools:amalgamate`, which also brought it up to date with fork changes it had not yet picked up. No fork-owned file under `src/Progmasoft` needed a change. |