Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade console, indicatif to avoid building parking_lot entirely #734

Merged
merged 11 commits into from
May 18, 2020
Merged

chore: upgrade console, indicatif to avoid building parking_lot entirely #734

merged 11 commits into from
May 18, 2020

Conversation

joshuarli
Copy link
Contributor

@joshuarli joshuarli commented May 6, 2020

As mentioned here, you can avoid building parking_lot entirely if you upgrade console, indicatif, and reqwest.

Since reqwest has been swapped out in #733 (this PR builds on top of that) and the new stuff doesn't require it, this is now possible. Honestly it's not really that much more to build, but it is completely unnecessary.

Also @charlespierce, it looks like the lockfile is stale, so feel free to cherry-pick e9599ce and see if you get any improvements there too? Here are some cargo trees you can reproduce:

before regeneration (5af6691): https://gist.github.com/joshuarli/9bb2968b764e7a747a78b6697faae39b

after (e9599ce): https://gist.github.com/joshuarli/9289bcbcf5233b93fa7701fbe9faa925

after upgrade (8fb6e2d): https://gist.github.com/joshuarli/7a973b26a518c33de45a040ad3a79bb1

@charlespierce
Copy link
Contributor

This is awesome, thanks @joshuarli! Especially for the extra context around the lock file and the trees in different states.

@joshuarli
Copy link
Contributor Author

Builds are definitely a bit faster. Looks like bumping that stuff broke windows, it might be solved by bumping further, lol.

@joshuarli joshuarli changed the title chore: upgrade console, indicatif to avoid building parking_lot entirely chore: WIP upgrade console, indicatif to avoid building parking_lot entirely May 6, 2020
@joshuarli
Copy link
Contributor Author

Great, looks like that did it.

@joshuarli joshuarli changed the title chore: WIP upgrade console, indicatif to avoid building parking_lot entirely chore: upgrade console, indicatif to avoid building parking_lot entirely May 6, 2020
@charlespierce
Copy link
Contributor

@joshuarli Out of curiosity, what commands did you use to update the lock file and for generating those trees? The tree especially seems super useful to understand the state of dependencies (and compare when making changes).

@joshuarli
Copy link
Contributor Author

joshuarli commented May 6, 2020

@joshuarli Out of curiosity, what commands did you use to update the lock file and for generating those trees?

cargo generate-lockfile and cargo-tree tree --no-dev-dependencies.

https://github.com/sfackler/cargo-tree

The tree especially seems super useful to understand the state of dependencies (and compare when making changes).

On that topic, I've been thinking about writing a good visual differ for dependency trees... not currently aware of anything that exists.

@joshuarli
Copy link
Contributor Author

@charlespierce Merged my branch with upstream, and regenerated the lockfile.

Upstream master's lockfile seems like it's still pretty stale; lots of transient stuff is being upgraded here. Let me see if I can get you a smaller diff.

@joshuarli
Copy link
Contributor Author

joshuarli commented May 15, 2020

There we go, that's a much saner diff... seems generate-lockfile will attempt to refresh as much as possible (people like to range pin), whereas cargo-tree tree --no-dev-dependencies did a much more gentle refresh.

Although, it might be worth a shot to try a generate-lockfile and see if that improves anything, as long as you're confident in your test suite (081173e passed).

@charlespierce
Copy link
Contributor

LGTM, though I'd like to confirm the CI is passing. Going to try to close and re-open to get it to start again.

@charlespierce
Copy link
Contributor

Hmm, the empty commit did it, not sure why it was failing 🤷

@charlespierce
Copy link
Contributor

charlespierce commented May 15, 2020

Looks like the console crate has a misstated dependency (it relies on winapi-util 0.1.3, not 0.1.2). I'll make a PR into that crate since it appears that we have exactly winapi-util 0.1.2 pinned in Cargo.lock.

Edit: Actually console is specified correctly from what I can tell. Something weird is going on with Cargo.lock though, because checking out Volta's master and just updating to console 0.11.2 it doesn't pull up the dependency to 0.1.3.

@charlespierce
Copy link
Contributor

Oh, it looks like they just detected and fixed it today: console-rs/console#64

But it hasn't yet been released on Crates.io. We'll probably have to wait for that, and then pull in the updated version.

@joshuarli
Copy link
Contributor Author

@charlespierce Thanks for looking into that!

@charlespierce
Copy link
Contributor

@joshuarli Looks like console version 0.11.3 has been published now, with the fixed dependency.

@joshuarli
Copy link
Contributor Author

@charlespierce Thanks for the heads up, things look good now.

Copy link
Contributor

@charlespierce charlespierce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@charlespierce charlespierce merged commit bc89a2d into volta-cli:master May 18, 2020
@joshuarli joshuarli deleted the joshuarli/upgrade-deps-to-avoid-building-parking-lot branch May 18, 2020 20:47
@joshuarli
Copy link
Contributor Author

@charlespierce I'd recommend squash merging in the future, master looks kinda ugly now haha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants