diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6504f32c..26cb693d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -88,7 +88,8 @@ jobs: - name: Install cross if: ${{ matrix.use-cross }} - run: cargo install cross --git https://github.com/cross-rs/cross + # TODO: Remove 'RUSTFLAGS=""' onc https://github.com/cross-rs/cross/issues/1561 is resolved + run: RUSTFLAGS="" cargo install cross --git https://github.com/cross-rs/cross - name: Configure cross if: ${{ matrix.use-cross }} @@ -138,6 +139,7 @@ jobs: - name: Build wasmtime library if: ${{ !matrix.use-cross && contains(matrix.features, 'wasm') }} run: | + mkdir -p target WASMTIME_VERSION=$(cargo metadata --format-version=1 --locked --features wasm | \ jq -r '.packages[] | select(.name == "wasmtime-c-api-impl") | .version') curl -LSs "$WASMTIME_REPO/archive/refs/tags/v${WASMTIME_VERSION}.tar.gz" | tar xzf - -C target diff --git a/Cargo.lock b/Cargo.lock index f03977e7..ada9e0c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -426,9 +426,9 @@ dependencies = [ [[package]] name = "ctor" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" +checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" dependencies = [ "quote", "syn", diff --git a/Cargo.toml b/Cargo.toml index e20911cc..5ceb1aef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -105,7 +105,7 @@ clap = { version = "4.5.21", features = [ "unstable-styles", ] } clap_complete = "4.5.38" -ctor = "0.2.8" +ctor = "0.2.9" ctrlc = { version = "3.4.5", features = ["termination"] } dialoguer = { version = "0.11.0", features = ["fuzzy-select"] } dirs = "5.0.1" diff --git a/cli/src/query_testing.rs b/cli/src/query_testing.rs index ef6449c9..87204841 100644 --- a/cli/src/query_testing.rs +++ b/cli/src/query_testing.rs @@ -223,11 +223,11 @@ pub fn assert_expected_captures( let contents = fs::read_to_string(path)?; let pairs = parse_position_comments(parser, language, contents.as_bytes())?; for assertion in &pairs { - if let Some(found) = &infos - .iter() - .find(|p| assertion.position >= p.start && - (assertion.position.row < p.end.row || assertion.position.column + assertion.length - 1 < p.end.column)) - { + if let Some(found) = &infos.iter().find(|p| { + assertion.position >= p.start + && (assertion.position.row < p.end.row + || assertion.position.column + assertion.length - 1 < p.end.column) + }) { if assertion.expected_capture_name != found.name && found.name != "name" { return Err(anyhow!( "Assertion failed: at {}, found {}, expected {}", diff --git a/cli/src/test_highlight.rs b/cli/src/test_highlight.rs index 75c7fc3f..1ba0fe7a 100644 --- a/cli/src/test_highlight.rs +++ b/cli/src/test_highlight.rs @@ -171,7 +171,7 @@ pub fn iterate_assertions( // position, looking for one that matches the assertion. let mut j = i; while let (false, Some(highlight)) = (passed, highlights.get(j)) { - end_column = (*position).column + length - 1; + end_column = position.column + length - 1; if highlight.0.column > end_column { break 'highlight_loop; } diff --git a/cli/src/test_tags.rs b/cli/src/test_tags.rs index 2295ee63..78cd2462 100644 --- a/cli/src/test_tags.rs +++ b/cli/src/test_tags.rs @@ -132,7 +132,7 @@ pub fn test_tag( // position, looking for one that matches the assertion let mut j = i; while let (false, Some(tag)) = (passed, tags.get(j)) { - end_column = (*position).column + length - 1; + end_column = position.column + length - 1; if tag.0.column > end_column { break 'tag_loop; }