Detect generating into output from a different nunavut or support version (all languages)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 32/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- build-system, developer-experience
Research direction
Start by reading the design discussion for #403, especially condition C6, and trace how Nunavut records generator and support versions for C, C++, and Python outputs. Identify the output-directory generation entry points and tests for each target language. Done means generation detects only unambiguous version differences, emits a warning with an option to treat it as an error, and has coverage across all target languages.
Written by the indexing model from the issue text.
Description
Summary
Nunavut doesn't notice when it generates into an output directory holding files from a different nunavut version (or a different support-library version). The output directory then mixes code from two generator versions. Nothing reports it at generation time, in any language.
Today
| Language | What's recorded | What's checked |
|---|---|---|
| C | // Generator: nunavut-<version> comment in each header |
Nothing |
| C++ | Generator version and Support Version comments in each header |
Nothing |
| Python | nunavut_support.API_VERSION in the support module |
Each generated module checks the support major API version when imported, at runtime, not at generation time |
nunavut_support.py (and the C/C++ support headers) are rewritten by every run, so a newer run can update the support code under modules generated by an older one.
Proposal
Make "this output directory contains output from a different nunavut or support version" a detectable condition at generation time, consistently for every target language:
- Record the generator and support versions in a form nunavut can read back. That could be per generated file, or wherever #403's namespace manifest ends up.
- When generating into an output directory with a different recorded version, emit a warning. Make it available as an error too (for example via an option) for builds that want to refuse.
Detection should follow the rule being adopted for #403: report a condition only when it can be determined unambiguously from what nunavut itself recorded.
Context
This came out of the design discussion for #403 (condition C6). It was decided there that a version difference is not a conflict for #403's append-only namespace merging, and that this enhancement doesn't block #403.
- Dominant language
- Python
- Stars
- 48
- Forks
- 26
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 9
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenCyphal/nunavut
-
build and test dependencies
Difficulty 4/5 3-5 days Newbie friendliness 55/100
OpenCyphal/nunavut#419 ·
Maintainers usually reply within 1 day
-
build and test C++ dependencies
Difficulty 4/5 3-5 days Newbie friendliness 50/100
OpenCyphal/nunavut#418 ·
Maintainers usually reply within 1 day
-
build and test Python
Difficulty 4/5 3-5 days Newbie friendliness 45/100
OpenCyphal/nunavut#416 ·
Maintainers usually reply within 1 day
-
C C++ Python
Difficulty 4/5 3-5 days Newbie friendliness 52/100
OpenCyphal/nunavut#414 · 1 comment ·
Maintainers usually reply within 1 day
-
Python
Difficulty 4/5 3-5 days Newbie friendliness 45/100
OpenCyphal/nunavut#412 ·
Maintainers usually reply within 1 day
All issues in OpenCyphal/nunavut
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
py-econometrics/pyfixest#2072 ·
Maintainers usually reply within 1 day
-
~planning docs
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Kromatic-Innovation/athenaeum#3084 ·
Maintainers usually reply within 1 day
-
Bosch Room Thermostat II number entities offer -500 to 3000 °C setpoint limits and a -32768 to 32767 °C outdoor temperaturePossibly taken @zigpy-review-bot claimed this today. Openbot: code audit
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zigpy/zha-device-handlers#5769 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Half a day Newbie friendliness 80/100
R0Y00/Xbox2Windows#254 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kludex/python-multipart#375 ·
Maintainers usually reply within 1 day