asdf-community / asdf-golang

Go plugin for the asdf version manager
https://github.com/asdf-vm/asdf
MIT License
552 stars 92 forks source link

Add support for ASDF_GOLANG_MOD_VERSION #101

Closed kennyp closed 1 year ago

kennyp commented 1 year ago

Description

This changes the behavior of bin/list-legacy-file to allow users to set ASDF_GOLANG_MOD_VERSION to determine the inclusion of go.mod and go.work. As discussed in #99 upstream asdf has determined that the current behavior is not desirable, so we are starting down the path of deprecation.

hisaac commented 1 year ago

Would it be possible to have this value read from the .asdfrc file as well? I'd personally prefer that over having to set an environment variable.

kennyp commented 1 year ago

Would it be possible to have this value read from the .asdfrc file as well? I'd personally prefer that over having to set an environment variable.

I'd love to, but so far I don't think asdf supports plugin specific directives.

hisaac commented 1 year ago

That definitely could be true, I’m not familiar with the details. The asdf-java plugin does use a value from the .asdfrc file though, so maybe it is possible? https://github.com/halcyon/asdf-java#java_home-integration

kennyp commented 1 year ago

Yeah, it looks like they're pulling from asdf's utils.sh which is frowned upon as it's not guaranteed to be stable. I think there are a few issues/prs floating around related to exposing it to plugin authors but I haven't seen anything merged yet.

hisaac commented 1 year ago

Ah bummer. Well thanks for the extra info. Using an env var will work just fine. 👌

And thanks for maintaining this plugin too!