Improve UX when PATH-resolved plz binary differs from updated version#3510
Improve UX when PATH-resolved plz binary differs from updated version#3510sean- wants to merge 3 commits intothought-machine:masterfrom
Conversation
a5e4518 to
1cd5b00
Compare
|
I'm not sure I follow what the problem is here are you trying to force Please to be used at whatever version Homebrew installs? We don't expect For all we care, the installed |
…installed When the PATH-resolved plz binary is older than the version pinned in .plzconfig but the target version already exists in ~/.please/, the "Upgrading Please from X to Y" message printed on every invocation. Only print it when we actually need to download something new.
|
The bootstrap/exec model makes sense and the correct version does end up running the build. The issue is purely a UX one. Here's a minimal repro: The current results are: The build works correctly every time — 17.29.1 runs it. But:
None of this is broken, but it's surprising. A user who sees A small warning after And actually, let me also fix that second part, too. Now, when the target version already exists in |
Pin init_go_test to --version v1.29.0, matching how the python and cc plugin init tests already avoid the GitHub API. Also add GITHUB_TOKEN support to getLatestRevision() so unauthenticated rate limits (60/hr) don't break CI when the API is hit for real.
Summary
~/.please/. Previously this printed on every invocation when the PATH binary (e.g. from Homebrew) was older than the pinned version, even though no download was needed.plz update, warn if the binary resolved by PATH is not the one that was just updated. This helps users discover that e.g./opt/homebrew/bin/plzis shadowing~/.please/plzand they need to fix their PATH.Reproducer