Stream: t-compiler

Topic: collector + check mode


nagisa (Feb 20 2019 at 17:22, on Zulip):

@mw is there a single scenario where invoking a collector in check mode is a correct course of action?

nagisa (Feb 20 2019 at 17:23, on Zulip):

I figure that in case there isn't one it would make sense to add the condition inside the collector query.

nagisa (Feb 21 2019 at 16:57, on Zulip):

@mw ping.

nagisa (Feb 21 2019 at 16:57, on Zulip):

@mw do you have any idea why cargo check would end up invoking the full codegen?

nagisa (Feb 21 2019 at 16:58, on Zulip):

I had hoped that fixing metadata generation code to not use the optimising context would work.

nagisa (Feb 21 2019 at 16:58, on Zulip):

but now it is invoking the regular one...

nagisa (Feb 21 2019 at 17:02, on Zulip):

but this in general goes against my intuition about what cargo check ought to be doing

mw (Feb 21 2019 at 17:02, on Zulip):

I think it basically uses the existing pipeline to pack the metadata into the rlib

nagisa (Feb 21 2019 at 17:02, on Zulip):

(i.e. generate metadata and quit)

mw (Feb 21 2019 at 17:03, on Zulip):

you should be able to just add an early exit in the query provider

mw (Feb 21 2019 at 17:04, on Zulip):

doing the same check as the metadata encoder does

mw (Feb 21 2019 at 17:04, on Zulip):

but I agree that this isn't the cleanest setup

nagisa (Feb 21 2019 at 17:06, on Zulip):

yaeh so I was wondering, why not add such an early exit to the partition query in the first place.

nagisa (Feb 21 2019 at 17:07, on Zulip):

it seems fine for me for partitioner to return an empty set of CUs when it knows that it would fail collecting either way

nagisa (Feb 21 2019 at 17:08, on Zulip):

for now I’ll just make sure that non-optimising context is used in ssa backend as well

mw (Feb 22 2019 at 08:05, on Zulip):

It's a bit tricky. Technically we don't know that it will fail. We know the current build is only producing metadata data but upstream crates might have been compiled the regular way in which case everything would work fine.

mw (Feb 22 2019 at 08:06, on Zulip):

in practice this does not usually occur

Last update: Nov 16 2019 at 01:35UTC