Stream: t-compiler/wg-rls-2.0

Topic: building with stable


matklad (Apr 29 2019 at 14:01, on Zulip):

thread for gh issue

pnkfelix (Apr 29 2019 at 14:02, on Zulip):

I think I resolved it

matklad (Apr 29 2019 at 14:02, on Zulip):

nvm, problem solved

pnkfelix (Apr 29 2019 at 14:02, on Zulip):

but i am curious

pnkfelix (Apr 29 2019 at 14:02, on Zulip):

whether we should attempt to support both stable and nightly channels?

pnkfelix (Apr 29 2019 at 14:02, on Zulip):

or maybe that's not worth it. I don't know

pnkfelix (Apr 29 2019 at 14:03, on Zulip):

the dependence on the absence/presence of trailing commas in json output format seems quite unfortunate. Don't know which entity is to blame there, I guess its us.

matklad (Apr 29 2019 at 14:03, on Zulip):

I hope that this colon issue is an odd one

pnkfelix (Apr 29 2019 at 14:03, on Zulip):

But people aren't supposed to rely on {:?} formatting...

pnkfelix (Apr 29 2019 at 14:03, on Zulip):

Oh, is RA using {:?} as the way to generate the test output there? Maybe that is the real bug then.

matklad (Apr 29 2019 at 14:03, on Zulip):

yeah, I wonder if we should change our testing strategy

matklad (Apr 29 2019 at 14:04, on Zulip):

we do use {:?} for snapshot testing

pnkfelix (Apr 29 2019 at 14:04, on Zulip):

I'll maybe see if there's something easy we can fix there.

pnkfelix (Apr 29 2019 at 14:04, on Zulip):

e.g. use a Display or something

pnkfelix (Apr 29 2019 at 14:04, on Zulip):

(some more stable format)

matklad (Apr 29 2019 at 14:05, on Zulip):

I also wondered that. The main problem with just using Debug is that test-results are less readable: a hand-crafted Display is almost always better than derived debug

matklad (Apr 29 2019 at 14:06, on Zulip):

OTOH, #[derive(Debug)] is so much easier to use, and it guarantess that, if you add a field, you'll need to update the tests (with manual display, you'll need to remember to add the field to Display yourself)

matklad (Apr 29 2019 at 14:07, on Zulip):

I am currently inclined to think that, as this is strictly about tests, it's ok to rely on Debug, and just update the expected results if it ever changes

Florian Diebold (Apr 29 2019 at 14:07, on Zulip):

if you add a field, you'll need to update the tests

that could also count on the downsides ;)
I would guess usually if you add a field that's relevant for tests, you'll want to write tests for it and so naturally have to add it to the test representation

matklad (Apr 29 2019 at 14:08, on Zulip):

FWIW, for completion, we do use custom representation, because the default one is very verbose

Florian Diebold (Apr 29 2019 at 14:08, on Zulip):

which tests actually use Debug?

matklad (Apr 29 2019 at 14:09, on Zulip):

almost all of them, except for type inference and completion?

matklad (May 01 2019 at 17:49, on Zulip):

If https://github.com/rust-lang/rust/pull/60444 fixes that annoying caching problem, that would be enough motivation for me to swtitch to nightly and fix the tests to not rely on Debug :P

Florian Diebold (May 01 2019 at 18:36, on Zulip):

Hm... I'm probably misunderstanding the comments, but this sounds to me like the compiler error is actually correct and we need to change the code to fix the cycle?

Florian Diebold (May 01 2019 at 18:36, on Zulip):

I guess we'll see when the PR is merged ;)

Last update: Nov 12 2019 at 15:30UTC