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/pkgsite: Subpackage to recognise version tags #52177

Closed
pjebs opened this issue Apr 6, 2022 · 4 comments
Closed

x/pkgsite: Subpackage to recognise version tags #52177

pjebs opened this issue Apr 6, 2022 · 4 comments

Comments

@pjebs
Copy link
Contributor

pjebs commented Apr 6, 2022

I have a repo: https://github.com/rocketlaunchr/showerglass.

At the root level there is a module called: github.com/rocketlaunchr/showerglass with a package called main. It is simply a demo project that uses the package inside the core directory.

In the core directory is the actual package for mass consumption. It has a module called github.com/rocketlaunchr/showerglass/core with a package called showerglass.

If I tag the repo at v1.0.0, pkg.go.dev does not seem to recognise the github.com/rocketlaunchr/showerglass/core module as v1.0.0. It assumes the entire module is unversioned.

This is causing issues with third-party use of my package (in terms of adding a version to their go.mod file. It is also causing issues with me not being able to "force" pkg.go.dev to update the docs to the current version since I can't append @v1.0.0.

@pjebs pjebs added the pkgsite label Apr 6, 2022
@gopherbot gopherbot added this to the pkgsite/unplanned milestone Apr 6, 2022
@seankhliao
Copy link
Member

Modules have separate identities and versions, that's how both the go command and pkgsite work.

For questions please refer to https://github.com/golang/go/wiki/Questions

@pjebs
Copy link
Contributor Author

pjebs commented Apr 6, 2022

How do I version my (sub)package then? My sub package is a separate module!

@D1CED
Copy link

D1CED commented Apr 6, 2022

You version a submodule by creating a tag starting with the path relative to the root of the repository followed by the version. So relative/path/v1.x.y. Example

@pjebs
Copy link
Contributor Author

pjebs commented Apr 6, 2022

Thanks @D1CED

@golang golang locked and limited conversation to collaborators Apr 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants