Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format string behaviour inconsistent (escape characters) #13091

Closed
Kangie opened this issue Apr 15, 2024 · 1 comment
Closed

Format string behaviour inconsistent (escape characters) #13091

Kangie opened this issue Apr 15, 2024 · 1 comment

Comments

@Kangie
Copy link
Contributor

Kangie commented Apr 15, 2024

Describe the bug

I have recently been working on porting fvwm3 from autotools to Meson, however there is a requirement that the autotools build system stay in place for now.

As part of validating my output, I have diffed various configured files and noticed that configure_file replaces instances of \@ with @ in the output.

After a pointer from Eli (thanks!), the reason for this has been revealed:

Format strings in various parts of Meson use @ as the delimiter. The behavior is inconsistent, configure_file() recognizes \ as an escape character, but format strings in string.format() and custom_target command arguments do not.

This is unintuitive, apparently un(der?)documented, and probably easily avoided.

To Reproduce

Tba when I'm at a computer

Expected behavior

Configure file should We should not be escaping individual characters. If anything, whole substitutions on a line could be escaped, but that requires matching on two @s

@Kangie
Copy link
Contributor Author

Kangie commented May 26, 2024

Closing as as dupe.

@Kangie Kangie closed this as completed May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant