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(turbopack-ecmascript): Make expand_star_exports more deterministic #75383

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(turbopack-ecmascript): Make expand_star_exports more deterministic
  • Loading branch information
bgw committed Feb 3, 2025
commit 17f5dfe7552060930db5064e2d83a9357bb88f26
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
use std::{
borrow::Cow,
collections::{BTreeMap, HashSet},
ops::ControlFlow,
};
use std::{borrow::Cow, collections::BTreeMap, ops::ControlFlow};

use anyhow::Result;
use rustc_hash::FxHashSet;
use serde::{Deserialize, Serialize};
use swc_core::{
common::DUMMY_SP,
Expand All @@ -16,8 +13,8 @@ use swc_core::{
};
use turbo_rcstr::RcStr;
use turbo_tasks::{
trace::TraceRawVcs, FxIndexMap, NonLocalValue, ResolvedVc, TryFlatJoinIterExt, ValueToString,
Vc,
trace::TraceRawVcs, FxIndexMap, FxIndexSet, NonLocalValue, ResolvedVc, TryFlatJoinIterExt,
ValueToString, Vc,
};
use turbo_tasks_fs::glob::Glob;
use turbopack_core::{
Expand Down Expand Up @@ -338,9 +335,9 @@ pub struct ExpandStarResult {
pub async fn expand_star_exports(
root_module: Vc<Box<dyn EcmascriptChunkPlaceable>>,
) -> Result<Vc<ExpandStarResult>> {
let mut set = HashSet::new();
let mut set = FxIndexSet::default();
let mut has_dynamic_exports = false;
let mut checked_modules = HashSet::new();
let mut checked_modules = FxHashSet::default();
checked_modules.insert(root_module);
let mut queue = vec![(root_module, root_module.get_exports())];
while let Some((asset, exports)) = queue.pop() {
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy