Commit 6b741bc
authored
Fix Windows backend import condition to match cfg_if! logic (#137)
* Fix Windows backend import condition to match cfg_if! logic
When running under Miri on Windows, the cfg_if! block in backends/mod.rs selects the fallback backend (because miri is checked first), but the conditional import at line 178 was only checking #[cfg(windows)], causing a compilation error when the windows module wasn't compiled.
This fix ensures the import condition matches the cfg_if! logic by using #[cfg(all(windows, not(miri)))] instead of #[cfg(windows)], so the windows backend is only imported when it's actually compiled.
Fixes compilation error: could not find 'windows' in 'backends'
* Add Miri testing to CI workflow
Adds a new miri-test job that runs Miri tests on Ubuntu, Windows, and macOS for both stacker and psm manifests. This will help catch conditional compilation issues like the one fixed in the previous commit.
* Limit Miri tests to stacker crate only
The psm crate has test compilation issues unrelated to this fix. Focus Miri testing on the main stacker crate where the cfg condition fix applies.
* Skip heavy recursion tests under Miri
Deep recursion tests are too slow under Miri's interpreter. These tests are skipped under Miri while still validating that the code compiles correctly (which was the main goal - catching the cfg condition mismatch).
* Update Miri test conditions in smoke.rs
Modified the deep test to include Miri in the target architecture check, allowing for better handling of recursion limits under Miri. This change ensures that the test is appropriately limited when running in the Miri environment, addressing performance concerns.1 parent a9fc568 commit 6b741bc
4 files changed
Lines changed: 27 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
0 commit comments