From 051f570411fdc55128aaabf9196f20b4df3f46b5 Mon Sep 17 00:00:00 2001 From: Christopher Harrison Date: Wed, 5 Feb 2025 17:16:26 +0000 Subject: [PATCH 1/4] This should reproduce the problem --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed931c5f..3470f967 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,6 +107,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Prefetch grammars + run: cargo run --all-features -- prefetch + - name: Run test suite run: cargo test --all-features From 9ed3753a6943befb7964615172b2f03e2474df92 Mon Sep 17 00:00:00 2001 From: Christopher Harrison Date: Wed, 5 Feb 2025 17:47:06 +0000 Subject: [PATCH 2/4] Disable concurrent grammar building on Windows --- topiary-config/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/topiary-config/src/lib.rs b/topiary-config/src/lib.rs index 6b44e8ad..91149a6c 100644 --- a/topiary-config/src/lib.rs +++ b/topiary-config/src/lib.rs @@ -151,7 +151,8 @@ impl Configuration { let tmp_dir_path = tmp_dir.path().to_owned(); // When "parallel" is enabled, we use rayon to fetch and compile all found grammars in parallel. - #[cfg(feature = "parallel")] + // NOTE The MSVC linker does not seem to like concurrent builds + #[cfg(all(feature = "parallel", not(windows)))] { use rayon::prelude::*; self.languages @@ -160,7 +161,7 @@ impl Configuration { .collect::, TopiaryConfigFetchingError>>()?; } - #[cfg(not(feature = "parallel"))] + #[cfg(any(not(feature = "parallel"), windows))] { self.languages .iter() From bfd06fe65f81c0e11ac543abaf51ce78deb94ff2 Mon Sep 17 00:00:00 2001 From: Christopher Harrison Date: Wed, 5 Feb 2025 18:12:34 +0000 Subject: [PATCH 3/4] Update CHANGELOG --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77070d3b..5900e046 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,8 +62,9 @@ This name should be decided amongst the team before the release. ### Fixed - [#867](https://github.com/tweag/topiary/pull/867) Enable coverage check and add code samples for OpenSCAD +- [#869](https://github.com/tweag/topiary/pull/869) Disable parallel grammar building on Windows - +