Skip to content

Commit

Permalink
Fix python lint.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jiceatscion committed Oct 29, 2024
1 parent 572cbc3 commit 74a9bda
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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.
Expand All @@ -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

0 comments on commit 74a9bda

Please sign in to comment.