RFE: add possibility to get output of vcs_tag() without configuring file
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 1.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 33
Description
In one of the projects I encountered situation where version.h.in should contain information about not only about git version but also some other stuff.
Right now it is solvable by something like:
```meson
version_array = meson.project_version().split('.')
version_major = version_array[0].to_int()
version_minor = version_array[1].to_int()
version_data = configuration_data()
version_data.set('PROJECT_VERSION_MAJOR', version_major)
version_data.set('PROJECT_VERSION_MINOR', version_minor)
# We don't want to substitute it by noop
version_data.set('PROJECT_VERSION_GIT', '@VCS_TAG@')
version_cc_in = configure_file(
input : 'version.cc.in',
output : 'version.cc.in',
configuration : version_data,
)
version_cc = vcs_tag(
input : version_cc_in,
output : 'version.cc',
)
```
but this is not really nice.
Contributor 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.
Research direction
Start by tracing the vcs_tag() and configure_file() entry points in the Meson implementation and review how the shown Meson example passes @VCS_TAG@ between them. Determine the API needed to expose vcs_tag() output without configuring a file, then add coverage for that usage and verify the existing configured-file behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100