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

all: rename module and move main pacakge to cmd/asdf #85

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

DeedleFake
Copy link

@DeedleFake DeedleFake commented Nov 29, 2024

Fixes #84.

This also fixes a few other minor things, but in so doing causes go test to fail because a test was not being run at all before due to being named incorrectly is now running and it fails.

@DeedleFake
Copy link
Author

I should note that go install will include the version of the main module into the metadata in the executable automatically. It can be gotten with debug.ReadBuildInfo(). go build doesn't currently include that, but that's being worked on.

"asdf/internal/toolversions"
"asdf/internal/versions"

"github.com/asdf-vm/asdf-core-go/internal/config"
Copy link
Member

Choose a reason for hiding this comment

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

This repo (github.com/asdf-vm/asdf-core-go) is temporary and will be archived in a couple weeks. All the changes in this repo will soon be merged into github.com/asdf-vm/asdf once most of the test code in main_test.go is passing.

Should we make this name github.com/asdf-vm/asdf? What's the difference between github.com/asdf-vm/asdf and asdf?

Copy link
Author

Choose a reason for hiding this comment

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

The module name should match the import path that identifies the repo. If the plan is to move the code into another repo, then it should match the repo it's moved to. It can be renamed now or when it's moved. Alternatively, you can use a vanity URL, i.e. asdf-vm.com. Then people could, for example, use go install asdf-vm.com/cmd/asdf@latest to install the command. That would allow you to move repos without having to rename the module. I use a vanity URL, deedles.dev, for my personal projects.

Copy link
Member

Choose a reason for hiding this comment

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

Let's go with github.com/asdf-vm/asdf since that is where this code will live in a few weeks. I don't expect many people to use this asdf-core-go repo, and if they do they'll hopefully see it's not ready for regular use. I've updated the repo description to make this clear.

@Stratus3D
Copy link
Member

Thanks for the PR @DeedleFake. I left a few comments. Looks like PR checks failed, I will investigate at a later time. Otherwise looks like something I can merge.

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.

proposal: move main package into cmd/asdf and rename module for compatibility with go install
2 participants