Skip to content

Commit

Permalink
Bump dependency versions in MODULE.bazel
Browse files Browse the repository at this point in the history
  • Loading branch information
hzeller committed Dec 16, 2024
1 parent 68dcbc2 commit d7b1639
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 109 deletions.
6 changes: 6 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ common:macos --features=-supports_dynamic_linker --linkopt=-framework --linkopt=
# Since we use designated initializers (C99 ... but >= c++20), compiler really wants the c++20 mode
common:windows --compiler=clang-cl --cxxopt=/std:c++20 --host_cxxopt=/std:c++20 --client_env=BAZEL_CXXOPTS=/std:c++20

build --cxxopt="-Wno-unknown-warning-option" --host_cxxopt="-Wno-unknown-warning-option"
# TODO: this looks like benign where it happens but to be explored further
build --cxxopt="-Wno-dangling-reference" --host_cxxopt="-Wno-dangling-reference"
# Newer bisons create an unused label.
build --cxxopt="-Wno-unused-label" --host_cxxopt="-Wno-unused-label"

# For 3rd party code: Disable warnings entirely.
# They are not actionable and just create noise.
build --per_file_copt=external/.*@-w
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/verible-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ jobs:
path: |
/root/.cache/clang-tidy
/root/.cache/bazel
key: clang-tidy1-${{ steps.cache_timestamp.outputs.time }}
restore-keys: clang-tidy1-
key: clang-tidy2-${{ steps.cache_timestamp.outputs.time }}
restore-keys: clang-tidy2-

- name: Build Project genrules
run: |
Expand All @@ -115,7 +115,8 @@ jobs:
//verible/verilog/parser:verilog-lex \
//verible/verilog/parser:verilog-y \
//verible/verilog/parser:verilog-y-final \
//verible/common/analysis:command-file-lexer_test
//verible/common/analysis:command-file-lexer_test \
//verible/common/lsp:lsp-text-buffer
bazel build $(bin/bant -q genrule-outputs | awk '{print $2}') \
$(bin/bant list-targets | grep cc_proto_library | awk '{print $3}')
Expand Down Expand Up @@ -437,14 +438,14 @@ jobs:
uses: actions/cache@v3
with:
path: "c:/users/runneradmin/_bazel_runneradmin"
key: bazelcache_windows1_${{ steps.cache_timestamp.outputs.time }}
restore-keys: bazelcache_windows1_
key: bazelcache_windows3_${{ steps.cache_timestamp.outputs.time }}
restore-keys: bazelcache_windows3_

- name: Install dependencies
run: |
choco install bazel --force --version=6.5.0
choco install winflexbison3
choco install llvm --allow-downgrade --version=16.0.6
choco install llvm --allow-downgrade --version=17.0.6
- name: Debug bazel directory settings
# We need to explicitly call the bazel binary from choco, otherwise
Expand Down
60 changes: 31 additions & 29 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ module(
name = "verible",
)

bazel_dep(name = "platforms", version = "0.0.8")
bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "rules_license", version = "0.0.8")
bazel_dep(name = "rules_proto", version = "6.0.0-rc2")
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "nlohmann_json", version = "3.11.3.bcr.1", repo_name = "jsonhpp")
bazel_dep(name = "re2", version = "2024-07-02.bcr.1", repo_name = "com_googlesource_code_re2")
bazel_dep(name = "zlib", version = "1.3.1.bcr.3")

# Register m4 rules and toolchain.
# Register m4/flex/bison rules and toolchains
bazel_dep(name = "rules_m4", version = "0.2.3")

m4 = use_extension(
Expand All @@ -24,23 +25,6 @@ use_repo(m4, "m4")

register_toolchains("@m4//:toolchain")

# Register bison rules and toolchain.
bazel_dep(name = "rules_bison", version = "0.3")

bison = use_extension(
"@rules_bison//bison/extensions:bison_repository_ext.bzl",
"bison_repository_ext",
)
bison.repository(
name = "bison",
extra_copts = ["-O3"],
version = "3.3.2",
)
use_repo(bison, "bison")

register_toolchains("@bison//:toolchain")

# Register flex rules and toolchain.
bazel_dep(name = "rules_flex", version = "0.3")

flex = use_extension(
Expand All @@ -56,9 +40,25 @@ use_repo(flex, "flex")

register_toolchains("@flex//:toolchain")

bazel_dep(name = "rules_bison", version = "0.3")

bison = use_extension(
"@rules_bison//bison/extensions:bison_repository_ext.bzl",
"bison_repository_ext",
)
bison.repository(
name = "bison",
extra_copts = ["-O3"],
version = "3.3.2",
)
use_repo(bison, "bison")

register_toolchains("@bison//:toolchain")

# abseil-cpp and googletest can not be updated beyond the following currently,
# as newer googletest is not compatible with bazel 6 anymore, and abseil-cpp
# depends on it :( -- to support all active bazel's, we're stuck till Dec 2025.
# depends on it :( -- to support all active bazel's, we're stuck till EOL bazel6
bazel_dep(name = "googletest", version = "1.14.0.bcr.1", repo_name = "com_google_googletest")
bazel_dep(name = "abseil-cpp", version = "20240116.2", repo_name = "com_google_absl")
single_version_override(
module_name = "abseil-cpp",
Expand All @@ -67,8 +67,10 @@ single_version_override(
version = "20240116.2",
)

bazel_dep(name = "googletest", version = "1.14.0.bcr.1", repo_name = "com_google_googletest")
bazel_dep(name = "nlohmann_json", version = "3.11.3.bcr.1", repo_name = "jsonhpp")
bazel_dep(name = "protobuf", version = "26.0", repo_name = "com_google_protobuf")
bazel_dep(name = "re2", version = "2023-09-01", repo_name = "com_googlesource_code_re2")
bazel_dep(name = "zlib", version = "1.3.1")
# Last protobuf version working with windows without strange linking errors.
# This also means that we unfortunately can't use the @protobuf//bazel rules
# but have to use rules_cc and rules_proto.
# TODO: figure out how we can make proto compile beyond 24.4 on Windows.
bazel_dep(name = "protobuf", version = "24.4", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_proto", version = "6.0.0-rc2")
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ the nix package manager simply run `nix-shell` to get a build environment.

```bash
# Build all tools and libraries
# bazel 5/6/7
# bazel 6/7/8
bazel build -c opt //...
```

Expand Down
73 changes: 0 additions & 73 deletions bazel/zlib.BUILD

This file was deleted.

2 changes: 2 additions & 0 deletions third_party/proto/kythe/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Unfortunately, can't use @com_google_protobuf//bazel:cc_proto_library.bzl
# here, as this does not seem to work with windows.
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

Expand Down

0 comments on commit d7b1639

Please sign in to comment.