Stream: t-compiler

Topic: ui tests for MIR test


eddyb (Dec 04 2018 at 08:25, on Zulip):

@nikomatsakis I wonder if we can replace MIR tests with regular UI ones. the MIR test implementation is incredibly frustrating

oli (Dec 04 2018 at 08:43, on Zulip):

so they'd emit .mir files instead of .stderr files but generally behave the same?

eddyb (Dec 04 2018 at 08:47, on Zulip):

hmm I was thinking just making it stdout but maybe you're right

oli (Dec 04 2018 at 08:49, on Zulip):

We could even make it emit multiple .mir files (one per passes). Maybe comments in the .rs file could decide which passes to dump

eddyb (Dec 04 2018 at 08:51, on Zulip):

hmm oh right we'd need things like foo.pass-name.mir

oli (Dec 04 2018 at 09:07, on Zulip):

once I'm done with https://github.com/rust-lang/rust/pull/56244 I'll have a look at that

nikomatsakis (Dec 04 2018 at 12:20, on Zulip):

I think that sounds great, but

nikomatsakis (Dec 04 2018 at 12:20, on Zulip):

we do want some way to specify precisely what we are looking for

nikomatsakis (Dec 04 2018 at 12:20, on Zulip):

I think?

nikomatsakis (Dec 04 2018 at 12:20, on Zulip):

I agree that the tests are annoying as is

nikomatsakis (Dec 04 2018 at 12:20, on Zulip):

I'm just thinking of the //~ ERROR vs stderr dichotomy

nikomatsakis (Dec 04 2018 at 12:21, on Zulip):

where the ERROR serves to ensure that the contents of stderr are at least roughly correct, and also lets you encode a bit of the message if you like

nikomatsakis (Dec 04 2018 at 12:21, on Zulip):

not sure if there is some way to get some of that for the mir tests?

nikomatsakis (Dec 04 2018 at 12:21, on Zulip):

I'd settle for using comments if we must though, I agree the workflow is very painful :)

davidtwco (Dec 04 2018 at 12:21, on Zulip):

// error-pattern: ... already exists and could work?

nikomatsakis (Dec 04 2018 at 12:22, on Zulip):

well, that wouldn't literally work for mir tests

davidtwco (Dec 04 2018 at 12:22, on Zulip):

Yeah, but something in that vein.

nikomatsakis (Dec 04 2018 at 12:22, on Zulip):

but I guess we could have some kind of pattern to search for

nikomatsakis (Dec 04 2018 at 12:22, on Zulip):

I can't think what else to do, not sure how successfully that can encode the interesting cases

nikomatsakis (Dec 04 2018 at 12:22, on Zulip):

some of those mir tests may want to just be removed

Last update: Nov 22 2019 at 05:45UTC