-
-
Notifications
You must be signed in to change notification settings - Fork 577
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(compilation): add queue handlers representing task_queue
- Loading branch information
Showing
14 changed files
with
169 additions
and
18 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
crates/rspack_core/src/dependency/loader_import_dependency.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
use crate::{ | ||
AsContextDependency, AsDependencyTemplate, Dependency, DependencyId, ModuleDependency, | ||
}; | ||
|
||
#[derive(Debug, Hash, PartialEq, Eq, Clone)] | ||
pub struct LoaderImportDependency { | ||
request: String, | ||
id: DependencyId, | ||
} | ||
|
||
impl LoaderImportDependency { | ||
pub fn new(request: String) -> Self { | ||
Self { | ||
request, | ||
id: DependencyId::new(), | ||
} | ||
} | ||
} | ||
|
||
impl AsDependencyTemplate for LoaderImportDependency {} | ||
impl AsContextDependency for LoaderImportDependency {} | ||
|
||
impl Dependency for LoaderImportDependency { | ||
fn dependency_debug_name(&self) -> &'static str { | ||
"LoaderImportDependency" | ||
} | ||
|
||
fn id(&self) -> &crate::DependencyId { | ||
&self.id | ||
} | ||
|
||
fn dependency_type(&self) -> &crate::DependencyType { | ||
&crate::DependencyType::LoaderImport | ||
} | ||
} | ||
|
||
impl ModuleDependency for LoaderImportDependency { | ||
fn request(&self) -> &str { | ||
&self.request | ||
} | ||
|
||
fn user_request(&self) -> &str { | ||
&self.request | ||
} | ||
|
||
fn set_request(&mut self, request: String) { | ||
self.request = request | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
use std::hash::BuildHasherDefault; | ||
|
||
use dashmap::{DashMap, DashSet}; | ||
use rustc_hash::FxHasher; | ||
|
||
pub type FxDashMap<K, V> = DashMap<K, V, BuildHasherDefault<FxHasher>>; | ||
pub type FxDashSet<V> = DashSet<V, BuildHasherDefault<FxHasher>>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters