From 74a9bda44bd19a7cba700823caaf59b7bf9cf014 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Hugly Date: Tue, 29 Oct 2024 19:26:58 +0100 Subject: [PATCH] Fix python lint. For some very mysterious reasons, flake8 gets broken by build_python_zip. I have never been able to find how exactly flake8 is made as a py binary because its creations is mediated by 6 layers of bazel code generation. But it is indeed made during the build. If I turn build_python_zip ON for the "build" config only, then flake8 is still broken, but if I turn it ON everywhere except for the "test:lint" config, then flake8 works. That makes no sense to me, but I'll be content with that. Life is short and I am sick of spending mine trying to deconstruct bazel and python frivolous and broken magic. --- .bazelrc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.bazelrc b/.bazelrc index 99ca68a9bd..747117976d 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,5 +1,5 @@ ### common options for all subcommands (help, query, build, ...) -common --show_timestamps --enable_platform_specific_config +common --show_timestamps --enable_platform_specific_config --build_python_zip # connect to buchgr/bazel-remote cache # These flags can unfortunately not be specified for `common`, as they are not accepted by all subcommands (help, version, dump) @@ -18,7 +18,6 @@ build --incompatible_default_to_explicit_init_py # Enable resolution of cc toolchain by go toolchain build --incompatible_enable_cc_toolchain_resolution build --flag_alias=file_name_version=//:file_name_version -build --build_python_zip # include one of "--define gotags=sqlite_mattn" or "--define gotags=sqlite_modernc" # cannot be in common, because query chokes on it. @@ -36,7 +35,7 @@ test:unit_all --config=unit //... test:integration --test_tag_filters=integration,-lint test:integration_all --config=integration //... -test:lint --test_tag_filters=lint,write_src --test_summary=terse --noshow_progress --experimental_convenience_symlinks=ignore +test:lint --test_tag_filters=lint,write_src --test_summary=terse --noshow_progress --experimental_convenience_symlinks=ignore --nobuild_python_zip # run quietly, only display errors common:quiet --ui_event_filters=-warning,-info,-debug,-stdout,-stderr --noshow_progress