Skip to content

Commit

Permalink
Sort packages in AIR_CRATE_NAMES
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisVaughan committed Jan 3, 2025
1 parent 8c1ae65 commit b11f252
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
11 changes: 9 additions & 2 deletions crates/server/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,17 @@ fn write_workspace_crate_names() {
cmd.no_deps();
let metadata = cmd.exec().unwrap();

let packages: Vec<String> = metadata
let mut packages: Vec<String> = metadata
.workspace_packages()
.iter()
.into_iter()
.map(|package| package.name.clone())
.collect();

// Sort for stability across `cargo metadata` versions
packages.sort();

let packages: Vec<String> = packages
.into_iter()
.map(|package| String::from("\"") + package.as_str() + "\",")
.collect();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ expression: AIR_CRATE_NAMES
---
[
"air",
"air_r_formatter",
"air_r_syntax",
"air_formatter_test",
"source_file",
"air_r_parser",
"air_r_factory",
"tests_macros",
"air_r_formatter",
"air_r_parser",
"air_r_syntax",
"biome_ungrammar",
"fs",
"server",
"workspace",
"server_test",
"biome_ungrammar",
"xtask_codegen",
"source_file",
"tests_macros",
"workspace",
"xtask",
"xtask_codegen",
]

0 comments on commit b11f252

Please sign in to comment.