Skip to content

Commit

Permalink
Reland "ReverseTopological -> AdjacencyMap"" (#52142)
Browse files Browse the repository at this point in the history
Reverts #52139
  • Loading branch information
huozhi authored and shuding committed Jul 8, 2023
1 parent cee29de commit 1d4ff62
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 54 deletions.
70 changes: 35 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ swc_core = { version = "0.78.24" }
testing = { version = "0.33.19" }

# Turbo crates
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230702.1" }
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230703.2" }
# [TODO]: need to refactor embed_directory! macro usages, as well as resolving turbo_tasks::function, macros..
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230702.1" }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230703.2" }
# [TODO]: need to refactor embed_directory! macro usage in next-core
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230702.1" }
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230703.2" }

# General Deps

Expand Down
10 changes: 5 additions & 5 deletions packages/next-swc/crates/next-build/src/next_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use next_core::{
};
use serde::Serialize;
use turbo_tasks::{
graph::{GraphTraversal, ReverseTopological},
graph::{AdjacencyMap, GraphTraversal},
CollectiblesSource, CompletionVc, RawVc, TransientInstance, TransientValue, TryJoinIterExt,
ValueToString,
};
Expand Down Expand Up @@ -519,13 +519,13 @@ async fn handle_issues<T: Into<RawVc> + CollectiblesSource + Copy>(
#[turbo_tasks::function]
async fn all_assets_from_entry(entry: AssetVc) -> Result<AssetsVc> {
Ok(AssetsVc::cell(
ReverseTopological::new()
AdjacencyMap::new()
.skip_duplicates()
.visit([entry], get_referenced_assets)
.await
.completed()?
.into_inner()
.into_iter()
.into_reverse_topological()
.collect(),
))
}
Expand All @@ -535,13 +535,13 @@ async fn all_assets_from_entry(entry: AssetVc) -> Result<AssetsVc> {
#[turbo_tasks::function]
async fn all_assets_from_entries(entries: AssetsVc) -> Result<AssetsVc> {
Ok(AssetsVc::cell(
ReverseTopological::new()
AdjacencyMap::new()
.skip_duplicates()
.visit(entries.await?.iter().copied(), get_referenced_assets)
.await
.completed()?
.into_inner()
.into_iter()
.into_reverse_topological()
.collect(),
))
}
Expand Down
4 changes: 2 additions & 2 deletions packages/next-swc/crates/next-core/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"check": "tsc --noEmit"
},
"dependencies": {
"@vercel/turbopack-ecmascript-runtime": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230702.1",
"@vercel/turbopack-node": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230702.1",
"@vercel/turbopack-ecmascript-runtime": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230703.2",
"@vercel/turbopack-node": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230703.2",
"anser": "^2.1.1",
"css.escape": "^1.5.1",
"next": "*",
Expand Down

0 comments on commit 1d4ff62

Please sign in to comment.