Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cc_common_link when using sibling repository layout #2643

Merged
merged 4 commits into from May 13, 2024

Conversation

yuzhy8701
Copy link
Contributor

Linking with cc_common is broken for external repositories if you also specify --experimental_sibling_repository_layout.

The rule would complain The package dir path should be a prefix of the crate_info.output.path. It happens because the package path derived from bin_dir, workspace_root and package did not match how sibling layout handles external repositories.

This change ignores the workspace_root component if the path signifies the usage of sibling layout, as it is not needed.

@scentini scentini self-requested a review May 13, 2024 10:15
Copy link
Collaborator

@scentini scentini left a comment

Choose a reason for hiding this comment

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

Thanks!

@scentini scentini added this pull request to the merge queue May 13, 2024
Merged via the queue into bazelbuild:main with commit c88ba10 May 13, 2024
2 checks passed
rrbutani pushed a commit to bazel-contrib/toolchains_llvm that referenced this pull request May 16, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [rules_rust](https://togithub.com/bazelbuild/rules_rust) |
http_archive | minor | `0.44.0` -> `0.45.0` |

---

### Release Notes

<details>
<summary>bazelbuild/rules_rust (rules_rust)</summary>

###
[`v0.45.0`](https://togithub.com/bazelbuild/rules_rust/releases/tag/0.45.0)

[Compare
Source](https://togithub.com/bazelbuild/rules_rust/compare/0.44.0...0.45.0)

### 0.45.0

```python
load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_rust",
    integrity = "sha256-0IoZbO7cp5obgv01ucsnAjrWdGpBasntBusUXtdj1aY=",
    urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.45.0/rules_rust-v0.45.0.tar.gz"],
)
```

Additional documentation can be found at:
https://bazelbuild.github.io/rules_rust/#setup

#### What's Changed

- Fix cc_common_link when using sibling repository layout by
[@&#8203;yuzhy8701](https://togithub.com/yuzhy8701) in
[bazelbuild/rules_rust#2643
- Allow runfiles object to be an arbitrary expression. by
[@&#8203;matts1](https://togithub.com/matts1) in
[bazelbuild/rules_rust#2651
- Allow searching for the rlocation of a module. by
[@&#8203;matts1](https://togithub.com/matts1) in
[bazelbuild/rules_rust#2652
- Add support for generated sources to rust-analyzer. by
[@&#8203;matts1](https://togithub.com/matts1) in
[bazelbuild/rules_rust#2654
- Added logging to crate_universe checksum validation by
[@&#8203;UebelAndre](https://togithub.com/UebelAndre) in
[bazelbuild/rules_rust#2657
- Release 0.45.0 by
[@&#8203;UebelAndre](https://togithub.com/UebelAndre) in
[bazelbuild/rules_rust#2658

#### New Contributors

- [@&#8203;yuzhy8701](https://togithub.com/yuzhy8701) made their first
contribution in
[bazelbuild/rules_rust#2643

**Full Changelog**:
bazelbuild/rules_rust@0.44.0...0.45.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/bazel-contrib/toolchains_llvm).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjMuNSIsInVwZGF0ZWRJblZlciI6IjM3LjM2My41IiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants