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

Not running with Rust 1.56.0 #6

Closed
beoboo opened this issue Oct 29, 2021 · 10 comments
Closed

Not running with Rust 1.56.0 #6

beoboo opened this issue Oct 29, 2021 · 10 comments
Assignees

Comments

@beoboo
Copy link

beoboo commented Oct 29, 2021

I tried to run all tests with rust 1.56.0, and they fail.

Rust 1.55.0 works fine.

@dynaxis dynaxis self-assigned this Oct 30, 2021
@dynaxis
Copy link
Member

dynaxis commented Oct 30, 2021

@beoboo first of all, thank you for checking it out w/ the new Rust release. But when I just tried to run all of the tests in intertrait, it compiles well and all of the tests pass just fine at least under WSL2 on Windows 10 w/ Rust 1.56.0. Could you elaborate more on what's wrong w/ the new Rust release?

@beoboo
Copy link
Author

beoboo commented Oct 30, 2021

I'm using it in a Mac with Catalina, It compiles fine but 10 out of 25 tests fail. The failures are on

failures: tests::cast_arc tests::cast_arc_from_any tests::cast_box tests::cast_box_from_any tests::cast_mut tests::cast_mut_from_any tests::cast_rc tests::cast_rc_from_any tests::cast_ref tests::cast_ref_from_any tests::impls_arc tests::impls_box tests::impls_mut tests::impls_rc tests::impls_ref

and, for example, the first failure is

---- tests::cast_box stdout ---- thread 'tests::cast_box' panicked at 'assertion failed: debug.is_ok()', src/lib.rs:340:9

If I can I'll try also the nightly build.

@beoboo
Copy link
Author

beoboo commented Oct 30, 2021

It doesn't work also with the latest nightly. Is there anything I can try?

@beoboo
Copy link
Author

beoboo commented Oct 30, 2021

I found that in v1.55 the length of the CASTER_MAP during tests is 1, while in v1.56 is 0. This is why it doesn't find any castable type. Continuining the investigation...

@beoboo
Copy link
Author

beoboo commented Oct 30, 2021

If I understooìd that correctlly, it's linkme that's failing on this call

@beoboo
Copy link
Author

beoboo commented Oct 30, 2021

And this seems the related issue: dtolnay/linkme#41 (failing exactly in the same spots, still unsolved).

@dynaxis
Copy link
Member

dynaxis commented Oct 31, 2021

@beoboo many thanks to your effort. Yes, linkme may behave differently on different platforms. I'll take a look at it.

@dynaxis
Copy link
Member

dynaxis commented Nov 5, 2021

@beoboo as you might expect, there's virtually nothing I can do w/o the relevant fix from linkme side, and it doesn't seem coming soon. If you feel there should be an option to work around the problem, I can either:

  1. Add a way of registering the generated casters manually
  2. Add an option to use an alternative mechanism such as inventory that works different from linkme

It would be best to come up w/ a solution not relying on such a platform specific hack, but due to the way intertrait works, I couldn't reach such a solution yet.

@beoboo
Copy link
Author

beoboo commented Nov 5, 2021

@dynaxis thanks a lot, I think adding the manual registration could improve the project in terms of testability/debuggability, and would work as a workaround for now (until linkme is fixed).

@dynaxis
Copy link
Member

dynaxis commented Jan 10, 2022

The relevant problem in linkme has been fixed and released as part of 0.2.9. So I'm closing this issue as resolved, but will try to add manual registrations of casters soon. Recently I couldn't spare any time to devote to the relevant work.

@dynaxis dynaxis closed this as completed Jan 10, 2022
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

No branches or pull requests

2 participants