x/pkgsite: latest version should not be +incompatible #37714
Comments
The go command behaves similarly as of 1.14: https://golang.org/doc/go1.14#incompatible-versions. |
/cc @fflewddur for context |
Nice! Looks like this would resolve the long-standing issue with libp2p docs: libp2p/go-libp2p#805 |
Change https://golang.org/cl/247404 mentions this issue: |
Add the "incompatible" column to both the modules and module_version_states tables in order to sort modules by compatibility whenever they are being displayed or processed. Updates golang/go#37714 Change-Id: I1f7b5dd55563b38af5c54a692b5e70512ef24c0e Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/247404 Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
Change https://golang.org/cl/247757 mentions this issue: |
Change https://golang.org/cl/248182 mentions this issue: |
This change modifies the InsertModule function to insert modules with an Incompatible field for the new Incompatible column in the modules table. A test is added to check the latest version of inserted modules. Updates golang/go#37714 Change-Id: I7ef04b8709f9499d747d9795531cbc83b5de25ad Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/247757 Reviewed-by: Julie Qiu <julie@golang.org>
Change https://golang.org/cl/248497 mentions this issue: |
Change https://golang.org/cl/248498 mentions this issue: |
This change adds support for inserting, sorting and updating module_version_states.incompatible. Updates golang/go#37714 Change-Id: I40b0831adef6e78beafee259e972cb0e4d4b90c4 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/248182 Run-TryBot: Julie Qiu <julie@golang.org> Run-TryBot: Jonathan Amsterdam <jba@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
Change https://golang.org/cl/249119 mentions this issue: |
This change moves orderByLatest to path.go as we transition into a path based data model. Additionally "incompatible" is added so that we would prefer non-incompatible modules. Since there was a lot of duplicated logic for the ORDER BY keyword for the queries for modules, this change modifies orderByLatest to be a helper function that returns an ORDER BY sql string used in many functions to sort modules. Updates golang/go#37714 Change-Id: I5c8e5264e90442a960328439dcc445397fc4cdbd Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/248497 Reviewed-by: Jonathan Amsterdam <jba@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
This change updates LegacyGetPackage to use orderByLatest in the query to prefer compatible modules. This change will directly affect a package's header in the documentation page. i.e: in the blackfriday package before: https://i.imgur.com/kS1WF7n.png after: https://imgur.com/a/smrtQzy Updates golang/go#37714 Change-Id: I32fde2cf2b33763497dae1021138ace668eb1043 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/248498 Reviewed-by: Julie Qiu <julie@golang.org>
Updates GetPathInfo to use orderByLatest in the query to prefer compatible modules. Updates golang/go#37714 Change-Id: I89fd654c414f860a2f8a327ff9a8fde07fd35120 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/249119 Run-TryBot: Miguel Acero <acero@google.com> Reviewed-by: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com>
Change https://golang.org/cl/249277 mentions this issue: |
Change https://golang.org/cl/249278 mentions this issue: |
…ble modules Updates LegacyGetModuleInfo to use orderByLatest in the query to prefer compatible modules. Updates golang/go#37714 Change-Id: I83bbbf3a8f5753533f3b2d8d5e329e82400951df Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/249277 Run-TryBot: Miguel Acero <acero@google.com> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
…ible modules Updates UpsertSearchDocument's to use orderByLatest in the query to prefer compatible modules when inserting into the search_documents table. This change updates the versions seen in the search results once the module is reprocessed. before: https://i.imgur.com/A7boYiC.png after: https://i.imgur.com/ZLdTuex.png Updates golang/go#37714 Change-Id: I527e6f157c5ddfe2a73e561f0be78738d97bb2fc Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/249278 Reviewed-by: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
Hey, the https://pkg.go.dev/github.com/libp2p/go-libp2p properly shows the most recent version now! Awesome! |
When deciding which version of a module is the latest, if there is a version with a go.mod file, prefer it to incompatible versions.
Example: given versions
we would display the first as latest. We should display the second.
The text was updated successfully, but these errors were encountered: