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

Simplify Notification::RemovingComponent invocation #2012

Closed

Conversation

BeniCheni
Copy link
Contributor

@BeniCheni BeniCheni commented Sep 23, 2019

Fixes #1993.

After analyzing #1993 that led to #1283 & the source of #1639, the hypothesis is to simplify to just Notification::RemovingComponent invocation in "src/dist/manifestation.rs" and "src/dist/notification.rs", based on the understanding of the goal is to ultimately just display:

info: removing previous version of component ***

By such simplification, also able to delete unneeded RemovingOldComponent code. Looking forward to review feedback & mentioning to update the PR, if my analysis or hypothesis is correctly.

P.S: I also tried to understand this comment from the 1st comment in #1993:

Strangely enough, the relevant tests pass.

https://github.com/rust-lang/rustup.rs/blob/489fa585117dc0ac283f247f3c9a829fd32442af/src/dist/manifestation.rs#L133

I'm speculating that the altered variable checks for default dist server, and guessing that when tests run, the local env would somehow be considered truthy for the altered flag to call original RemovingOldComponent to land to the output code for "info: removing old component", and the tests would pass/

While running the "prod dist" build, the altered flag was considered falsy, and it would call the original RemovingComponent to land to the output code for "info: removing component".

Copy link

@thedrow thedrow left a comment

Choose a reason for hiding this comment

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

Thank you for working on this.

The reason for adding RemovingOldComponent was because you can also rustup component remove.
In this case, you are not removing an old component to replace it with a new one. You are simply removing it since you no longer need it.
I don't think that this behaviour is correct from a UX perspective.

@BeniCheni
Copy link
Contributor Author

Thanks, @thedrow. Will take a look and correct.

@BeniCheni BeniCheni force-pushed the removing-component-notification branch 2 times, most recently from 9aa24c8 to 5a3dc11 Compare September 25, 2019 19:25
tesuji and others added 4 commits September 25, 2019 15:32
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Attempt to replicate the functionality from
<rust-lang/cargo#6004>
in order to pass Ctrl+C on in Windows

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Correct notification for removing component

Revert edit in src/dist/manifestation.rs
@BeniCheni BeniCheni force-pushed the removing-component-notification branch from 5a3dc11 to 8db647e Compare September 25, 2019 19:33
@BeniCheni
Copy link
Contributor Author

Will open a new PR.

@BeniCheni BeniCheni closed this Sep 25, 2019
@BeniCheni BeniCheni deleted the removing-component-notification branch September 25, 2019 19:54
@BeniCheni
Copy link
Contributor Author

Hi, @thedrow , created a new PR (#2016) w. correction. PTAL over in the new PR? Thanks!

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.

Removing previous version of component message does not appear when updating
4 participants