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 up fake resolve roots for proc macros #2784

Merged
merged 4 commits into from
Aug 8, 2024

Conversation

illicitonion
Copy link
Collaborator

  1. Skip in-workspace proc-macros - they shouldn't be resolved, and are already resolve roots
  2. Properly parse out git deps, rather than assuming everything is a registry dep

Fixes #2777
Fixes #2783

@illicitonion illicitonion force-pushed the fix-proc-macro-resolving branch 3 times, most recently from 74ac7e1 to 618b4c0 Compare August 8, 2024 13:27
1. Skip in-workspace proc-macros - they shouldn't be resolved, and are
   already resolve roots
2. Properly parse out git deps, rather than assuming everything is a
   registry dep
Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

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

One nit and do you know if we're regression sufficient now? How did existing coverage miss the two issues linked?

crate_universe/src/metadata.rs Outdated Show resolved Hide resolved
@illicitonion
Copy link
Collaborator Author

How did existing coverage miss the two issues linked?

We previously didn't have any tests/examples where a Cargo workspace contained a first-party proc-macro. We now have this, in the musl_cross_compiling example (local_proc_macro). Both of the link issues had this same root cause, which is not filtering those out from the list.

Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

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

Thanks! Wanna start a 0.49.2 release?

@illicitonion
Copy link
Collaborator Author

Will do on merge! Thanks!

@illicitonion illicitonion added this pull request to the merge queue Aug 8, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Aug 8, 2024
@illicitonion illicitonion added this pull request to the merge queue Aug 8, 2024
Merged via the queue into bazelbuild:main with commit 1625cd1 Aug 8, 2024
3 checks passed
@illicitonion illicitonion deleted the fix-proc-macro-resolving branch August 8, 2024 21:34
fmeum referenced this pull request in bazel-contrib/toolchains_llvm Aug 9, 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 | patch | `0.49.1` -> `0.49.2` |

---

### Release Notes

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

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

[Compare
Source](https://togithub.com/bazelbuild/rules_rust/compare/0.49.1...0.49.2)

### 0.49.2

#### Bzlmod

```python
bazel_dep(name = "rules_rust", version = "0.49.2")
```

#### WORKSPACE

```python
load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_rust",
    integrity = "sha256-5r5uj7WUevWfVgA45OWPa0brUJilfa0KOKHsVLcQBmA=",
    urls = ["https:/bazelbuild/rules_rust/releases/download/0.49.2/rules_rust-v0.49.2.tar.gz"],
)
```

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

#### What's Changed

- Introduce feature `rules_rust_link_cc`. by
[@&#8203;yuzhy8701](https://togithub.com/yuzhy8701) in
[https:/bazelbuild/rules_rust/pull/2723](https://togithub.com/bazelbuild/rules_rust/pull/2723)
- Fix up fake resolve roots for proc macros by
[@&#8203;illicitonion](https://togithub.com/illicitonion) in
[https:/bazelbuild/rules_rust/pull/2784](https://togithub.com/bazelbuild/rules_rust/pull/2784)
- Release 0.49.2 by
[@&#8203;illicitonion](https://togithub.com/illicitonion) in
[https:/bazelbuild/rules_rust/pull/2785](https://togithub.com/bazelbuild/rules_rust/pull/2785)

**Full Changelog**:
bazelbuild/rules_rust@0.49.1...0.49.2

</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 was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/bazel-contrib/toolchains_llvm).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yMC4xIiwidXBkYXRlZEluVmVyIjoiMzguMjAuMSIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->

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.

custom proc macro crate not found in a cargo workspace setup Dependency vendoring broken in 0.49.1
2 participants