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

x/build/cmd/relui: add checkbox to Go installers to delete previous GOENV configuration file #45208

Open
gekigek99 opened this issue Mar 24, 2021 · 10 comments
Labels
Builders x/build issues (builders, bots, dashboards) FeatureRequest Issues asking for a new feature that does not need a proposal. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@gekigek99
Copy link

I had a problem recently (#45174) where after reinstalling golang the go env file would remain unchanged and this caused multiple issues since all tools and binaries were compiled for 386 arch and not for amd64 arch (as I expected).

I understand that many people want to preserve the old configuration after an update or reinstallation... but sometimes a "true" clean install might be useful.

What I suggest is to add a checkbox in the golang installation program that, if set to true, will wipe out all previous config (either all or some selectable folders) (%GOENV%, %GOPATH%, %GOCACHE% ... etc).

thanks

@gopherbot gopherbot added this to the Proposal milestone Mar 24, 2021
@ianlancetaylor
Copy link
Member

This doesn't have to be a proposal. This can be decided by the maintainers of the installation program. That said, I'm not sure what installation program you mean. Is this Windows-specific?

@ianlancetaylor ianlancetaylor modified the milestones: Proposal, Backlog Mar 24, 2021
@ianlancetaylor ianlancetaylor added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed Proposal labels Mar 24, 2021
@ianlancetaylor ianlancetaylor changed the title proposal: checkbox in install wizard to delete all previous configuration to achieve "true" clean installation install: checkbox in install wizard to delete all previous configuration to achieve "true" clean installation Mar 24, 2021
@gekigek99
Copy link
Author

This can be decided by the maintainers of the installation program

oh ok I didn't know about a specific group of maintainers of the the installation program... how can I propose this to them?

Yep I'm referring to windows golang installation program (the .msi executables here)

@ianlancetaylor
Copy link
Member

CC @golang/osp-team

@cagedmantis cagedmantis changed the title install: checkbox in install wizard to delete all previous configuration to achieve "true" clean installation x/build/cmd/release: add checkbox in install wizard to delete all previous configuration to achieve "true" clean installation Mar 24, 2021
@cagedmantis cagedmantis added the Builders x/build issues (builders, bots, dashboards) label Mar 24, 2021
@cagedmantis
Copy link
Contributor

/cc @golang/release as well as the osp-team.

@gekigek99
Copy link
Author

Sorry I don't understand... Is this issue ok or should I open an other? If yes, where?

@dmitshur
Copy link
Contributor

This issue is okay.

If we consider this to be about resetting configuration in the go env GOENV file, then this can apply to the Windows installer and also the macOS installer.

@dmitshur dmitshur added the FeatureRequest Issues asking for a new feature that does not need a proposal. label Mar 25, 2021
@dmitshur dmitshur changed the title x/build/cmd/release: add checkbox in install wizard to delete all previous configuration to achieve "true" clean installation x/build/cmd/release: add checkbox to Go installers to delete previous GOENV configuration file Mar 25, 2021
@gekigek99
Copy link
Author

resetting configuration in the go env GOENV file

yep my specific problem arose because of the go env GOENV file not being reset after the installation...

and while suggesting this feature I thought that this problem might arise again because of other user configs (I am thinking about %GOPATH% folder, which remains the same after re-installing golang)
I am not a professional thought and probably deleting only go env GOENV file is enough to accomplish a "true" fresh golang installation...

this can apply to the Windows installer and also the macOS installer.

yes indeed, I forgot to mention the macOS installer but absolutely... (and all other OS that require an installer)

@dmitshur
Copy link
Contributor

Deleting the go env GOENV file seems feasible because it's a file at a well-known location, controlled by Go itself.

It wouldn't be feasible for the Go installer to try to find or delete configuration in places that aren't well known (e.g., custom user .bash_profile or similar files), so I suspect there's not much more can be done in those cases. I'm not sure where the Windows registry entries fall, but that can be considered as part of this.

@gekigek99
Copy link
Author

delete configuration in places that aren't well known (e.g., custom user .bash_profile or similar files), so I suspect there's not much more can be done in those cases.

oh yea... sure you are completely right...

ad what about the possibility to delete for example the folder %GOPATH%/src or %GOPATH%/pkg? would that be feasible? (I think that %GOPATH% directory is known during installation right?)
to me the possibility of completely removing old packages while reinstalling golang seems a cool little feature...

not sure where the Windows registry entries fall

yep I think reading windows registry entries it's a pain... especially if the installer needs to run on different windows versions... (and it would add a layer of complexity when working with different OS)

@gekigek99
Copy link
Author

sorry, are there any news about this project?

@dmitshur dmitshur changed the title x/build/cmd/release: add checkbox to Go installers to delete previous GOENV configuration file x/build/cmd/relui: add checkbox to Go installers to delete previous GOENV configuration file May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builders x/build issues (builders, bots, dashboards) FeatureRequest Issues asking for a new feature that does not need a proposal. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants