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

Respect VcCellMode in TraitRef::cell #8870

Closed
wants to merge 1 commit into from

Conversation

bgw
Copy link
Member

@bgw bgw commented Jul 29, 2024

Description

Building on the VcCellMode::raw_cell API from #8870 and the addition of ValueType::raw_cell in #8826, this fixes an edge case where TraitRef::cell didn't respect VcCellMode and acted like it was always using cell = "new".

I noticed this problem while working on local Vc resolution. Because TraitRef doesn't know the real concrete type at compile time, this wasn't possible to fix without these new type-erased raw_cell APIs.

The consequences of this bug are mostly just that some data might get recomputed in certain rare edge cases (most stuff doesn't use TraitRefs heavily).

Testing Instructions

A regression test is included, which fails without the other changes included in this PR.

cargo nextest r -p turbo-tasks-memory trait_ref

Copy link

vercel bot commented Jul 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2024 9:05pm
rust-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2024 9:05pm
8 Skipped Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 9:05pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 9:05pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 9:05pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 9:05pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 9:05pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 9:05pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 9:05pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 9:05pm

Copy link
Member Author

bgw commented Jul 29, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @bgw and the rest of your teammates on Graphite Graphite

Copy link
Contributor

🟢 Turbopack Benchmark CI successful 🟢

Thanks

Copy link
Contributor

✅ This change can build next-swc

Copy link
Contributor

github-actions bot commented Jul 29, 2024

⚠️ CI failed ⚠️

The following steps have failed in CI:

  • Turbopack Rust tests (mac/win, non-blocking)

See workflow summary for details

@bgw
Copy link
Member Author

bgw commented Aug 2, 2024

Migrated to the next.js repo: vercel/next.js#68473

@bgw bgw closed this Aug 2, 2024
@bgw bgw deleted the bgw/trait-ref-cell branch August 4, 2024 19:50
bgw added a commit to vercel/next.js that referenced this pull request Aug 5, 2024
*This is a migrated PR. This was in the turbo repository before the
next.js merge.*
**Migrated From:** vercel/turborepo#8870

### Description

Building on the `VcCellMode::raw_cell` API from #68467 and the addition
of `ValueType::raw_cell` in #68472, this fixes an edge case where
`TraitRef::cell` didn't respect `VcCellMode` and acted like it was
always using `cell = "new"`.

I noticed this problem while working on local `Vc` resolution. Because
`TraitRef` doesn't know the real concrete type at compile time, this
wasn't possible to fix without these new type-erased `raw_cell` APIs.

The consequences of this bug are mostly just that some data might get
recomputed in certain rare edge cases (most stuff doesn't use
`TraitRef`s heavily).

### Testing Instructions

A regression test is included, which fails without the other changes
included in this PR.

```
cargo nextest r -p turbo-tasks-memory trait_ref
```
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 14, 2024
*This is a migrated PR. This was in the turbo repository before the
next.js merge.*
**Migrated From:** vercel/turborepo#8870

### Description

Building on the `VcCellMode::raw_cell` API from #68467 and the addition
of `ValueType::raw_cell` in #68472, this fixes an edge case where
`TraitRef::cell` didn't respect `VcCellMode` and acted like it was
always using `cell = "new"`.

I noticed this problem while working on local `Vc` resolution. Because
`TraitRef` doesn't know the real concrete type at compile time, this
wasn't possible to fix without these new type-erased `raw_cell` APIs.

The consequences of this bug are mostly just that some data might get
recomputed in certain rare edge cases (most stuff doesn't use
`TraitRef`s heavily).

### Testing Instructions

A regression test is included, which fails without the other changes
included in this PR.

```
cargo nextest r -p turbo-tasks-memory trait_ref
```
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 15, 2024
*This is a migrated PR. This was in the turbo repository before the
next.js merge.*
**Migrated From:** vercel/turborepo#8870

### Description

Building on the `VcCellMode::raw_cell` API from #68467 and the addition
of `ValueType::raw_cell` in #68472, this fixes an edge case where
`TraitRef::cell` didn't respect `VcCellMode` and acted like it was
always using `cell = "new"`.

I noticed this problem while working on local `Vc` resolution. Because
`TraitRef` doesn't know the real concrete type at compile time, this
wasn't possible to fix without these new type-erased `raw_cell` APIs.

The consequences of this bug are mostly just that some data might get
recomputed in certain rare edge cases (most stuff doesn't use
`TraitRef`s heavily).

### Testing Instructions

A regression test is included, which fails without the other changes
included in this PR.

```
cargo nextest r -p turbo-tasks-memory trait_ref
```
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 16, 2024
*This is a migrated PR. This was in the turbo repository before the
next.js merge.*
**Migrated From:** vercel/turborepo#8870

### Description

Building on the `VcCellMode::raw_cell` API from #68467 and the addition
of `ValueType::raw_cell` in #68472, this fixes an edge case where
`TraitRef::cell` didn't respect `VcCellMode` and acted like it was
always using `cell = "new"`.

I noticed this problem while working on local `Vc` resolution. Because
`TraitRef` doesn't know the real concrete type at compile time, this
wasn't possible to fix without these new type-erased `raw_cell` APIs.

The consequences of this bug are mostly just that some data might get
recomputed in certain rare edge cases (most stuff doesn't use
`TraitRef`s heavily).

### Testing Instructions

A regression test is included, which fails without the other changes
included in this PR.

```
cargo nextest r -p turbo-tasks-memory trait_ref
```
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.

2 participants