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

Source trait #5483

Merged
merged 11 commits into from
Jul 11, 2023
Merged

Source trait #5483

merged 11 commits into from
Jul 11, 2023

Conversation

sokra
Copy link
Member

@sokra sokra commented Jul 10, 2023

Description

  • rename SourceAsset to FileSource
  • rename VirtualAsset to VirtualSource
  • add Source trait
  • use SourceVc in some places

next.js PR: vercel/next.js#52511

@sokra sokra requested a review from a team as a code owner July 10, 2023 15:17
@vercel
Copy link

vercel bot commented Jul 10, 2023

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

Name Status Preview Comments Updated (UTC)
examples-tailwind-web 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jul 11, 2023 9:03am
10 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 9:03am
examples-cra-web ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 9:03am
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 9:03am
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 9:03am
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 9:03am
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 9:03am
examples-nonmonorepo ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 9:03am
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 9:03am
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 9:03am
turbo-site ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 9:03am

pub start: SourcePos,
pub end: SourcePos,
}

#[turbo_tasks::value_impl]
impl IssueSourceVc {
#[turbo_tasks::function]
pub async fn from_byte_offset(asset: AssetVc, start: usize, end: usize) -> Result<Self> {
pub async fn from_byte_offset(source: AssetVc, start: usize, end: usize) -> Result<Self> {
Copy link
Member Author

Choose a reason for hiding this comment

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

I wasn't able to change this to SourceVc yet, since it's called also called ModuleVc

@github-actions
Copy link
Contributor

✅ This change can build next-swc

@github-actions
Copy link
Contributor

github-actions bot commented Jul 10, 2023

⚠️ CI failed ⚠️

The following steps have failed in CI:

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

See workflow summary for details

@github-actions
Copy link
Contributor

Linux Benchmark for 70ebee5

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 5373.82µs ± 15.68µs 5418.04µs ± 20.34µs +0.82%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5037.21µs ± 29.31µs 5226.76µs ± 193.41µs +3.76%
bench_startup/Turbopack CSR/1000 modules 806.49ms ± 1.02ms 803.38ms ± 1.11ms -0.39%

@github-actions
Copy link
Contributor

Windows Benchmark for 70ebee5

Test Base PR % Significant %
bench_startup/Turbopack CSR/1000 modules 2972.45ms ± 7.66ms 3071.01ms ± 35.42ms +3.32% +0.41%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 15.59ms ± 0.05ms 15.53ms ± 0.01ms -0.36%
bench_hmr_to_eval/Turbopack CSR/1000 modules 15.49ms ± 0.01ms 15.49ms ± 0.02ms +0.06%
bench_startup/Turbopack CSR/1000 modules 2972.45ms ± 7.66ms 3071.01ms ± 35.42ms +3.32% +0.41%

@github-actions
Copy link
Contributor

Linux Benchmark for c056e49

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 5618.62µs ± 174.17µs 5401.47µs ± 27.37µs -3.86%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5037.17µs ± 32.05µs 5082.95µs ± 73.35µs +0.91%
bench_startup/Turbopack CSR/1000 modules 801.26ms ± 1.42ms 804.69ms ± 2.28ms +0.43%

@github-actions
Copy link
Contributor

Windows Benchmark for c056e49

Test Base PR % Significant %
bench_startup/Turbopack CSR/1000 modules 4262.26ms ± 11.87ms 4462.54ms ± 86.25ms +4.70% +0.09%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 16.20ms ± 0.15ms 16.07ms ± 0.07ms -0.81%
bench_hmr_to_eval/Turbopack CSR/1000 modules 15.90ms ± 0.06ms 15.85ms ± 0.02ms -0.37%
bench_startup/Turbopack CSR/1000 modules 4262.26ms ± 11.87ms 4462.54ms ± 86.25ms +4.70% +0.09%

@sokra sokra requested a review from a team as a code owner July 11, 2023 09:02
@sokra sokra merged commit 0bb91d3 into main Jul 11, 2023
@sokra sokra deleted the sokra/source-trait branch July 11, 2023 09:14
@github-actions
Copy link
Contributor

Linux Benchmark for 9a87dc5

Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 5417.85µs ± 18.68µs 5326.93µs ± 23.72µs -1.68% -0.11%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 5417.85µs ± 18.68µs 5326.93µs ± 23.72µs -1.68% -0.11%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5017.59µs ± 20.56µs 5039.71µs ± 60.22µs +0.44%
bench_startup/Turbopack CSR/1000 modules 799.05ms ± 1.57ms 803.53ms ± 4.85ms +0.56%

sokra added a commit to vercel/next.js that referenced this pull request Jul 11, 2023
### What?

refactoring see vercel/turborepo#5483

### Turbopack Changes

* vercel/turborepo#5483 <!-- Tobias Koppers - Source
trait -->
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 25, 2024
### Description

* rename SourceAsset to FileSource
* rename VirtualAsset to VirtualSource
* add Source trait
* use SourceVc in some places

next.js PR: #52511
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
### Description

* rename SourceAsset to FileSource
* rename VirtualAsset to VirtualSource
* add Source trait
* use SourceVc in some places

next.js PR: #52511
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 1, 2024
### Description

* rename SourceAsset to FileSource
* rename VirtualAsset to VirtualSource
* add Source trait
* use SourceVc in some places

next.js PR: #52511
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