asdf-golang icon indicating copy to clipboard operation
asdf-golang copied to clipboard

exec-env improvements

Open scop opened this issue 2 years ago • 17 comments

See individual commit messages for details on each change.

scop avatar Apr 23 '22 07:04 scop

Checking if GOROOT and GOPATH should be more than enough, there is no need to add unset or add 2 environment variables (ASDF_GOLANG_DISABLE_GOROOT, ASDF_GOLANG_DISABLE_GOPATH

missingcharacter avatar Apr 23 '22 14:04 missingcharacter

I just finished reading https://github.com/asdf-community/asdf-direnv/issues/149, I think GOPATH should not be changed if it was already set since GOPATH is normally a developer's workspace.

but you are right about unsetting/setting GOROOT depending on the switch between versions

missingcharacter avatar Apr 23 '22 14:04 missingcharacter

I agree changing is more crucial for GOROOT if it's set.

For GOPATH, one approach would be to change if the already set value looks like something asdf-golang has set it to earlier, otherwise leave alone.

Anyway, I can revise this PR once I know what behavior the maintainers here prefer.

Personally, I would drop touching both GOROOT and GOPATH altogether, no matter if set or not. That'd be a backwards incompatible change though -- therefore the ASDF_GOLANG_DISABLE_* variables, to make the breaking change opt-in.

scop avatar Apr 25 '22 19:04 scop

Thanks for the PR @scop! I've got the next two weeks off, so I'll spend some time digging into this one.

kennyp avatar Dec 17 '22 04:12 kennyp

Rebased to resolve conflicts, cleaned up indentation some.

scop avatar Jan 01 '23 19:01 scop

Anything I can do to help with this?

scop avatar Jul 17 '23 20:07 scop