configure_file can not replace variables after "\\"
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 1.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 33
Description
Describe the bug
confugre_file can not replace the @@ variables after \\ with meson 1.5.2.
To Reproduce
meson.build
project('test')
test_conf = configuration_data()
test_conf.set('A', 'str_a')
test_conf.set('B', 'str_b')
configure_file(input : 'test.h.in',
output : 'test.h',
configuration : test_conf)
test.h.in
const char *TEST_STR = "@A@\\\\@B@";
When you type meson setup build, meson 1.5.2 replaces only @A@.
const char *TEST_STR = "str_a\\@B@";
Expected behavior
test.h should be like this
const char *TEST_STR = "str_a\\str_b";
meson had the expected behavior at least three months ago (maybe 1.4.1)
system parameters
- Is this a cross build or just a plain native build (for the same computer)?
native build - what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.)
Windows 10 - what Python version are you using e.g. 3.8.0
3.12.2 - what
meson --version
1.5.2 - what
ninja --versionif it's a Ninja build
not ninja build
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 reproducing the issue with the meson.build and test.h.in examples using Meson 1.5.2 on the reported native Windows setup. Trace configure_file substitution for @@ variables following escaped backslashes, then verify that both @A@ and @B@ are replaced and the output matches the expected C string.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100