Skip to content

Commit

Permalink
round 2 of fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Calsign committed Mar 4, 2024
1 parent 64a4f59 commit c6f52da
Show file tree
Hide file tree
Showing 3 changed files with 427 additions and 152 deletions.
1 change: 0 additions & 1 deletion bootstrap_from_cargo.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def write_workspace(args: argparse.Namespace) -> None:
"""
http_archive(
name = "rules_rust",
# This patch is currently necessary for gazelle_rust to parse crate_universe lockfiles.
sha256 = "{sha256}",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/{version}/rules_rust-v{version}.tar.gz"],
)
Expand Down
15 changes: 7 additions & 8 deletions example/WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# Load gazelle_rust. In a real project, this would use http_archive. Must come before rules_rust so
# that the patch can be applied.

local_repository(
name = "gazelle_rust",
path = "..",
)

http_archive(
name = "rules_rust",
sha256 = "c30dfdf1e86fd50650a76ea645b3a45f2f00667b06187a685e9554e167ca97ee",
Expand Down Expand Up @@ -43,6 +35,13 @@ load("@crates//:defs.bzl", "crate_repositories")

crate_repositories()

# Load gazelle_rust. In a real project, this would use http_archive.

local_repository(
name = "gazelle_rust",
path = "..",
)

# Load gazelle_rust transitive dependencies (includes gazelle). You can also load gazelle yourself,
# before these macros.

Expand Down
Loading

0 comments on commit c6f52da

Please sign in to comment.