just lint fails from within devshell #806

Open
opened 2025-04-22 22:52:39 +00:00 by winter · 2 comments
Member

On 81d476984901d1f00fdcac36a0a8f06cb54048f6:

winter@snowball ~/s/lix> just lint
ninja -C build clang-tidy
ninja: Entering directory `build'
[1/9] Generating meson/clang-tidy/generated_headers.stamp with a custom command
ninja: Entering directory `/Users/winter/src/lix/build'
ninja: no work to do.
[8/9] Running external command clang-tidy (wrapped by meson to set env)
usage: run-clang-tidy [-h] [-allow-enabling-alpha-checkers] [-clang-tidy-binary PATH] [-clang-apply-replacements-binary PATH] [-checks CHECKS] [-config CONFIG | -config-file CONFIG_FILE]
                      [-header-filter HEADER_FILTER] [-line-filter LINE_FILTER] [-export-fixes filename] [-j J] [-fix] [-format] [-style STYLE] [-use-color [USE_COLOR]] [-p BUILD_PATH]
                      [-extra-arg EXTRA_ARG] [-extra-arg-before EXTRA_ARG_BEFORE] [-quiet] [-load PLUGINS]
                      [files ...]
run-clang-tidy: error: unrecognized arguments: -warnings-as-errors
FAILED: meson-internal__clang-tidy
env MESON_SOURCE_ROOT=/Users/winter/src/lix MESON_BUILD_ROOT=/Users/winter/src/lix/build MESON_SUBDIR=meson/clang-tidy 'MESONINTROSPECT=/nix/store/gd9yxrdkjv1c562xq5d07yf8wmlpi8b4-meson-1.6.0/bin/meson introspect' /nix/store/r1fxj1bigkkr2ny0l88l9kbjspxyp7kp-python3-3.12.7-env/bin/python3 /Users/winter/src/lix/meson/clang-tidy/clang-tidy-runner.py --run-clang-tidy-path /nix/store/pljhgkcg86si7ml0w3h018m5105yhy1s-clang-16.0.6/bin/run-clang-tidy --compdb-path /Users/winter/src/lix/build/meson/clang-tidy --plugin-path /Users/winter/src/lix/build/subprojects/lix-clang-tidy/liblix-clang-tidy.dylib --werror
ninja: build stopped: subcommand failed.
error: Recipe `lint` failed on line 48 with exit code 1
On `81d476984901d1f00fdcac36a0a8f06cb54048f6`: ``` winter@snowball ~/s/lix> just lint ninja -C build clang-tidy ninja: Entering directory `build' [1/9] Generating meson/clang-tidy/generated_headers.stamp with a custom command ninja: Entering directory `/Users/winter/src/lix/build' ninja: no work to do. [8/9] Running external command clang-tidy (wrapped by meson to set env) usage: run-clang-tidy [-h] [-allow-enabling-alpha-checkers] [-clang-tidy-binary PATH] [-clang-apply-replacements-binary PATH] [-checks CHECKS] [-config CONFIG | -config-file CONFIG_FILE] [-header-filter HEADER_FILTER] [-line-filter LINE_FILTER] [-export-fixes filename] [-j J] [-fix] [-format] [-style STYLE] [-use-color [USE_COLOR]] [-p BUILD_PATH] [-extra-arg EXTRA_ARG] [-extra-arg-before EXTRA_ARG_BEFORE] [-quiet] [-load PLUGINS] [files ...] run-clang-tidy: error: unrecognized arguments: -warnings-as-errors FAILED: meson-internal__clang-tidy env MESON_SOURCE_ROOT=/Users/winter/src/lix MESON_BUILD_ROOT=/Users/winter/src/lix/build MESON_SUBDIR=meson/clang-tidy 'MESONINTROSPECT=/nix/store/gd9yxrdkjv1c562xq5d07yf8wmlpi8b4-meson-1.6.0/bin/meson introspect' /nix/store/r1fxj1bigkkr2ny0l88l9kbjspxyp7kp-python3-3.12.7-env/bin/python3 /Users/winter/src/lix/meson/clang-tidy/clang-tidy-runner.py --run-clang-tidy-path /nix/store/pljhgkcg86si7ml0w3h018m5105yhy1s-clang-16.0.6/bin/run-clang-tidy --compdb-path /Users/winter/src/lix/build/meson/clang-tidy --plugin-path /Users/winter/src/lix/build/subprojects/lix-clang-tidy/liblix-clang-tidy.dylib --werror ninja: build stopped: subcommand failed. error: Recipe `lint` failed on line 48 with exit code 1 ```
Owner

i believe this is some macos nixpkgs moment in which the version of clang-tidy is different on macos vs linux. probably we could fix it by upgrading nixpkgs to 25.05 when it comes out, or by doing version detection. either way patches are accepted.

or we can write a replacement to run-clang-tidy, which, if you find the number of curses in our run-clang-tidy invoking script and compare it to how much run-clang-tidy actually does, is a somewhat understandable proposition.

i believe this is some macos nixpkgs moment in which the version of clang-tidy is different on macos vs linux. probably we could fix it by upgrading nixpkgs to 25.05 when it comes out, or by doing version detection. either way patches are accepted. or we can write a replacement to run-clang-tidy, which, if you find the number of curses in our run-clang-tidy invoking script and compare it to how much run-clang-tidy actually does, is a somewhat understandable proposition.
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/3792 ("clang-tidy: fix some lints on macOS")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/3792", "number": 3792, "kind": "commit message"}], "cl_meta": {"3792": {"change_title": "clang-tidy: fix some lints on macOS"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/3792](https://gerrit.lix.systems/c/lix/+/3792) ("clang-tidy: fix some lints on macOS")
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#806
No description provided.