Stream: t-compiler

Topic: testing chain of deps


pnkfelix (Oct 30 2019 at 13:17, on Zulip):

hey, if I want to write a test that is a linear chain of crates, do we have any option besides run-make/run-make-fulldeps ?

pnkfelix (Oct 30 2019 at 13:17, on Zulip):

I know we have the auxilliary directories in each src/test suite, but as far as I can tell, all of the uses of that only have a single level dependency hierarchy

simulacrum (Oct 30 2019 at 13:18, on Zulip):

I think run-make is your only option. you should not need fulldeps

pnkfelix (Oct 30 2019 at 13:18, on Zulip):

yeah I was putting it in fulldeps because for some reason a bunch of the run-make tests have ended up in there

pnkfelix (Oct 30 2019 at 13:18, on Zulip):

like, it seems like only wasm stuff is in run-make now? I haven't looked into why this happened...

pnkfelix (Oct 30 2019 at 13:30, on Zulip):

/me idly wonders how hard it would be to allow nested auxiliary directories, to allow expressing such chains without using run-make ...

simulacrum (Oct 30 2019 at 13:30, on Zulip):

I think fulldeps is at this point _only_ for stuff that has extern crate rustc*; pretty much

simulacrum (Oct 30 2019 at 13:30, on Zulip):

everything else should not be in fulldeps

pnkfelix (Oct 30 2019 at 13:38, on Zulip):

yeah maybe I will look into that

pnkfelix (Oct 30 2019 at 13:38, on Zulip):

I'm pretty sure the current setup is not that

pnkfelix (Oct 30 2019 at 13:43, on Zulip):

hmm perhaps an artifact of 7df6f4161cdc13a19216b5f1087081f490f06cdb

pnkfelix (Oct 30 2019 at 13:43, on Zulip):

I cannot tell if @Alex Crichton intended for that to be a permanent shift or not

pnkfelix (Oct 30 2019 at 13:44, on Zulip):

it might have been better e.g. to introduce run-make-wasm and keep run-make where it is

simulacrum (Oct 30 2019 at 13:44, on Zulip):

I read that commit message as saying that before that commit run-make _was_ run-make-fulldeps

Alex Crichton (Oct 30 2019 at 13:44, on Zulip):

You can write a UI test for this

simulacrum (Oct 30 2019 at 13:45, on Zulip):

but now there is actually a run-make and a run-make-fulldeps

Alex Crichton (Oct 30 2019 at 13:45, on Zulip):

The top level specifies all of the dependencies

Alex Crichton (Oct 30 2019 at 13:45, on Zulip):

Or at least I swear I've done this before with UI tests

simulacrum (Oct 30 2019 at 13:45, on Zulip):

I guess you could, right? If the auxiliary stuff is on-demand rather than pre-compiled

simulacrum (Oct 30 2019 at 13:45, on Zulip):

but if it's pre-compiled then there's probably no way

pnkfelix (Oct 30 2019 at 13:46, on Zulip):

@Alex Crichton the context where I was thinking about this was that rlib <- dylib <-rlib <- dylib linking bug (#65781)

pnkfelix (Oct 30 2019 at 13:46, on Zulip):

and I could have sworn that you (@Alex Crichton ) said I would need to resort to run-make there ...?

pnkfelix (Oct 30 2019 at 13:48, on Zulip):

well, now I cannot find any record to support that claim ...

pnkfelix (Oct 30 2019 at 13:48, on Zulip):

The top level specifies all of the dependencies

the top level can specify dependencies of the dependencies?

Alex Crichton (Oct 30 2019 at 14:04, on Zulip):

@pnkfelix I think if you try hard enough a ui test should work

Alex Crichton (Oct 30 2019 at 14:04, on Zulip):

but it may be a bit wonky

Alex Crichton (Oct 30 2019 at 14:04, on Zulip):

run-make may just be easier

Alex Crichton (Oct 30 2019 at 14:04, on Zulip):

and yeah you'd just have a top-level file that lists all dependencies

Alex Crichton (Oct 30 2019 at 14:04, on Zulip):

and they're compiled in sequence

pnkfelix (Oct 30 2019 at 14:05, on Zulip):

okay I think I found an example of what you describe

pnkfelix (Oct 30 2019 at 14:06, on Zulip):

specifically ui/svh/svh-change-type-static.rs

pnkfelix (Oct 30 2019 at 14:06, on Zulip):

which does indeed have a sequence of // aux-build directives, a comment that says they must be in that order, and the dependencies themselves do depend on each other in sequence)

pnkfelix (Oct 30 2019 at 14:07, on Zulip):

I clearly should update my PR #65781 to use that pattern then

Alex Crichton (Oct 30 2019 at 14:07, on Zulip):

ah yes indeed!

pnkfelix (Oct 30 2019 at 14:08, on Zulip):

its a pretty nasty clever trick too

pnkfelix (Oct 30 2019 at 14:08, on Zulip):

since they override the #[crate_name]

pnkfelix (Oct 30 2019 at 14:08, on Zulip):

to force the third dep to actually overwrite the first

pnkfelix (Oct 30 2019 at 14:09, on Zulip):

despite it coming from a different file

Alex Crichton (Oct 30 2019 at 14:10, on Zulip):

oh yeah those are weird tests

Last update: Nov 16 2019 at 01:05UTC