mesonbuild / mesonbuild/wrapdb
Declaring Required Project Options for Enabled Dependencies
- Dominant language
- Meson
- Stars
- 118
- Forks
- 298
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 24
Description
I am thinking of the best way to distribute the Apache Arrow ADBC project via the WrapDB. At a high level, the ADBC project is structured like:
```
project('arrow-adbc', ...)
if get_option('sqlite')
adbc_sqlite_lib = library(...)
endif
if get_option('postgresql')
adbc_postgresql_lib = library(...)
endif
...
```
So when compiling the project, you would opt in to whatever database client(s) you need.
Thinking about how to distribute this as a wrapdb entry, it would be great to just allow users to take advantage of something like:
```
[provide]
adbc_sqlite = adbc_sqlite_dep
adbc_postgresql = adbc_postgresql_dep
...
```
But to do so, I am under the impression users would have to set those project options each time the dependency is included, i.e.:
```python
adbc_sqlite_dep = dependency('adbc_sqlite', default_options: ['sqlite=enabled'])
adbc_postgresql_dep = dependency('adbc_postgresql', default_options: ['postgresql=enabled]')
...
```
Alternately, perhaps there is a way to extend the Wrap entry which manages that information internally? Please excuse any ignorance on my behalf, but a simplistic solution may look like:
```python
[default_options]
adbc_sqlite = ['sqlite=enabled']
adbc_postgresql = ['postgresql=enabled']
```
From there, Meson may be able to determine what options are being used in the downstream project and set the appropriate compilation flags for the end user
Contributor guide
No contributing guide indexed for this repository
Research direction
No files, tests, or entry points are named. Start by examining how WrapDB entries represent dependencies and options; this issue needs a decision on whether dependency-specific project options can be declared before implementation can be considered done.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100