pr 61.2
This commit is contained in:
@@ -134,7 +134,7 @@ mod tests {
|
||||
use crate::deps::resolver::{ProjectId, ResolvedEdge, ResolvedGraph, ResolvedNode};
|
||||
use crate::manifest::Manifest;
|
||||
use crate::sources::ProjectSources;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
fn mock_node(name: &str, version: &str) -> ResolvedNode {
|
||||
ResolvedNode {
|
||||
@@ -144,7 +144,7 @@ mod tests {
|
||||
name: name.to_string(),
|
||||
version: version.to_string(),
|
||||
kind: crate::manifest::ManifestKind::Lib,
|
||||
dependencies: HashMap::new(),
|
||||
dependencies: BTreeMap::new(),
|
||||
},
|
||||
sources: ProjectSources {
|
||||
main: None,
|
||||
|
||||
@@ -95,6 +95,10 @@ pub enum Commands {
|
||||
Verify {
|
||||
/// Path to the project root directory.
|
||||
project_dir: PathBuf,
|
||||
|
||||
/// Whether to explain the dependency resolution process.
|
||||
#[arg(long)]
|
||||
explain_deps: bool,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -125,10 +129,10 @@ pub fn run() -> Result<()> {
|
||||
let compilation_unit = compiler::compile_ext(&project_dir, explain_deps)?;
|
||||
compilation_unit.export(&out, emit_disasm, emit_symbols)?;
|
||||
}
|
||||
Commands::Verify { project_dir } => {
|
||||
Commands::Verify { project_dir, explain_deps } => {
|
||||
println!("Verifying project at {:?}", project_dir);
|
||||
|
||||
compiler::compile(&project_dir)?;
|
||||
compiler::compile_ext(&project_dir, explain_deps)?;
|
||||
println!("Project is valid!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::HashMap;
|
||||
use std::collections::BTreeMap;
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
@@ -40,7 +40,7 @@ pub struct Manifest {
|
||||
#[serde(default)]
|
||||
pub kind: ManifestKind,
|
||||
#[serde(default)]
|
||||
pub dependencies: HashMap<Alias, DependencySpec>,
|
||||
pub dependencies: BTreeMap<Alias, DependencySpec>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
||||
Reference in New Issue
Block a user