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

Fix path to dlls on windows #132

Merged
merged 2 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion skeptic/src/rt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,10 @@ impl Fingerprint {
rlib.pop();
rlib.pop();
rlib.pop();
let mut dll = rlib.clone();
rlib.push(format!("deps/lib{}-{}", libname, hash));
rlib = guess_ext(rlib, &["rlib", "so", "dylib", "dll"])?;
dll.push(format!("deps/{}-{}", libname, hash));
rlib = guess_ext(rlib, &["rlib", "so", "dylib"]).or_else(|_| guess_ext(dll, &["dll"]))?;

Ok(Fingerprint {
libname,
Expand Down
5 changes: 5 additions & 0 deletions testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ path = "../skeptic"
# It is not needed for normal uses of Skeptic.
[dependencies.skeptic]
path = "../skeptic"

[dependencies.derive_more]
version = "0.99"
default_features = false
features = ["from"]
3 changes: 2 additions & 1 deletion testing/tests/hashtag-test.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Rust code that includes a "`#`" should be tested by skeptic without error.

```rust
#[derive(derive_more::From)]
struct Person<'a>(&'a str);
fn main() {
let _ = Person("#bors");
let _ = Person::from("#bors");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this necessary to test the behavior on Windows?

Copy link
Contributor Author

@ilslv ilslv Feb 1, 2022

Choose a reason for hiding this comment

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

This line isn't necessary. It's even enough to make sure that any external proc macro is visible, so in case of this PR, use derive_more::From;

The main idea is that proc macros are always compiled as dynamic libraries, so if we are able to use them, we are sure, that they are linked.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Okay, if we need the extra dependency I'm fine leaving it like this.

Can you fix up the formatting? I'll merge after that.

}
```

Expand Down