Drop the unread has_test_files key from build.toml - #88
Merged
Conversation
Nothing reads it. No generator, template, or doc in xmsconan references the key, and the `has_test_files` identifiers in `build_tools/build_library.py` are a local variable derived from the `--test_files` CLI flag, unrelated to build.toml. `extra_export_sources = ["test_files"]` is what actually exports the directory, and that stays. It has to go before the next xmsconan release. That release adds a top-level key whitelist to `xmsconan gen`, `xmsconan ci` and `xmsconan profiles` -- until now a misspelled key had no symptom at all, because the generators read this file with `setdefault`/`get`, so the default was kept and the generated artifact quietly was not what the file asked for. With the whitelist in place this key stops the Generate step, and xmsmesher is the only consumer carrying one: the other six build.toml files pass as they stand. No behavior change today. Rendering build.py, conanfile.py, CMakeLists.txt, .flake8 and pytest.ini from this file with the currently released xmsconan, before and after the deletion, gives byte-identical output.
Deleting has_test_files (previous commit) is what lets `xmsconan_gen` run
at all under 2.23.0, but it does not fix the four Debug legs. The
`--wheel-dir wheelhouse` that build.py exits 1 on lives in this committed
workflow, not in anything the Generate step regenerates, so the fix only
arrives by regenerating the workflow itself.
The build step now asks for a wheel only where one is published:
${{ matrix.build_type == 'Release' && ' --wheel-dir wheelhouse' || '' }}
matching the gate repair, artifact upload, and devpi deploy already carry.
[matrix].pybind_build_types defaults to Release, so a Debug leg has no
pybind configuration to extract a wheel from and was failing for doing
exactly what it was configured to do.
Carried along by the same regeneration, all from xmsconan 2.18.0 -> 2.23.0
template changes this repo had not picked up:
- flake8-tidy-imports on the flake job. It registers `banned-modules`,
which the .flake8 generated two steps later sets to osgeo.*; without the
plugin flake8 accepted the option and enforced nothing while reporting
green.
- Seven third-party actions pinned to commit SHAs, tag kept in a trailing
comment. setup-python on the flake job moves v2 -> v5.
- The Linux container image and PYTHON_TARGET_VERSION read from
matrix.python-version instead of a hardcoded 3.13. Same values for this
repo's single-version Linux matrix.
- xmsconan floor 2.18.0 -> 2.23.0.
DESIGN: regenerate the committed workflow so the wheel request is gated to
the Release leg, since that flag is not something the Generate step can fix.
EVIDENCE: $ xmsconan gen/ci/profiles against this build.toml -> rc=0, 0, 0;
the rendered YAML parses (jobs: flake, mac, linux, windows); the Release
gate is on all 3 build steps and no ungated --wheel-dir remains.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deletes
has_test_files = truefrombuild.toml. One line, no behavior changetoday, and a prerequisite for the next xmsconan release.
Why it is unread
has_test_filesidentifiers in xmsconan'sbuild_tools/build_library.py:341-355are a local variable derived fromthe
--test_filesCLI flag. That code never readstoml_data.extra_export_sources = ["test_files"](build.toml:20-22) is what actuallyexports the directory. It is untouched.
Why it has to go now
The next xmsconan release (Aquaveo/xmsconan#112) adds a top-level key whitelist
to
xmsconan gen,xmsconan ciandxmsconan profiles. Until now a misspelledbuild.toml key had no symptom at all — the generators read the file with
setdefault/get, so the default was kept and the generated artifact quietlywas not what the file asked for. With the whitelist in place, this key stops the
Generate step.
xmsmesher is the only consumer carrying an unknown key. Running the new
validator over all seven:
This repo installs
xmsconan>=2.12.2 --upgrade, so that release arrives on thenext CI run after it publishes. This PR needs to merge before then.
Verification
build.py,conanfile.py,CMakeLists.txt,.flake8andpytest.inirendered from both versions with the currently released xmsconan are
byte-identical, so nothing changes for builds running today.
Both run against the xmsconan#112 branch, confirming the file passes the
incoming whitelist.
flake8 is unaffected: the diff is
build.tomlonly, and no Python file changed.Doc impact
None.
has_test_filesappears in no README, doc, or workflow in this repo —build.tomlwas its only mention.