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

Closed
julieqiu opened this issue Aug 21, 2020 · 9 comments
Closed

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

julieqiu opened this issue Aug 21, 2020 · 9 comments
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. pkgsite Suggested Issues that may be good for new contributors looking for work to do.

Comments

@julieqiu
Copy link
Member

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.

@gopherbot gopherbot added this to the Unreleased milestone Aug 21, 2020
@julieqiu julieqiu added pkgsite NeedsFix The path to resolution is known, but the work has not been done. help wanted Suggested Issues that may be good for new contributors looking for work to do. labels Aug 21, 2020
@nickel8448
Copy link

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
Member Author

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

@nickel8448
Copy link

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

Thanks,

@nickel8448
Copy link

Apologies for the delay. Starting work on this now.

@nickel8448
Copy link

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

nickel8448 pushed a commit to nickel8448/pkgsite that referenced this issue Nov 1, 2020
Added a new case for directory view to fetch version details for the directory
Fixes: golang/go#40942
@gopherbot
Copy link

Change https://golang.org/cl/267078 mentions this issue: x/pkgsite: support versions tab for directory view

@nickel8448
Copy link

Hello,
I managed to fix the issues I mentioned in the previous comment and added a new function as suggested in the third comment.
While running the server locally I could only see the beta version of the website which did not display the versions tab explicitly. I am unsure if the fix worked or not. Please let me know if I mixed up something.

Thanks,

nickel8448 pushed a commit to nickel8448/pkgsite that referenced this issue Nov 1, 2020
Added a new case for directory view to fetch version details for the directory

Fixes: golang/go#40942
@gopherbot
Copy link

Change https://golang.org/cl/267079 mentions this issue: x/pkgsite: support versions tab for directory view

@julieqiu
Copy link
Member Author

julieqiu commented Nov 2, 2020

We just launched a redesign of pkg.go.dev (see #41585 (comment)), so closing this issue as out of date. Thanks for taking the time to look into it @rahulw!

@julieqiu julieqiu closed this as completed Nov 2, 2020
@golang golang locked and limited conversation to collaborators Nov 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. pkgsite Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
3 participants