Skip to content

Commit 561a00e

Browse files
author
Grant Wuerker
committed
Resolution handler API and ingot graph resolution.
1 parent a66b7e1 commit 561a00e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1452
-564
lines changed

Cargo.lock

Lines changed: 129 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ tracing = "0.1.41"
3434
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
3535
tracing-tree = "0.4.0"
3636
wasm-bindgen-test = "0.3"
37+
semver = "1.0.26"
38+
petgraph = "0.8"
3739

3840
[profile.dev]
3941
# Set to 0 to make the build faster and debugging more difficult.

crates/common/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ toml = "0.8.8"
1717
serde = { version = "1.0", features = ["derive"] }
1818
thiserror = "1.0"
1919
tracing.workspace = true
20+
petgraph.workspace = true
2021

2122
parser.workspace = true
2223
url.workspace = true

crates/common/src/config.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl Config {
6464
Value::Table(table) => {
6565
let path = table.get("path").and_then(|value| value.as_str());
6666
if let Some(path) = path {
67-
let mut parameters = DependencyParameters::default();
67+
let mut parameters = DependencyArguments::default();
6868
if let Some(name) = table.get("name").and_then(|value| value.as_str()) {
6969
parameters.name = Some(SmolStr::new(name));
7070
}
@@ -139,7 +139,7 @@ pub enum DependencyDescription {
139139
Path(Utf8PathBuf),
140140
PathWithParameters {
141141
path: Utf8PathBuf,
142-
parameters: DependencyParameters,
142+
parameters: DependencyArguments,
143143
},
144144
}
145145

@@ -160,7 +160,7 @@ impl Dependency {
160160
pub fn path_with_arguments(
161161
alias: SmolStr,
162162
path: Utf8PathBuf,
163-
parameters: DependencyParameters,
163+
parameters: DependencyArguments,
164164
) -> Self {
165165
Self {
166166
alias,
@@ -172,15 +172,15 @@ impl Dependency {
172172
match &self.description {
173173
DependencyDescription::Path(path) => BasedDependency {
174174
alias: self.alias.clone(),
175-
parameters: DependencyParameters::default(),
175+
parameters: DependencyArguments::default(),
176176
url: base_url.join_directory(path).unwrap(),
177177
},
178178
DependencyDescription::PathWithParameters {
179179
path,
180180
parameters: _,
181181
} => BasedDependency {
182182
alias: self.alias.clone(),
183-
parameters: DependencyParameters::default(),
183+
parameters: DependencyArguments::default(),
184184
url: base_url.join_directory(path).unwrap(),
185185
},
186186
}
@@ -190,12 +190,12 @@ impl Dependency {
190190
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
191191
pub struct BasedDependency {
192192
pub alias: SmolStr,
193-
pub parameters: DependencyParameters,
193+
pub parameters: DependencyArguments,
194194
pub url: Url,
195195
}
196196

197197
#[derive(Debug, Default, Clone, PartialEq, Eq, Hash)]
198-
pub struct DependencyParameters {
198+
pub struct DependencyArguments {
199199
pub name: Option<SmolStr>,
200200
pub version: Option<Version>,
201201
}

crates/common/src/file/workspace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub struct Workspace {
2121
#[salsa::tracked]
2222
impl Workspace {
2323
pub fn default(db: &dyn InputDb) -> Self {
24-
Workspace::new(db, Trie::new(), IndexMap::new())
24+
Workspace::new(db, Trie::new(), IndexMap::default())
2525
}
2626
pub(crate) fn set(
2727
&self,

0 commit comments

Comments
 (0)