mesonbuild / mesonbuild/mesonwrap
Wrap naming policy
- Dominant language
- Python
- Stars
- 26
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
The `wrap` tool and the **WrapDB** system are very powerful features in Meson build system. They make developers life a lot easier by providing an easy and convenient way of using other libs as dependencies in your project.
When using the `wrap` tool and the **WrapDB** system to find a particular library I would expect a person to search by the exact name as upstream uses/promotes. E.g.:
```
$ meson wrap search catch2
```
There are already two cases on the WrapDB with misleading names right now:
- https://wrapdb.mesonbuild.com/json
- https://wrapdb.mesonbuild.com/catch
**json**
Upstream: https://github.com/nlohmann/json
This one has **nlohmann_json** as the official name of the lib (though the repository is simply called "json").
**catch**
Upstream: https://github.com/catchorg/Catch2
This one has changed its name to **catch2** (more about its name change is [here](https://levelofindirection.com/blog/catch2-released.html)).
**What should be done in case if upstream changes name?**
I would expect for the older version to remain under the old name on the WrapDB. And the new version to have the new corresponding name. This way it is logical and easy to find the exact lib you are looking for. It simply saves you time.
**What is the policy for naming a lib on the WrapDB system?**
This is already described [here](https://mesonbuild.com/Adding-new-projects-to-wrapdb.html#choosing-the-repository-name). I would just add that in case of the above two projects they don't have a pkg-config file, so I think that the name they use/promote should be used, lowercase only (Catch2 -> catch2).
**Name convention for a variable which keeps a value returned by declare_dependency() function**
https://mesonbuild.com/Subprojects.html
It may be already in use, but I just don't remember seeing it written anywhere.
For ease of use as a subproject, I would suggest that each project has this convention for declaring dependencies - **_dep**, e.g. for **catch2** it would be **catch2_dep**. Then one can just use it without even looking inside build definitions of that subproject.
PS:
I think that simple but defined rules make our life easier and more predictable, so we can count on them, like in this case with naming.
Please correct me if I am missing anything.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the linked “Choosing the repository name” section in Adding-new-projects-to-wrapdb.html and the Subprojects documentation, then compare those rules with the linked WrapDB json and catch entries. Done would require an agreed naming policy and a documented decision about renamed projects and dependency-variable conventions.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100