Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around nextest macro lib compatibility bug #1372

Merged
merged 1 commit into from
May 17, 2024

Conversation

EliahKagan
Copy link
Member

@EliahKagan EliahKagan commented May 17, 2024

This sets the RUSTUP_WINDOWS_PATH_ADD_BIN environment variable in the multi-platform test job, to work around nextest-rs/nextest#1493 which is keeping the test runner from working on Windows. See also ruffle-rs/ruffle#16342, which gave the idea for this, and various other projects that have made such changes, linked in nextest-rs/nextest#1493.

Running cargo nextest run --all on Windows produces output like:

$ cargo nextest run --all
warning: function `evaluate_target_dir` is never used
 --> gix-prompt\tests\prompt.rs:9:8
  |
9 |     fn evaluate_target_dir() -> String {
  |        ^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: `gix-prompt` (test "prompt") generated 1 warning
   Compiling gix-filter v0.11.1 (C:\Users\ek\source\repos\gitoxide\gix-filter)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 2.39s
error: creating test list failed

Caused by:
  for `gix-macros`, command `'C:\Users\ek\source\repos\gitoxide\target\debug\deps\gix_macros-9b54cd09b507c731.exe' --list --format terse` exited with code 0xc0000135: The specified module could not be found. (os error 126)
--- stdout:

--- stderr:

---

I believe the relevant portion of the output starts at error: creating test list failed. Attempting to run the command manually shows:

$ 'C:\Users\ek\source\repos\gitoxide\target\debug\deps\gix_macros-9b54cd09b507c731.exe' --list --format terse
C:/Users/ek/source/repos/gitoxide/target/debug/deps/gix_macros-9b54cd09b507c731.exe: error while loading shared libraries: std-49e3d1aefc00cc02.dll: cannot open shared object file: No such file or directory

As mentioned in #1371 (comment), this occurs both locally and on CI and is not specific to changes proposed in #1371, nor is it related to gix-macros changes in bad5b48 (#1363).

I've gone ahead and set that environment variable for all three platforms that have test-fast CI jobs, but not in other jobs. It does not appear to cause problems for other platforms. Once this change is no longer needed, it should probably be reverted, but I think it is useful right now because it should let #1371 and any other forthcoming PRs move forward.

This sets the `RUSTUP_WINDOWS_PATH_ADD_BIN` environment variable in
the multi-platform test job, to work around
nextest-rs/nextest#1493 which is keeping
the test runner from working on Windows.

See also ruffle-rs/ruffle#16342, which gave
the idea for this, and various other projects that have made such
changes, linked in nextest-rs/nextest#1493.
@EliahKagan EliahKagan marked this pull request as ready for review May 17, 2024 06:47
Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a million!

@Byron Byron merged commit 4735d17 into GitoxideLabs:main May 17, 2024
19 checks passed
@EliahKagan EliahKagan deleted the find-dll branch May 17, 2024 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants