Stream: general

Topic: backtrace / track_caller when in stable ?


zeroexcuses (May 09 2020 at 17:56, on Zulip):

I believe 'backtrace' and 'track_caller' are currently nightly only but not in stable. Is there a timeline for when these features will be moved in to stable? (I have a code base that sometimes run into linking problems w/ nightly + incremental compile, but I also want to use these two features on.)

RalfJ (May 09 2020 at 18:00, on Zulip):

if you are having trouble with nightly now you'll see that trouble on stable in 6-12 weeks unless someone fixes it on nightly in the mean time.

RalfJ (May 09 2020 at 18:00, on Zulip):

so, please report these bugs :)

RalfJ (May 09 2020 at 18:01, on Zulip):

I can't help with your actual question though, sorry. Maybe try finding the tracking issues to see what the outstanding concerns are?

RalfJ (May 09 2020 at 18:01, on Zulip):

they should be in this list

zeroexcuses (May 09 2020 at 18:02, on Zulip):

I'm doing something like tdd in Rust, running a recompile + unit test ever 5-10 minutes. The 'bug' I run into is that on my 20-30k loc project, with incremental compile enabled, every few hours, rustc runs into a linking error. The only way to fix this linking error is a 'cargo clean', after which it rebuilds fine. The source code is not open source. I have no idea how to even begin filing a bug for this.

Lokathor (May 09 2020 at 18:04, on Zulip):

I've also had the occasional linking error with cargo watch test, but a cargo clean has always solved it.

zeroexcuses (May 09 2020 at 18:04, on Zulip):

This bug is non-deterministic, no idea how to reproduce, depends on some hidden state (cached compile units in target/debug) that may be GB's in size. I've been using nightly I think from he start, but this issue has pushed me to stable.

simulacrum (May 09 2020 at 18:05, on Zulip):

Are you on recent nightly?

zeroexcuses (May 09 2020 at 18:05, on Zulip):

@Lokathor : Yeah, IntelliJ/Code are probably calling 'cargo test' behind the scenes. So I guess we've made the progress of narrowed it from 'cargo build' to 'cargo test' :-)

simulacrum (May 09 2020 at 18:05, on Zulip):

I seem to recall a similar bug being fixed by @pnkfelix not too long ago...

Lokathor (May 09 2020 at 18:06, on Zulip):

I am on rustc 1.44.0-nightly (7f3df5772 2020-04-16)

zeroexcuses (May 09 2020 at 18:06, on Zulip):

@simulacrum : It's currently uninstalled, but I think I did a "rustup toolchain install nightly" within the past few days (and got a link error after that in vs code)

simulacrum (May 09 2020 at 18:07, on Zulip):

hm okay

simulacrum (May 09 2020 at 18:07, on Zulip):

it's almost certainly an incremental bug -- one thing that may work is if you can catch it and the codebase is public you can create a zip / tarball of the project state as a whole (including target directory) and then post that in an issue

zeroexcuses (May 09 2020 at 18:08, on Zulip):

(this is pure speculation); I think one way to cause it involves trait names that overlap so if trait Foo1T nas a fn foo, and trait Foo2T has a fn foo, then there are situations where ...

zeroexcuses (May 09 2020 at 18:09, on Zulip):

(and some object impls both Foo1T and Foo2T)

zeroexcuses (May 09 2020 at 18:10, on Zulip):

I agree it's almost certainly an incremental issue. 'cargo clean' and/or rm target/debug has always fixed it

zeroexcuses (May 09 2020 at 18:12, on Zulip):

codebase is definitely not public; if I can manage to trigger the linking error again, would it be helpful to the compiler team ?

simulacrum (May 09 2020 at 18:13, on Zulip):

without having the code and a snapshot of the target directory probably no

simulacrum (May 09 2020 at 18:13, on Zulip):

unfortunately linker errors as a result of incremental without a reproduction that is reliable are pretty much impossible to fix I think

zeroexcuses (May 09 2020 at 18:14, on Zulip):

good to know; also, is there some other linker that can be used for faster linking (during dev time)? for whatever reason, linking seems to take quite a bit of time these days

simulacrum (May 09 2020 at 18:16, on Zulip):

lld is the common recommendation

RalfJ (May 09 2020 at 18:16, on Zulip):

zeroexcuses said:

good to know; also, is there some other linker that can be used for faster linking (during dev time)? for whatever reason, linking seems to take quite a bit of time these days

you might be interested in https://github.com/rust-lang/rust/issues/71515

Last update: May 29 2020 at 18:00UTC