You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2024/01/24 14:32:00 UTC
(arrow) branch main updated: GH-39761: [Docs] Link to Go documentation references outdated documentation from 2018 (#39750)
This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 2e8bd8d0b5 GH-39761: [Docs] Link to Go documentation references outdated documentation from 2018 (#39750)
2e8bd8d0b5 is described below
commit 2e8bd8d0b53560a561656337021abc3e4aa73f8c
Author: Gabriel Tomitsuka <g...@gtomitsuka.com>
AuthorDate: Wed Jan 24 15:31:51 2024 +0100
GH-39761: [Docs] Link to Go documentation references outdated documentation from 2018 (#39750)
### Rationale for this change
The godoc format shows docs in a versioned fashion, making the ["basic" link](https://pkg.go.dev/github.com/apache/arrow/go) reference v0.0.0 from 2018, and godoc doesn't warn you when docs are outdated. Accordingly, for people to find "real" documentation, they have to manually search for the latest docs.
Otherwise, it gives the impression that the package is abandoned / makes devs waste considerable time — e.g., I work with Go professionally and wasted 15 minutes on the 2018 docs until I realized they were wrong.
### What changes are included in this PR?
* Reference the latest version (v16) in the list of supported implementations of the Arrow website & R package.
* Add step to release process that automatically updates the version on release
### Are these changes tested?
Yes, I've added tests for this to `dev/release/post-11-bump-versions-test.rb`.
### Are there any user-facing changes?
Yes, the link to Implementations > Go on the website will change.
* Closes: #39761
Authored-by: Gabriel Tomitsuka <g...@gtomitsuka.com>
Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
dev/release/post-11-bump-versions-test.rb | 18 ++++++++++++++++++
dev/release/utils-prepare.sh | 17 +++++++++++++++++
docs/source/index.rst | 2 +-
r/_pkgdown.yml | 2 +-
4 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/dev/release/post-11-bump-versions-test.rb b/dev/release/post-11-bump-versions-test.rb
index 4b6933d610..78d9320bfb 100644
--- a/dev/release/post-11-bump-versions-test.rb
+++ b/dev/release/post-11-bump-versions-test.rb
@@ -197,6 +197,15 @@ class PostBumpVersionsTest < Test::Unit::TestCase
]
if release_type == :major
expected_changes += [
+ {
+ path: "docs/source/index.rst",
+ hunks: [
+ [
+ "- Go <https://pkg.go.dev/github.com/apache/arrow/go/v#{@snapshot_major_version}>",
+ "+ Go <https://pkg.go.dev/github.com/apache/arrow/go/v#{@next_major_version}>",
+ ],
+ ],
+ },
{
path: "r/pkgdown/assets/versions.json",
hunks: [
@@ -212,6 +221,15 @@ class PostBumpVersionsTest < Test::Unit::TestCase
],
],
},
+ {
+ path: "r/_pkgdown.yml",
+ hunks: [
+ [
+ "- [Go](https://pkg.go.dev/github.com/apache/arrow/go/v#{@snapshot_major_version}) <br>",
+ "+ [Go](https://pkg.go.dev/github.com/apache/arrow/go/v#{@next_major_version}) <br>",
+ ],
+ ],
+ },
]
else
expected_changes += [
diff --git a/dev/release/utils-prepare.sh b/dev/release/utils-prepare.sh
index 8e4c8a84ae..5136708722 100644
--- a/dev/release/utils-prepare.sh
+++ b/dev/release/utils-prepare.sh
@@ -127,6 +127,7 @@ update_versions() {
DESCRIPTION
rm -f DESCRIPTION.bak
git add DESCRIPTION
+
# Replace dev version with release version
sed -i.bak -E -e \
"/^<!--/,/^# arrow /s/^# arrow .+/# arrow ${base_version}/" \
@@ -139,6 +140,13 @@ update_versions() {
fi
rm -f NEWS.md.bak
git add NEWS.md
+
+ # godoc link must reference current version, will reference v0.0.0 (2018) otherwise
+ sed -i.bak -E -e \
+ "s|(github\\.com/apache/arrow/go)/v[0-9]+|\1/v${major_version}|g" \
+ _pkgdown.yml
+ rm -f _pkgdown.yml.bak
+ git add _pkgdown.yml
popd
pushd "${ARROW_DIR}/ruby"
@@ -164,6 +172,15 @@ update_versions() {
git add .
popd
+ pushd "${ARROW_DIR}/docs/source"
+ # godoc link must reference current version, will reference v0.0.0 (2018) otherwise
+ sed -i.bak -E -e \
+ "s|(github\\.com/apache/arrow/go)/v[0-9]+|\1/v${major_version}|g" \
+ index.rst
+ rm -f index.rst.bak
+ git add index.rst
+ popd
+
pushd "${ARROW_DIR}"
${PYTHON:-python3} "dev/release/utils-update-docs-versions.py" \
. \
diff --git a/docs/source/index.rst b/docs/source/index.rst
index e6e82c13d7..2ca63c5ebd 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -104,7 +104,7 @@ Implementations
C/GLib <c_glib/index>
C++ <cpp/index>
C# <https://github.com/apache/arrow/blob/main/csharp/README.md>
- Go <https://pkg.go.dev/github.com/apache/arrow/go>
+ Go <https://pkg.go.dev/github.com/apache/arrow/go/v16>
Java <java/index>
JavaScript <js/index>
Julia <https://arrow.apache.org/julia/>
diff --git a/r/_pkgdown.yml b/r/_pkgdown.yml
index 84111e599c..e9513b8c16 100644
--- a/r/_pkgdown.yml
+++ b/r/_pkgdown.yml
@@ -76,7 +76,7 @@ home:
[C GLib](https://arrow.apache.org/docs/c_glib) <br>
[C++](https://arrow.apache.org/docs/cpp) <br>
[C#](https://github.com/apache/arrow/blob/main/csharp/README.md) <br>
- [Go](https://pkg.go.dev/github.com/apache/arrow/go) <br>
+ [Go](https://pkg.go.dev/github.com/apache/arrow/go/v16) <br>
[Java](https://arrow.apache.org/docs/java) <br>
[JavaScript](https://arrow.apache.org/docs/js) <br>
[Julia](https://github.com/apache/arrow-julia/blob/main/README.md) <br>