Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Work around nextest macro lib compatibility bug#1372

Merged
Sebastian Thiel (Byron) merged 1 commit into
GitoxideLabs:mainfrom
EliahKagan:find-dll
May 17, 2024
Merged

Work around nextest macro lib compatibility bug#1372
Sebastian Thiel (Byron) merged 1 commit into
GitoxideLabs:mainfrom
EliahKagan:find-dll

Conversation

@EliahKagan
Copy link
Copy Markdown
Member

@EliahKagan Eliah Kagan (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.
Copy link
Copy Markdown
Member

@Byron Sebastian Thiel (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!

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