Stream: t-compiler/rust-analyzer

Topic: rust-analyzer#1021

detrumi (Mar 22 2019 at 20:10, on Zulip):

Is there a way to re-export a module when running tests only? Doing #[cfg(test)] pub mod test_utils; builds fine, but can't be resolved during cargo test

detrumi (Mar 22 2019 at 20:14, on Zulip):

The import itself is inside a test module, so I had hoped for it to work

detrumi (Mar 22 2019 at 20:14, on Zulip):

Error here:

matklad (Mar 22 2019 at 20:14, on Zulip):

answered on the issue :) Basically , I wonder if we can fix proptest

matklad (Mar 22 2019 at 20:14, on Zulip):

is there at least an issue on proptest's repo about WASM?

detrumi (Mar 22 2019 at 20:15, on Zulip):

Hmm let me see, didn't check that yet

detrumi (Mar 22 2019 at 20:17, on Zulip):

Doesn't look like it, I'll look into it

detrumi (Mar 22 2019 at 20:31, on Zulip):

It's also weird that you can't re-use cfg-specific code very easily across crates, but maybe that's just a limitation of the current import system

detrumi (Mar 23 2019 at 10:28, on Zulip):

Proptest already has the forking stuff marked as optional, it's just enabled by default:

detrumi (Mar 23 2019 at 10:29, on Zulip):

Since RA doesn't use proptest timeouts, we can safely turn that off by using default-features = false

detrumi (Mar 23 2019 at 10:30, on Zulip):

Sadly there's still more problems around platform-specific string handling in proptest:

detrumi (Mar 23 2019 at 10:41, on Zulip):

Created to support building proptest on webassembly

matklad (Mar 23 2019 at 12:05, on Zulip):

Ok, so I think we should enable default-features=false for proptest, and after than maybe to find a work-around for wasm

detrumi (Mar 23 2019 at 12:07, on Zulip):

:+1: I'll open the PR for that

detrumi (Mar 23 2019 at 12:08, on Zulip):, already had the branch ready :slight_smile:

matklad (Mar 23 2019 at 12:09, on Zulip):


Last update: Jul 27 2021 at 22:15UTC