Skip to content

Commit 452e497

Browse files
mattlgydaulet
andauthored
Migrating to MODULE.bazel to make it easier for other bazel projects to import. (#33)
* Migrating to MODULE.bazel to make it easier for other bazel projects to import. * fix: example builds * Run bazel mod tidy. --------- Co-authored-by: Daulet Zhanguzin <[email protected]>
1 parent d177abc commit 452e497

File tree

6 files changed

+2239
-128
lines changed

6 files changed

+2239
-128
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
3030
- name: Test
3131
run: |
32-
"${GITHUB_WORKSPACE}/bin/bazel" test //...
32+
"${GITHUB_WORKSPACE}/bin/bazel" test --test_output=errors //...
3333
3434
- name: Build
3535
run: |

BUILD.bazel

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
load("@bazel_gazelle//:def.bzl", "gazelle")
21
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
3-
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
2+
load("@gazelle//:def.bzl", "gazelle", "gazelle_binary")
3+
load("@rules_go//go:def.bzl", "go_library", "go_test")
44
load("@rules_rust//rust:defs.bzl", "rust_static_library")
55

6+
# gazelle:exclude release
67
# gazelle:prefix github.com/daulet/tokenizers
78
gazelle(
89
name = "gazelle",

MODULE.bazel

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
1-
###############################################################################
2-
# Bazel now uses Bzlmod by default to manage external dependencies.
3-
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
4-
#
5-
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
6-
###############################################################################
1+
module(
2+
name = "com_github_daulet_tokenizers",
3+
version = "1.20.2",
4+
)
5+
6+
bazel_dep(name = "gazelle", version = "0.37.0")
7+
bazel_dep(name = "rules_rust", version = "0.59.2")
8+
bazel_dep(name = "rules_go", version = "0.50.1")
9+
10+
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
11+
use_repo(go_deps, "com_github_stretchr_testify")
12+
go_deps.from_file(go_mod = "//:go.mod")
13+
14+
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
15+
rust.toolchain(edition = "2021")
16+
17+
crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate")
18+
crate.from_cargo(
19+
name = "crate_index",
20+
cargo_lockfile = "//:Cargo.lock",
21+
manifests = ["//:Cargo.toml"],
22+
)
23+
use_repo(crate, "crate_index")

0 commit comments

Comments
 (0)