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

meson format meson.build in subdir should follow meson.format in toplevel directory. #14167

Open
wrvsrx opened this issue Jan 21, 2025 · 0 comments · May be fixed by #14178
Open

meson format meson.build in subdir should follow meson.format in toplevel directory. #14167

wrvsrx opened this issue Jan 21, 2025 · 0 comments · May be fixed by #14178

Comments

@wrvsrx
Copy link
Contributor

wrvsrx commented Jan 21, 2025

Describe the bug

meson format meson.build in subdir doesn't follow meson.format in toplevel directory.

To Reproduce

|- meson.build
|- meson.format
|- src
|-- meson.build

meson format in src wouldn't follow meson.format if we run meson format in src.

Expected behavior

meson format meson.build in subdir should follow meson.format in toplevel directory.

Maybe we can detect "meson.format" in following manner:

  1. Look for a file named meson.format in the directory of the file needing to be formatted and in every parent directory, until we meet a root meson.build (For example, a meson.build contains project(xxx)). So that the formatting behavior is unrelated to the working directory of meson format.
  2. A much simplier option is just searching each parent directories for meson.format one by one.

system parameters

  • Is this a cross build or just a plain native build (for the same computer)?

    No.

  • what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.)

    NixOS 25.05

  • what Python version are you using e.g. 3.8.0

    3.12

  • what meson --version

    1.6.0

  • what ninja --version if it's a Ninja build

    It doesn't matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants