Stream: t-compiler/cargo-bisect-rustc

Topic: default nightly


lqd (Jan 09 2020 at 12:11, on Zulip):

I think there's something interesting going on when the default nightly is the same as one of the range it's trying to bisect

lqd (Jan 09 2020 at 12:12, on Zulip):

I'm on rustc 1.42.0-nightly (ef92009c1 2020-01-06) it has the default name nightly in rustup (nightly-x86_64-unknown-linux-gnu)

lqd (Jan 09 2020 at 12:13, on Zulip):

when trying to bisect something where the end range was also 2020-01-06 cargo-bisect-rustc kept saying the end range does not reproduce the regression

lqd (Jan 09 2020 at 12:13, on Zulip):

even though it does when testing manually or via --script

lqd (Jan 09 2020 at 12:13, on Zulip):

turns out there was an error running the command

lqd (Jan 09 2020 at 12:14, on Zulip):

the problem seems to be that cargo-bisect-rustc was using its "bisector" nightly name

lqd (Jan 09 2020 at 12:14, on Zulip):

which it hadn't installed since the default nightly has the same date

lqd (Jan 09 2020 at 12:16, on Zulip):

it passed the toolchain via the envRUSTUP_TOOLCHAIN: bisector-nightly-2020-01-06-x86_64-unknown-linux-gnu and rustup failed with error: toolchain 'bisector-nightly-2020-01-06-x86_64-unknown-linux-gnu' is not installed

lqd (Jan 09 2020 at 12:18, on Zulip):

all these errors happen inside cargo-bisect-rustc, for the user it's just

verifying the end of the range reproduces the regression
tested nightly-2020-01-06, got No
Santiago Pastorino (Jan 09 2020 at 14:06, on Zulip):

@lqd can you fill an issue? or well a PR would be even better :)

lqd (Jan 09 2020 at 14:06, on Zulip):

lol nice try :p

Santiago Pastorino (Jan 09 2020 at 14:07, on Zulip):

:P

lqd (Jan 09 2020 at 14:07, on Zulip):

I'll try to file an issue later yeah

lqd (Jan 09 2020 at 14:08, on Zulip):

I didn't fix it locally, only worked around it by changing the bounds on my bisection and it didn't fall on the nightly date again so it succeeded

lqd (Jan 09 2020 at 14:11, on Zulip):

I can try to fix it but I'll need to try one of your homemade beers if/when I ever visit Montevideo :p

Santiago Pastorino (Jan 09 2020 at 14:17, on Zulip):

for that you would need to implement cargo-bisect-rustc#40

Santiago Pastorino (Jan 09 2020 at 14:20, on Zulip):

and I can even take one bottle for you to All Hands if you're attending

lqd (Jan 09 2020 at 14:22, on Zulip):

(unsure about All Hands tbh)

lqd (Jan 09 2020 at 14:22, on Zulip):

(and yeah using the GH API would be nice :)

Santiago Pastorino (Jan 09 2020 at 14:24, on Zulip):

@Andrés Margalef and/or @apiraino were after that one :)

pnkfelix (Feb 07 2020 at 21:31, on Zulip):

@lqd did you ever file an issue about this? I am encountering it too; it is super confusing.

lqd (Feb 07 2020 at 21:36, on Zulip):

sorry I may have forgotten to do it (very confusing yeah, I think I spent quite a while to see this was the reason bisection didn't work on my example)

pnkfelix (Feb 07 2020 at 22:02, on Zulip):

indeed. It seems entirely acccidental that cargo-bisect-rustc works at all when one has rustup default nightly

Santiago Pastorino (Feb 08 2020 at 00:44, on Zulip):

will take a look at this next week :)

lqd (Feb 10 2020 at 13:28, on Zulip):

@simulacrum thoughts on https://github.com/rust-lang/cargo-bisect-rustc/pull/45 ? cc @pnkfelix @Santiago Pastorino

lqd (Feb 10 2020 at 13:30, on Zulip):

/me will casually return to waiting for delicious Uruguayan artisan craft beers from Santiago whistles :)

Santiago Pastorino (Feb 10 2020 at 13:54, on Zulip):

@lqd I’m not really around today but yeah that seems good. Although, shouldn’t you get the name from the installation rather than using “nighly”?

lqd (Feb 10 2020 at 13:58, on Zulip):

I don't yet know how to do that but sure why not

lqd (Feb 10 2020 at 14:52, on Zulip):

why not

some more thoughts about that are in the PR comments; I don't know we can have non-standard names for existing channels, and the question could even be "shouldn't we actually avoid using a +name since this is about the default toolchain"

Santiago Pastorino (Feb 11 2020 at 15:32, on Zulip):

@lqd sorry, but yesterday I wasn't really around, just got your ping and answered from my phone

Santiago Pastorino (Feb 11 2020 at 15:32, on Zulip):

I agree with the latest comment @simulacrum has made

Santiago Pastorino (Feb 11 2020 at 15:33, on Zulip):

I'd just do rustup link for the default nightly and leave the logic as it was

Chris Simpkins (Feb 11 2020 at 19:24, on Zulip):

That sounds good. Let me know if there is anything else that you want to see on the PR for the scripts.

I took a look at the Rust sources last night and will start looking into builtin approaches with new subcommands. Let me get my bearings on the project and then I will have more informed questions about how to approach this. I'll do my best to come prepared so that this isn't onerous :slight_smile: It's a great opportunity for me to learn more about Rust and I really look forward to it. Please let me know if you have any ideas about subcommand functionality that is not on the issue tracker.

lqd (Feb 12 2020 at 11:07, on Zulip):

honestly I don't even understand how cargo-bisect-rustc is installing and uninstalling the downloaded toolchains as it doesn't seem to call rustup ? Linking requires a path to the installed toolchain, which I don't think rustup provides, so the path will also be OS-dependent IIUC and it won't just be calling a shell command like

rustup toolchain link bisector-details ~/.rustup/toolchains/`rustup default | awk '{ print $1 }'`

(at least I don't think users can also override the .rustup name, but I'm not sure).

That seems less interesting than just downloading the one nightly you already have and make biseection work for people on nightly by default ?

pnkfelix (Feb 12 2020 at 15:16, on Zulip):

@lqd why do you say it doesn't seem to be calling rustup ? It may be slightly obscured, but I thought I tracked that down

pnkfelix (Feb 12 2020 at 15:20, on Zulip):

oh, wait, maybe it just downloads and unpacks the tarballs itself...

lqd (Feb 12 2020 at 15:21, on Zulip):

yes

lqd (Feb 12 2020 at 15:21, on Zulip):

there's mention of a fallback as well

pnkfelix (Feb 12 2020 at 15:22, on Zulip):

but that is definitely weird to not use rustup while at the same time leverage the rustup system (the cargo +version ... stuff)

lqd (Feb 12 2020 at 15:24, on Zulip):

I saw no rustup cmds to install/uninstall, only unpacking the tarball and deleting the tmp folder, so that's why I asked

pnkfelix (Feb 12 2020 at 15:24, on Zulip):

is it magically guessing the right directory name to unpack the tarball into such that rustup will then use that directory?

Santiago Pastorino (Feb 12 2020 at 15:26, on Zulip):

when I was working on the tool I had the same doubts

Santiago Pastorino (Feb 12 2020 at 15:26, on Zulip):

I guess @simulacrum can help us here :)

simulacrum (Feb 12 2020 at 15:26, on Zulip):

rustup cannot currently download from CI

simulacrum (Feb 12 2020 at 15:27, on Zulip):

rustup's +version support, to my knowledge, essentially just looks like ~/.rustup/toolchains/<version>

lqd (Feb 12 2020 at 15:28, on Zulip):

you mean cargo-bisect-rustc is downloading the toolchains in the rustup toolchain folder ?

pnkfelix (Feb 12 2020 at 15:28, on Zulip):

@simulacrum you mean rustup "can't" because it doesn't have something like kennytm's rustup-toolchain-install-master built into it?

simulacrum (Feb 12 2020 at 15:28, on Zulip):

@pnkfelix right, yes

simulacrum (Feb 12 2020 at 15:28, on Zulip):

that tool does the same thing bisect does afaik, i.e., puts a directory inside rustup

simulacrum (Feb 12 2020 at 15:29, on Zulip):

https://github.com/kennytm/rustup-toolchain-install-master/blob/master/src/main.rs#L403-L410

lqd (Feb 12 2020 at 15:29, on Zulip):

ok so they are "installed" in the sense that rustup toolchain list is essentially ls ~/.rustup/toolchains

simulacrum (Feb 12 2020 at 15:29, on Zulip):

yes

lqd (Feb 12 2020 at 15:29, on Zulip):

ok that clears things up a bit thanks

pnkfelix (Feb 12 2020 at 15:30, on Zulip):

it would be nicer if tools like this could throw such products into a subdirectory

pnkfelix (Feb 12 2020 at 15:31, on Zulip):

e.g. ~/.rustup/toolchains/bisections/...; but i guess if they use a nice naming convention then that is good enough.

simulacrum (Feb 12 2020 at 15:32, on Zulip):

yeah, that would be better

simulacrum (Feb 12 2020 at 15:32, on Zulip):

but I think rustup doesn't support that today

simulacrum (Feb 12 2020 at 15:32, on Zulip):

realistically I've long wanted to upstream the CI stuff into rustup (e.g., at well-known ci-sha)

simulacrum (Feb 12 2020 at 15:32, on Zulip):

and then bisect would just do rustup install ci-sha and everything would be nice

simulacrum (Feb 12 2020 at 15:33, on Zulip):

But I really don't have the will to dig into that when what we have today mostly works :)

lqd (Feb 12 2020 at 16:17, on Zulip):

so making the default nightly's rustup_name return what rustup default returns seems more "natural" than using rustup link and rustup toolchain uninstall just for this one nightly ?

pnkfelix (Feb 21 2020 at 18:46, on Zulip):

i just put up cargo-bisect-rustc#55 which tries to resolve this in the way that @simulacrum described.

Santiago Pastorino (Feb 24 2020 at 16:12, on Zulip):

@pnkfelix cargo-bisect-rustc#55 merged

Santiago Pastorino (Feb 24 2020 at 16:14, on Zulip):

I think we should release a new version of the tool which would include cargo-bisect-rustc#55 and cargo-bisect-rustc#53

Last update: Nov 25 2020 at 03:00UTC