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

Simplify some of the syntax used with VcRead<T> #8812

Merged
merged 1 commit into from
Jul 23, 2024
Merged

Conversation

bgw
Copy link
Member

@bgw bgw commented Jul 22, 2024

Description

IMO, many of these types are hard to read:

  • Use a VcReadTarget type alias in read_ref to reduce the amount of syntax needed.
  • Replace a few uses of <<T as VcValueType>::Read as VcRead<T>> with <T::Read as VcRead<T>> in places where T is already unambiguously VcValueType.
  • Remove an unnecessary turbofish for an inferred type.

Testing Instructions

cargo check
cargo nextest r -p turbo-tasks -p turbo-tasks-memory

Copy link

vercel bot commented Jul 22, 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 22, 2024 9:26pm
rust-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2024 9:26pm
8 Skipped Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Jul 22, 2024 9:26pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Jul 22, 2024 9:26pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Jul 22, 2024 9:26pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Jul 22, 2024 9:26pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Jul 22, 2024 9:26pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Jul 22, 2024 9:26pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Jul 22, 2024 9:26pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Jul 22, 2024 9:26pm

Copy link
Member Author

bgw commented Jul 22, 2024

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 may fail to build next-swc.

Logs

crates/next-core/src/next_telemetry.rs:42:9: �[38;5;9merror[E0271]: type mismatch resolving `<DiagnosticPayload as VcValueType>::Read == VcTransparentRead<DiagnosticPayload, HashMap<RcStr, _>, _>`
crates/next-core/src/next_telemetry.rs:82:9: �[38;5;9merror[E0271]: type mismatch resolving `<DiagnosticPayload as VcValueType>::Read == VcTransparentRead<DiagnosticPayload, HashMap<RcStr, _>, _>`
error: could not compile `next-core` (lib) due to 2 previous errors

See job summary for details

@bgw bgw marked this pull request as ready for review July 22, 2024 21:28
@bgw bgw requested a review from a team as a code owner July 22, 2024 21:28
@bgw bgw requested review from arlyon and wbinnssmith July 22, 2024 21:28
Copy link
Contributor

github-actions bot commented Jul 22, 2024

⚠️ CI failed ⚠️

The following steps have failed in CI:

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

See workflow summary for details

@bgw bgw merged commit 751d0e8 into main Jul 23, 2024
57 of 60 checks passed
@bgw bgw deleted the bgw/vc-read-type-syntax branch July 23, 2024 18:06
sokra added a commit to vercel/next.js that referenced this pull request Jul 25, 2024
* vercel/turborepo#8812 <!-- Benjamin Woodruff -
Simplify some of the syntax used with VcRead<T> -->
* vercel/turborepo#8823 <!-- hrmny -
feat(turbopack): support analysing string concatenation -->
* vercel/turborepo#8828 <!-- Tobias Koppers - change
from failsafe_analyse to failsafe_parse -->
* vercel/turborepo#8831 <!-- Alexander Lyon - make
sure that all the taiki-e/install-action calls use our env -->
* vercel/turborepo#8819 <!-- Tobias Koppers -
Refactor cell reading to handle removed cells -->
* vercel/turborepo#8038 <!-- Alexander Lyon - add
tags to turbo tasks -->
* vercel/turborepo#8807 <!-- Tobias Koppers - box
Scheduled task state to save memory -->
* vercel/turborepo#8170 <!-- Tobias Koppers - Drop
excessive cells after task reexecution -->
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 25, 2024
### Description

IMO, many of these types are hard to read:
- Use a `VcReadTarget` type alias in `read_ref` to reduce the amount of syntax needed.
- Replace a few uses of `<<T as VcValueType>::Read as VcRead<T>>` with `<T::Read as VcRead<T>>` in places where `T` is already unambiguously `VcValueType`.
- Remove an unnecessary turbofish for an inferred type.

### Testing Instructions

```
cargo check
cargo nextest r -p turbo-tasks -p turbo-tasks-memory
```
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
### Description

IMO, many of these types are hard to read:
- Use a `VcReadTarget` type alias in `read_ref` to reduce the amount of syntax needed.
- Replace a few uses of `<<T as VcValueType>::Read as VcRead<T>>` with `<T::Read as VcRead<T>>` in places where `T` is already unambiguously `VcValueType`.
- Remove an unnecessary turbofish for an inferred type.

### Testing Instructions

```
cargo check
cargo nextest r -p turbo-tasks -p turbo-tasks-memory
```
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
### Description

IMO, many of these types are hard to read:
- Use a `VcReadTarget` type alias in `read_ref` to reduce the amount of syntax needed.
- Replace a few uses of `<<T as VcValueType>::Read as VcRead<T>>` with `<T::Read as VcRead<T>>` in places where `T` is already unambiguously `VcValueType`.
- Remove an unnecessary turbofish for an inferred type.

### Testing Instructions

```
cargo check
cargo nextest r -p turbo-tasks -p turbo-tasks-memory
```
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 1, 2024
### Description

IMO, many of these types are hard to read:
- Use a `VcReadTarget` type alias in `read_ref` to reduce the amount of syntax needed.
- Replace a few uses of `<<T as VcValueType>::Read as VcRead<T>>` with `<T::Read as VcRead<T>>` in places where `T` is already unambiguously `VcValueType`.
- Remove an unnecessary turbofish for an inferred type.

### Testing Instructions

```
cargo check
cargo nextest r -p turbo-tasks -p turbo-tasks-memory
```
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 14, 2024
* vercel/turborepo#8812 <!-- Benjamin Woodruff -
Simplify some of the syntax used with VcRead<T> -->
* vercel/turborepo#8823 <!-- hrmny -
feat(turbopack): support analysing string concatenation -->
* vercel/turborepo#8828 <!-- Tobias Koppers - change
from failsafe_analyse to failsafe_parse -->
* vercel/turborepo#8831 <!-- Alexander Lyon - make
sure that all the taiki-e/install-action calls use our env -->
* vercel/turborepo#8819 <!-- Tobias Koppers -
Refactor cell reading to handle removed cells -->
* vercel/turborepo#8038 <!-- Alexander Lyon - add
tags to turbo tasks -->
* vercel/turborepo#8807 <!-- Tobias Koppers - box
Scheduled task state to save memory -->
* vercel/turborepo#8170 <!-- Tobias Koppers - Drop
excessive cells after task reexecution -->
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 15, 2024
* vercel/turborepo#8812 <!-- Benjamin Woodruff -
Simplify some of the syntax used with VcRead<T> -->
* vercel/turborepo#8823 <!-- hrmny -
feat(turbopack): support analysing string concatenation -->
* vercel/turborepo#8828 <!-- Tobias Koppers - change
from failsafe_analyse to failsafe_parse -->
* vercel/turborepo#8831 <!-- Alexander Lyon - make
sure that all the taiki-e/install-action calls use our env -->
* vercel/turborepo#8819 <!-- Tobias Koppers -
Refactor cell reading to handle removed cells -->
* vercel/turborepo#8038 <!-- Alexander Lyon - add
tags to turbo tasks -->
* vercel/turborepo#8807 <!-- Tobias Koppers - box
Scheduled task state to save memory -->
* vercel/turborepo#8170 <!-- Tobias Koppers - Drop
excessive cells after task reexecution -->
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 16, 2024
* vercel/turborepo#8812 <!-- Benjamin Woodruff -
Simplify some of the syntax used with VcRead<T> -->
* vercel/turborepo#8823 <!-- hrmny -
feat(turbopack): support analysing string concatenation -->
* vercel/turborepo#8828 <!-- Tobias Koppers - change
from failsafe_analyse to failsafe_parse -->
* vercel/turborepo#8831 <!-- Alexander Lyon - make
sure that all the taiki-e/install-action calls use our env -->
* vercel/turborepo#8819 <!-- Tobias Koppers -
Refactor cell reading to handle removed cells -->
* vercel/turborepo#8038 <!-- Alexander Lyon - add
tags to turbo tasks -->
* vercel/turborepo#8807 <!-- Tobias Koppers - box
Scheduled task state to save memory -->
* vercel/turborepo#8170 <!-- Tobias Koppers - Drop
excessive cells after task reexecution -->
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