Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@ toml = "0.8"
# needs real I/O (git fetch, filesystem), so it's off by default for
# `comline-core`'s wasm32 consumers (the playground editor, the language
# server); the CLI is the one consumer that actually runs `comline build`.
comline-core = { git = "https://github.com/ComlineProject/core", rev = "af7e90452334d302c91b7f8815ad44e2bedfebf9", features = ["deps"] }
# All three pinned to revs that already agree on comline-core@af7e904 (a
# transparent `type` alias declaration, core#54) — bumped together, in
# dependency order: generation#24 first (comline-rust/comline-typescript's
# own codegen crates consume `comline-codegen`'s types, so they can't bump
# ahead of it), then comline-rust#15 and comline-typescript#13.
comline-codegen = { git = "https://github.com/ComlineProject/generation", rev = "1464e4fd87537ef6591ba8b165838467e0c33d83" }
comline-codegen-rust = { git = "https://github.com/ComlineProject/comline-rust", rev = "65d986d98900382aa069ed7b787fade6e0fa5c80", optional = true }
comline-codegen-typescript = { git = "https://github.com/ComlineProject/comline-typescript", rev = "09db5448994b7475b2f6f748ebaad2a0172d7f05", optional = true }
comline-core = { git = "https://github.com/ComlineProject/core", rev = "9ec094ec8e573350c6f230aaa58388d032aaa966", features = ["deps"] }
# All three pinned to revs that already agree on comline-core@9ec094e (a
# `type` alias now freezes to its own named unit instead of being
# substituted away, so a generator can emit a real `type Foo = Bar;`,
# core#55) — bumped together, in dependency order: generation#26 first
# (comline-rust/comline-typescript's own codegen crates consume
# `comline-codegen`'s types, so they can't bump ahead of it), then
# comline-rust#16 and comline-typescript#14.
comline-codegen = { git = "https://github.com/ComlineProject/generation", rev = "8e28be4566546d3feb8c5caae35d111e7a54df7e" }
comline-codegen-rust = { git = "https://github.com/ComlineProject/comline-rust", rev = "2ad8b7423978c17617f01dabbca3a6434c690393", optional = true }
comline-codegen-typescript = { git = "https://github.com/ComlineProject/comline-typescript", rev = "e4163a49a33b9ed20d9a03ebf5ad7a866ebf8d89", optional = true }

[features]
# Which language generators are compiled in. Drop one to shed its whole
Expand Down
11 changes: 8 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ fn emit_version_info() {
println!("cargo:rerun-if-changed=.git/HEAD");
println!("cargo:rerun-if-changed=.git/refs");

let hash = run(&["git", "rev-parse", "--short=12", "HEAD"]).unwrap_or_else(|| "unknown".to_string());
let hash =
run(&["git", "rev-parse", "--short=12", "HEAD"]).unwrap_or_else(|| "unknown".to_string());
let dirty = run(&["git", "status", "--porcelain"]).is_some_and(|s| !s.is_empty());
let branch =
run(&["git", "rev-parse", "--abbrev-ref", "HEAD"]).unwrap_or_else(|| "unknown".to_string());
let commit_count = run(&["git", "rev-list", "--count", "HEAD"]).unwrap_or_else(|| "unknown".to_string());
let commit_count =
run(&["git", "rev-list", "--count", "HEAD"]).unwrap_or_else(|| "unknown".to_string());
let build_date =
run(&["date", "-u", "+%Y-%m-%dT%H:%M:%SZ"]).unwrap_or_else(|| "unknown".to_string());

Expand All @@ -79,7 +81,10 @@ fn emit_version_info() {
/// Run a command, returning trimmed stdout on success - `None` on any
/// failure (missing binary, non-zero exit, not a git repo, ...).
fn run(args: &[&str]) -> Option<String> {
let output = ProcessCommand::new(args[0]).args(&args[1..]).output().ok()?;
let output = ProcessCommand::new(args[0])
.args(&args[1..])
.output()
.ok()?;
if !output.status.success() {
return None;
}
Expand Down
Loading