Stream: t-compiler

Topic: x.py concerns


mark-i-m (May 15 2020 at 14:35, on Zulip):

Hey @simulacrum just collecting my thoughts from the discussion in the steering meeting:

Santiago Pastorino (May 15 2020 at 14:36, on Zulip):

I'd add, when using --keep-stage 1 is needed and may improve compilation times

Santiago Pastorino (May 15 2020 at 14:36, on Zulip):

when it may be problematic to do so

Santiago Pastorino (May 15 2020 at 14:37, on Zulip):

some people use src/libstd what does that mean?

mark-i-m (May 15 2020 at 14:37, on Zulip):

Quoting varkor:

this is probably also tangential, but it could be worth considering a prompt the first time x.py is run, which walks a new contributor through setting up config.toml without having to wade through all the uncommon options — just some simple questions for a "quick start"

Santiago Pastorino (May 15 2020 at 14:38, on Zulip):

Santiago Pastorino said:

some people use src/libstd what does that mean?

wouldn't be better to use this under a flag which is more explicit, like --up-to src/libstd?

Santiago Pastorino (May 15 2020 at 14:39, on Zulip):

./x.py build --stage 1 --keep-stage 1 src/libstd doesn't that read weird? what the heck is it?

Santiago Pastorino (May 15 2020 at 14:40, on Zulip):

I already know and understand most of this stuff but I was confused about some of these things at some point

nikomatsakis (May 15 2020 at 15:05, on Zulip):

side note that selecting indivudal tests could be improved I think relatively easily

nikomatsakis (May 15 2020 at 15:05, on Zulip):

I'd like to see x.py test src/test/ui/foo.rs just work

nikomatsakis (May 15 2020 at 15:06, on Zulip):

it would probably just translate to a --test-args call

varkor (May 15 2020 at 15:06, on Zulip):

nikomatsakis said:

I'd lik to see x.py test src/test/ui/foo.rs just work

it does, doesn't it?

varkor (May 15 2020 at 15:06, on Zulip):

it used not to, but there were some PRs not so long ago that added some special-casing for these sorts of invocations

simulacrum (May 15 2020 at 15:06, on Zulip):

it's supposed to

Santiago Pastorino (May 15 2020 at 15:07, on Zulip):

ohh interesting, pretty sure that's not documented on rustc-dev-guide

varkor (May 15 2020 at 15:07, on Zulip):

maybe those changes should have been publicised a bit more

varkor (May 15 2020 at 15:07, on Zulip):

both on rustc-dev-guide and by cc'ing compiler-contributors

Santiago Pastorino (May 15 2020 at 15:08, on Zulip):

it may be a good idea to not merge these PRs if we lack something that explains these changes on rustc-dev-guide maybe ...

Tshepang Lekhonkhobe (May 15 2020 at 15:28, on Zulip):

that would introduce more friction for contributors... would be more easy if dev guide was part of rustc repo (which is maybe not a bad idea)

mark-i-m (May 15 2020 at 15:30, on Zulip):

@Tshepang Lekhonkhobe we have thought about that, but then the time to land a single PR increases to days due to CI

mark-i-m (May 15 2020 at 15:30, on Zulip):

and then who knows how many links will break while in the queue

Tshepang Lekhonkhobe (May 15 2020 at 15:35, on Zulip):

if it encourages rustc contributors to add content, seems like a big win

Tshepang Lekhonkhobe (May 15 2020 at 15:35, on Zulip):

links break regardless

mark-i-m (May 15 2020 at 15:35, on Zulip):

fair, it's worth thinking about, but I think there are also challenges

Tshepang Lekhonkhobe (May 15 2020 at 15:35, on Zulip):

... them breaking during rustc CI would ensure they are kept fresh

Tshepang Lekhonkhobe (May 15 2020 at 15:36, on Zulip):

yeah, pros and cons

Santiago Pastorino (May 15 2020 at 15:37, on Zulip):

I'm not sure if I prefer to merge rustc-dev-guide into rust repo, if people that review PRs ask for documentation on rustc-dev-guide would be enough

Santiago Pastorino (May 15 2020 at 15:37, on Zulip):

but

Santiago Pastorino (May 15 2020 at 15:37, on Zulip):

if we were integrating rustc-dev-guide or something

Santiago Pastorino (May 15 2020 at 15:37, on Zulip):

I wonder if it's possible to make r+ use some kind of heuristic to avoid most or all the checks in cases like this

nikomatsakis (May 15 2020 at 15:59, on Zulip):

varkor said:

maybe those changes should have been publicised a bit more

neat!!

nikomatsakis (May 15 2020 at 15:59, on Zulip):

I think @Santiago Pastorino a compromise would be to file an issue on rustc-dev-guide

nikomatsakis (May 15 2020 at 15:59, on Zulip):

and land the PR immediately

Santiago Pastorino (May 15 2020 at 16:05, on Zulip):

nikomatsakis said:

I think Santiago Pastorino a compromise would be to file an issue on rustc-dev-guide

yes, agreed that this is better but ideally the best solution would be to open a PR

Santiago Pastorino (May 15 2020 at 16:06, on Zulip):

so we can collectively own rustc-dev-guide

mark-i-m (May 15 2020 at 16:34, on Zulip):

Yeah, the trouble with just filing a PR is that it applies no back pressure, and we have neither the expertise nor the manpower to turn every issue into actual documentation

mark-i-m (May 15 2020 at 16:35, on Zulip):

I rather like what @ecstatic-morse did with https://github.com/rust-lang/rustc-dev-guide/pull/583

mark-i-m (May 15 2020 at 16:35, on Zulip):

They opened a PR with some documentation and a promise of more later. There's very little chance that we would actually get this documentation if they hadn't volunteered it... :heart:

mati865 (May 15 2020 at 17:51, on Zulip):

varkor said:

nikomatsakis said:

I'd lik to see x.py test src/test/ui/foo.rs just work

it does, doesn't it?

I tried that like month ago to run just one of ui tests but that didn't work. x.py test src/test/ui ran just ui tests as expected though, so I eventually removed all the tests except the one I needed :shrug:

oli (May 15 2020 at 17:52, on Zulip):

we have --test-args test_name which helps shrink the list of tests that are run, but that's not ideal since it just matches the name and I don't think you can specify full paths

ecstatic-morse (May 15 2020 at 18:04, on Zulip):

mark-i-m said:

I rather like what ecstatic-morse did with https://github.com/rust-lang/rustc-dev-guide/pull/583

I should uhh, probably finish that at some point, although there's one more major change (arbitrary domains) to the API in the works.

Jonas Schievink (May 15 2020 at 18:38, on Zulip):

./x.py test src/test/ui/specific-test.rs should work fine, I use that all the time

Jonas Schievink (May 15 2020 at 18:39, on Zulip):

One problem is that globs don't work – all but the first file are ignored

Jonas Schievink (May 15 2020 at 18:39, on Zulip):

Presumably because the rest is passed as arguments to... something?

varkor (May 16 2020 at 12:28, on Zulip):

Jonas Schievink said:

One problem is that globs don't work – all but the first file are ignored

I think this specific pattern is special-cased, but I can't remember why supporting multiple files was inconvenient to implement.

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

@varkor probably because we have to lower to --test-args and compiletest, like libtest, only accepts a single pattern

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

(and it's a substring match IIRC, not a regex, so you don't get alternations)

Last update: Jun 04 2020 at 18:45UTC