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: support versions tab for directory view #40942

Open
julieqiu opened this issue Aug 21, 2020 · 5 comments
Open

x/pkgsite: support versions tab for directory view #40942

julieqiu opened this issue Aug 21, 2020 · 5 comments

Comments

@julieqiu
Copy link
Contributor

@julieqiu julieqiu commented Aug 21, 2020

The URL https://pkg.go.dev/golang.org/x/mod?tab=subdirectories currently shows information for v0.1.0 of that module.

It would be useful to be able to click on the Versions tab to see what other versions are known. At the moment, that tab is greyed out.

@rahulw
Copy link

@rahulw rahulw commented Aug 23, 2020

Hey @julieqiu mod is a directory that has packages and commands. In this directory, some of the packages like lazyregexp have two versions available v0.2.0 and v0.3.0 and other packages like gosumcheck have three different versions. In this case, if we decide to make the tab Versions clickable what information should be visible on that tab?

Please let me know what your thoughts are about this. Thanks!

@julieqiu
Copy link
Contributor Author

@julieqiu julieqiu commented Aug 25, 2020

It should return the package available in the module version corresponding to that path. So for https://pkg.go.dev/golang.org/x/mod@v0.3.0, only show packages in v0.3.0 of golang.org/x/mod.

You should be able to just add a tabVersions case to fetchDetailsForDirectory, and use the existing fetchVersionDetails.

Note that this will only work with the new data model, so you will need to add the experiments use-path-info and use-directories locally. You can do that by running:

go run devtools/cmd/experiment/experiment.go create use-path-info
go run devtools/cmd/experiment/experiment.go create use-directories

@rahulw
Copy link

@rahulw rahulw commented Sep 2, 2020

Thanks for the explanation. I will give this try and send a change list by Friday EOD.

Thanks,

@gopherbot gopherbot added the go.dev label Sep 18, 2020
@julieqiu julieqiu removed the go.dev label Sep 19, 2020
@gopherbot gopherbot added the go.dev label Sep 19, 2020
@julieqiu julieqiu removed the go.dev label Sep 19, 2020
@rahulw
Copy link

@rahulw rahulw commented Sep 19, 2020

Apologies for the delay. Starting work on this now.

@rahulw
Copy link

@rahulw rahulw commented Sep 19, 2020

Thanks for your help, Julie.

After I created a migration, I was able to add use-path-info experiment but use-directories experiment is not working. I get error - 2020/09/19 17:30:39 Experiment "use-directories" does not exist. whenever I run the command
go run devtools/cmd/experiment/experiment.go create use-directories. Do you have suggestions about how to fix this error?

On a side note - I added the password to postgres manually by modifying devtools/migrate_db.sh file. Do you think this should use GO_DISCOVERY_DATABASE_PASSWORD environment variable?

Thanks for all your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.