Stream: t-compiler/wg-rls-2.0

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: https://travis-ci.org/rust-analyzer/rust-analyzer/jobs/510048576#L522

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: https://altsysrq.github.io/proptest-book/proptest/forking.html

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: https://github.com/AltSysrq/proptest/blob/d1c4b049337d2f75dd6f49a095115f7c532e5129/proptest/src/arbitrary/_std/env.rs#L89

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

Created https://github.com/AltSysrq/proptest/issues/137 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):

https://github.com/rust-analyzer/rust-analyzer/pull/1025, already had the branch ready :slight_smile:

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

r+ed!

Last update: Nov 19 2019 at 18:20UTC