diff --git a/Cargo.toml b/Cargo.toml index 478310f..f2da39f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,14 +38,14 @@ serde_json = "1.0" # Pure Rust, so the analysis library still builds for wasm32. The same # release line `comline-codegen`'s `toml` 0.8 parses with. toml_edit = { version = "0.22", default-features = false, features = ["parse"] } -comline-core = { git = "https://github.com/ComlineProject/core", rev = "076cae0c3a0639b0c083b61a94f9d4913e853b3f" } +comline-core = { git = "https://github.com/ComlineProject/core", rev = "525939352b79538ce5e9b41ae6713ee6bd26a25e" } # What each generator supports, feature by feature (`comline_codegen::features`) # - for warning at a use a declared language can't generate. Only the # generators' `SUPPORT` tables are read; nothing is generated. Pinned to the # same commits as the CLI, so a build has one `comline-codegen`. -comline-codegen = { git = "https://github.com/ComlineProject/generation", rev = "7b51264b216ef4c5e2afbe36897a5b35dafe7e06" } -comline-codegen-rust = { git = "https://github.com/ComlineProject/comline-rust", rev = "bef9a74c028d7a44b4dc13ed677d300e061b2147" } -comline-codegen-typescript = { git = "https://github.com/ComlineProject/comline-typescript", rev = "47b54cc75b05bc52586d431d26ed4def316cf0c4" } +comline-codegen = { git = "https://github.com/ComlineProject/generation", rev = "ac4425c32f88f98a2a3bfb971a209c173c6559a8" } +comline-codegen-rust = { git = "https://github.com/ComlineProject/comline-rust", rev = "8d0d659d100d41d64d203a7890a6b15471cde802" } +comline-codegen-typescript = { git = "https://github.com/ComlineProject/comline-typescript", rev = "37cd70f96260325f37a39be6a15cb858d2e069dc" } # `server`-only. tower-lsp = { version = "0.20.0", optional = true } diff --git a/src/analysis/source.rs b/src/analysis/source.rs index b845273..cc596d6 100644 --- a/src/analysis/source.rs +++ b/src/analysis/source.rs @@ -525,6 +525,13 @@ mod tests { assert_eq!(declared_settings(manifest), base_settings()); } + #[test] + fn a_malformed_package_id_is_what_a_build_would_reject() { + let err = manifest_error("congregation app\nid = \"nope\"\nspecification_version = 1\n", None) + .expect("a malformed id is an error"); + assert!(err.contains("hex"), "{err}"); + } + #[test] fn manifest_error_names_what_a_build_would_reject() { // Silent in the editor before: this was a panic in core, so the @@ -539,6 +546,10 @@ mod tests { #[test] fn manifest_error_is_quiet_for_a_valid_or_incomplete_manifest() { assert_eq!(manifest_error("congregation app\nspecification_version = 1\n", None), None); + // The package id (core#159) is a key the editor knows; a malformed + // one is what a build refuses. + let id = "congregation app\nid = \"0123456789abcdef0123456789abcdef\"\nspecification_version = 1\n"; + assert_eq!(manifest_error(id, None), None); // Incomplete: the parse pass already reports this, so reporting it // here too would double up. assert_eq!(manifest_error("congregation app\nsettings = {", None), None);