Skip to content

Commit

Permalink
apacheGH-39761: [Docs] Link to Go documentation references outdated d…
Browse files Browse the repository at this point in the history
…ocumentation from 2018 (apache#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: apache#39761

Authored-by: Gabriel Tomitsuka <g@gtomitsuka.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
gtomitsuka authored Jan 24, 2024
1 parent df83e50 commit 2e8bd8d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
18 changes: 18 additions & 0 deletions dev/release/post-11-bump-versions-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,15 @@ def test_version_post_tag
]
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: [
Expand All @@ -212,6 +221,15 @@ def test_version_post_tag
],
],
},
{
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 += [
Expand Down
17 changes: 17 additions & 0 deletions dev/release/utils-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}/" \
Expand All @@ -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"
Expand All @@ -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" \
. \
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/>
Expand Down
2 changes: 1 addition & 1 deletion r/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 2e8bd8d

Please sign in to comment.