-
Notifications
You must be signed in to change notification settings - Fork 18k
x/pkgsite: source links don't work for non-proxy getters #47982
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
Comments
Change https://golang.org/cl/347751 mentions this issue: |
Change https://golang.org/cl/347749 mentions this issue: |
Change https://golang.org/cl/347750 mentions this issue: |
Change https://golang.org/cl/347752 mentions this issue: |
Change https://golang.org/cl/347929 mentions this issue: |
Change https://golang.org/cl/347931 mentions this issue: |
Change https://golang.org/cl/347932 mentions this issue: |
Change https://golang.org/cl/347930 mentions this issue: |
The solution uses a |
Make it the ModuleGetter's responsibility to provide links to source files, instead of passing around a separate source.Client. This will allow getters that fetch from disk to serve those local files. For golang/go#47982 Change-Id: I6c7cd7890b03ad61d9410850a510c1c9a63f1c9a Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/347749 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
The modcache subdirectory did not correctly resemble a true module cache. Move the proxy part into a cache/download subdirectory, and expand one module zip, since we'll be serving source from the expanded files, not the zip. For golang/go#47982 Change-Id: Ib5d49f67d2e7a47f8763958d28f44861aea9296b Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/347929 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
A minor change to the ModuleGetter for the module cache: it now takes the cache directory itself, not the cache/download subdirectory. This will facilitate serving source. For golang/go#47982 Change-Id: I646471297e38de686586f2180608fc32cb59496d Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/347930 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
Install the full ModuleInfo from the parent module into each unit. Previously this wasn't necessary in fetch because Unit.ModuleInfo was populated when reading from the DB. But it's necessary now that we can serve directly from a fetched module. For golang/go#47982 Change-Id: I0b0462148f7623ccbbbe7d4ca3bf2409e2107023 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/347931 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
If you serve a local module with
cmd/pkgsite
, the links to source files are wrong.We should at least make them
file:
URLs. That will get you to the file, assuming you are browsing on the same machine as the directory. It won't take you to a specific line. It also won't help with zips, which are served directly from the module cache when the-cache
flag is given. But it's better than the broken links we have now.The text was updated successfully, but these errors were encountered: