Commit Graph

4 Commits

Author SHA1 Message Date
David Tolnay 5001ff6804
Expose crates_vendor deps to bzlmod (#2372)
Without this, I have been unable to update
https://github.com/dtolnay/cxx to bzlmod. When I run `bazel run
//third-party:vendor` ([this
rule](3c1bcc012f/third-party/BUILD (L3-L11)))
it failed with **"unknown repo 'cargo_bazel.buildifier-linux-amd64'
requested from @@rules_rust~0.35.0"**:

```console
ERROR: no such package '@@[unknown repo 'cargo_bazel.buildifier-linux-amd64' requested from @@rules_rust~0.35.0]//file': The repository '@@[unknown repo 'cargo_bazel.buildifier-linux-amd64' requested from @@rules_rust~0.35.0]' could not be resolved: No repository visible as '@cargo_bazel.buildifier-linux-amd64' from repository '@@rules_rust~0.35.0'
ERROR: ~/.cache/bazel/_bazel_david/ebce1d0721fb68dda9c70c0dd1405803/external/rules_rust~0.35.0/crate_universe/private/vendor/BUILD.bazel:3:27: no such package '@@[unknown repo 'cargo_bazel.buildifier-linux-amd64' requested from @@rules_rust~0.35.0]//file': The repository '@@[unknown repo 'cargo_bazel.buildifier-linux-amd64' requested from @@rules_rust~0.35.0]' could not be resolved: No repository visible as '@cargo_bazel.buildifier-linux-amd64' from repository '@@rules_rust~0.35.0' and referenced by '@@rules_rust~0.35.0//crate_universe/private/vendor:buildifier'
ERROR: Analysis of target '//third-party:vendor' failed; build aborted: Analysis failed
```

After this change, it works. My MODULE.bazel can be seen in
https://github.com/dtolnay/cxx/pull/1294.
2023-12-28 18:53:57 +00:00
David Tolnay 31a18a950f
Update using_cxx example to cxx 1.0.109 (#2200)
This eliminates the annotation introduced by
https://github.com/bazelbuild/rules_rust/pull/2192, because it includes
https://github.com/dtolnay/cxx/pull/1277.

This PR includes handwritten changes to WORKSPACE.bazel followed by the
generated result of running:

- `cd examples/crate_universe/using_cxx`
- `CARGO_BAZEL_REPIN=1 bazel sync --only=using_cxx`
- `CARGO_BAZEL_REPIN=1 bazel sync --only=cxxbridge_cmd_deps`

Tested by running `bazel build ...` in the same directory.
2023-10-14 08:56:08 -07:00
UebelAndre c080d7bfa1
Moved legacy protobuf rules to `proto/protobuf` (#2043)
* Moved legacy protobuf rules to `proto/protobuf`

* Regenerate documentation
2023-07-05 15:27:50 +00:00
David Tolnay c09818d3b0
Exclude generated files from language stats and collapse in code review (#1747) 2023-01-04 16:29:36 +00:00