Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
604 changes: 25 additions & 579 deletions .bazelci/presubmit.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ bazel_dep(name = "another_module", version = "0", dev_dependency = True)

# Extra gazelle plugin deps so that WORKSPACE.bzlmod can continue including it for e2e tests.
# We use `WORKSPACE.bzlmod` because it is impossible to have dev-only local overrides.
bazel_dep(name = "rules_go", version = "0.41.0", dev_dependency = True, repo_name = "io_bazel_rules_go")
bazel_dep(name = "rules_go", version = "0.59.0", dev_dependency = True, repo_name = "io_bazel_rules_go")
bazel_dep(name = "rules_python_gazelle_plugin", version = "0", dev_dependency = True)
bazel_dep(name = "gazelle", version = "0.40.0", dev_dependency = True, repo_name = "bazel_gazelle")

Expand Down
2 changes: 2 additions & 0 deletions examples/bzlmod/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#startup --windows_enable_symlinks

common --enable_bzlmod
common --lockfile_mode=update

Expand Down
31 changes: 31 additions & 0 deletions examples/bzlmod/tests/version_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,42 @@


set -o errexit -o nounset -o pipefail
set -x

env

# VERSION_PY_BINARY is a space separate list of the executable and its main
# py file. We just want the executable.
bin=($VERSION_PY_BINARY)
bin="${bin[@]//*.py}"

bindir=$(dirname $bin)

#
##set +e
##
##ls -la $bindir
##dir $bindir
##
##stat $bin
##stat -L $bin
##icacls $bin
##
##cp $bin mybin.exe
##./mybin.exe
##
##cmd.exe //c tests\\version_3_10.exe
##
##cmd.exe //c "tests\\version_3_10.exe"
##
##cmd.exe //c "tests\version_3_10.exe"
##
##set -e
##cp tests/version_3_10.zip mybin.zip
##./mybin.exe

./$bin

version_py_binary=$($bin)

if [[ "${version_py_binary}" != "${VERSION_CHECK}" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions gazelle/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ module(

bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "rules_python", version = "0.18.0")
bazel_dep(name = "rules_go", version = "0.55.1", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.36.0", repo_name = "bazel_gazelle")
bazel_dep(name = "rules_go", version = "0.59.0", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.47.0", repo_name = "bazel_gazelle")
bazel_dep(name = "rules_cc", version = "0.0.16")

local_path_override(
Expand Down
2 changes: 1 addition & 1 deletion gazelle/examples/bzlmod_build_file_generation/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ test --test_output=errors --enable_runfiles
# Windows requires these for multi-python support:
build --enable_runfiles

common --experimental_enable_bzlmod
common --enable_bzlmod

coverage --java_runtime_version=remotejdk_11
common:bazel7.x --incompatible_python_disallow_native_rules
Expand Down
4 changes: 2 additions & 2 deletions gazelle/examples/bzlmod_build_file_generation/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ local_path_override(
# The following stanza defines the dependency for gazelle
# See here https://github.com/bazelbuild/bazel-gazelle/releases/ for the
# latest version.
bazel_dep(name = "gazelle", version = "0.36.0", repo_name = "bazel_gazelle")
bazel_dep(name = "gazelle", version = "0.47.0", repo_name = "bazel_gazelle")

# The following stanze returns a proxy object representing a module extension;
# its methods can be invoked to create module extension tags.
Expand Down Expand Up @@ -84,4 +84,4 @@ local_path_override(
)

# Only needed to make rules_python's CI happy
bazel_dep(name = "rules_java", version = "8.3.1")
bazel_dep(name = "rules_java", version = "8.16.1")
10 changes: 6 additions & 4 deletions gazelle/go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
module github.com/bazel-contrib/rules_python/gazelle

go 1.21.13
go 1.22.9

toolchain go1.23.6

require (
github.com/bazelbuild/bazel-gazelle v0.36.0
github.com/bazelbuild/buildtools v0.0.0-20240313121412-66c605173954
github.com/bazelbuild/bazel-gazelle v0.47.0
github.com/bazelbuild/buildtools v0.0.0-20250930140053-2eb4fccefb52
github.com/bazelbuild/rules_go v0.55.1
github.com/bmatcuk/doublestar/v4 v4.7.1
github.com/bmatcuk/doublestar/v4 v4.9.1
github.com/emirpasic/gods v1.18.1
github.com/ghodss/yaml v1.0.0
github.com/smacker/go-tree-sitter v0.0.0-20240827094217-dd81d9e9be82
Expand Down
6 changes: 6 additions & 0 deletions gazelle/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/bazelbuild/bazel-gazelle v0.36.0 h1:n41ODckCkU9D2BEwBxYN+xu5E92Vd0gaW6QmsIW9l00=
github.com/bazelbuild/bazel-gazelle v0.36.0/go.mod h1:5wGHbkRpDUdz4LxREtPYwXstrWfnkV+oDmOuxNAxW1s=
github.com/bazelbuild/bazel-gazelle v0.47.0 h1:g3Rr1ZbkC1Pk20aOgBITxSD/efS1WbaSty5jC786Z3Q=
github.com/bazelbuild/bazel-gazelle v0.47.0/go.mod h1:8Ozf20jhv+in87nCUHdmUPPcVGTfKg/gotZ/hce3T+w=
github.com/bazelbuild/buildtools v0.0.0-20240313121412-66c605173954 h1:VNqmvOfFzn2Hrtoni8vqgXlIQ4C2Zt22fxeZ9gOOkp0=
github.com/bazelbuild/buildtools v0.0.0-20240313121412-66c605173954/go.mod h1:689QdV3hBP7Vo9dJMmzhoYIyo/9iMhEmHkJcnaPRCbo=
github.com/bazelbuild/buildtools v0.0.0-20250930140053-2eb4fccefb52 h1:njQAmjTv/YHRm/0Lfv9DXHFZ4MdT2IA/RKHTnqZkgDw=
github.com/bazelbuild/buildtools v0.0.0-20250930140053-2eb4fccefb52/go.mod h1:PLNUetjLa77TCCziPsz0EI8a6CUxgC+1jgmWv0H25tg=
github.com/bazelbuild/rules_go v0.55.1 h1:cQYGcunY8myOB+0Ym6PGQRhc/milkRcNv0my3XgxaDU=
github.com/bazelbuild/rules_go v0.55.1/go.mod h1:T90Gpyq4HDFlsrvtQa2CBdHNJ2P4rAu/uUTmQbanzf0=
github.com/bmatcuk/doublestar/v4 v4.7.1 h1:fdDeAqgT47acgwd9bd9HxJRDmc9UAmPpc+2m0CXv75Q=
github.com/bmatcuk/doublestar/v4 v4.7.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
github.com/bmatcuk/doublestar/v4 v4.9.1 h1:X8jg9rRZmJd4yRy7ZeNDRnM+T3ZfHv15JiBJ/avrEXE=
github.com/bmatcuk/doublestar/v4 v4.9.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
Comment on lines 3 to +16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The go.sum file appears to be in an inconsistent state. It contains checksums for both old and new versions of dependencies (e.g., bazel-gazelle v0.36.0 and v0.47.0). This can happen if go mod tidy is not run after updating go.mod. Please run go mod tidy to clean up this file and ensure it only contains checksums for the required dependencies.

github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
Expand Down