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

godoc: skip build tag annotations when displaying examples #42

Closed
wants to merge 1 commit into from

Conversation

mostynb
Copy link
Contributor

@mostynb mostynb commented Jul 26, 2018

After moving the filepath.Walk example to a standalone example file
in CL 122237 (so it could use a standalone function), godoc includes
the build tag annotation ("// +build !windows,!plan9" in this case)
in the runnable example. The example runs correctly, but the
annotation might be confusing for new users.

Change the behavior so that godoc skips these annotations when
displaying examples.

To avoid false positives in older versions of "go vet", which are still used
on the build dashboard, we avoid using a multiline string in the test.

Fixes golang/go#26490.

@gopherbot
Copy link
Contributor

Message from Gerrit User 12446:

Uploaded patch set 2: Commit message was updated.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 12446:

Uploaded patch set 3: New patch set was added with same tree, parent, and commit message as Patch Set 2.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 18980:

Patch Set 1:

@andrew: here's the reland of https://go-review.googlesource.com/c/tools/+/125040 without the testcase (to be added once the false positive is fixed). Is this what you meant? And is there a preferred "reland" commit subject line for this repository?


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 5065:

Patch Set 3:

The commit message subject should be normal. Only "Revert" is a special case.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@mostynb mostynb changed the title Reland "godoc: skip build tag annotations when displaying examples" godoc: skip build tag annotations when displaying examples Jul 26, 2018
@gopherbot
Copy link
Contributor

Message from Gerrit User 12446:

Uploaded patch set 4: Commit message was updated.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 12446:

Uploaded patch set 5: New patch set was added with same tree, parent, and commit message as Patch Set 4.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 12446:

Uploaded patch set 6: Commit message was updated.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 12446:

Uploaded patch set 7: New patch set was added with same tree, parent, and commit message as Patch Set 6.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 18980:

Patch Set 7:

The commit message subject should be normal. Only "Revert" is a special case.

Thanks- fixed.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 24096:

Patch Set 7: Code-Review+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 12446:

Uploaded patch set 9: New patch set was added with same tree, parent, and commit message as Patch Set 8.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 12446:

Uploaded patch set 10: Commit message was updated.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 12446:

Uploaded patch set 11: New patch set was added with same tree, parent, and commit message as Patch Set 10.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 18980:

Patch Set 11:

Added back the test in patchset 11, without using a multiline string to avoid false positives from older broken versions of go vet. Can you please run tryjobs on this?


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 13550:

Patch Set 11: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 5976:

Patch Set 11:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=c9ac5f9d


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 5976:

Patch Set 11: TryBot-Result+1

TryBots are happy.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 22285:

Patch Set 11:

(3 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 22285:

Patch Set 11:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 12446:

Uploaded patch set 12: Commit message was updated.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 12446:

Uploaded patch set 13: New patch set was added with same tree, parent, and commit message as Patch Set 12.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 12446:

Uploaded patch set 14: Commit message was updated.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 12446:

Uploaded patch set 15: New patch set was added with same tree, parent, and commit message as Patch Set 14.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 12446:

Uploaded patch set 17: New patch set was added with same tree, parent, and commit message as Patch Set 16.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 18980:

Patch Set 17:

(3 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 22285:

Patch Set 17: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 5976:

Patch Set 17:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=8f742aa8


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 5976:

Patch Set 17:

Build is still in progress...
This change failed on linux-amd64:
See https://storage.googleapis.com/go-build-log/52cc9e37/linux-amd64_56fae31b.log

Consult https://build.golang.org/ to see whether it's a new failure. Other builds still in progress; subsequent failure notices suppressed until final report.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 5976:

Patch Set 17: TryBot-Result-1

2 of 6 TryBots failed:
Failed on linux-amd64: https://storage.googleapis.com/go-build-log/52cc9e37/linux-amd64_56fae31b.log
Failed on linux-386: https://storage.googleapis.com/go-build-log/52cc9e37/linux-386_06ad58cc.log

Consult https://build.golang.org/ to see whether they are new failures.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 22285:

Patch Set 17: -Run-TryBot


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 22285:

Patch Set 17: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 5976:

Patch Set 17:

Build is still in progress...
This change failed on linux-amd64:
See https://storage.googleapis.com/go-build-log/52cc9e37/linux-amd64_5f98d1a2.log

Consult https://build.golang.org/ to see whether it's a new failure. Other builds still in progress; subsequent failure notices suppressed until final report.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 5976:

Patch Set 17: TryBot-Result-1

2 of 6 TryBots failed:
Failed on linux-amd64: https://storage.googleapis.com/go-build-log/52cc9e37/linux-amd64_5f98d1a2.log
Failed on linux-386: https://storage.googleapis.com/go-build-log/52cc9e37/linux-386_a8728b99.log

Consult https://build.golang.org/ to see whether they are new failures.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 22285:

Patch Set 17:

Can you rebase your change? The broken portion of the test was fixed since then.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 12446:

Uploaded patch set 19: New patch set was added with same tree, parent, and commit message as Patch Set 18.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 18980:

Patch Set 19:

Patch Set 17:

Can you rebase your change? The broken portion of the test was fixed since then.

Done.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 22285:

Patch Set 19: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 5976:

Patch Set 19:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=97f50a47


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 5976:

Patch Set 19:

Build is still in progress...
This change failed on linux-amd64:
See https://storage.googleapis.com/go-build-log/1a5350e1/linux-amd64_a87c5cd6.log

Consult https://build.golang.org/ to see whether it's a new failure. Other builds still in progress; subsequent failure notices suppressed until final report.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 5976:

Patch Set 19: TryBot-Result-1

2 of 6 TryBots failed:
Failed on linux-amd64: https://storage.googleapis.com/go-build-log/1a5350e1/linux-amd64_a87c5cd6.log
Failed on linux-386: https://storage.googleapis.com/go-build-log/1a5350e1/linux-386_67f4c263.log

Consult https://build.golang.org/ to see whether they are new failures.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

After moving the filepath.Walk example to a standalone example file
in CL 122237 (so it could use a standalone function), godoc includes
the build tag annotation ("// +build !windows,!plan9" in this case)
in the runnable example. The example runs correctly, but the
annotation might be confusing for new users.

Change the behavior so that godoc skips these annotations when
displaying examples.

To avoid false positives in older versions of "go vet", which are still used
on the build dashboard, we avoid using a multiline string in the test.

Fixes golang/go#26490.

Change-Id: I1da4b3b7e1e5a85a76773e25d9355b3f92479c19
@gopherbot
Copy link
Contributor

Message from Gerrit User 12446:

Uploaded patch set 21: New patch set was added with same tree, parent, and commit message as Patch Set 20.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 18980:

Patch Set 21:

Patch Set 19: TryBot-Result-1

2 of 6 TryBots failed:
Failed on linux-amd64: https://storage.googleapis.com/go-build-log/1a5350e1/linux-amd64_a87c5cd6.log
Failed on linux-386: https://storage.googleapis.com/go-build-log/1a5350e1/linux-386_67f4c263.log

Consult https://build.golang.org/ to see whether they are new failures.

Rebased on master again, which has two fixes which look relevant:
cfaff8d
ade7853


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 13550:

Patch Set 21: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 5976:

Patch Set 21:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=dd4394e5


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 5976:

Patch Set 21: TryBot-Result+1

TryBots are happy.


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gerrit User 13550:

Patch Set 21: Code-Review+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/126256.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Jul 31, 2018
After moving the filepath.Walk example to a standalone example file
in CL 122237 (so it could use a standalone function), godoc includes
the build tag annotation ("// +build !windows,!plan9" in this case)
in the runnable example.  The example runs correctly, but the
annotation might be confusing for new users.

Change the behavior so that godoc skips these annotations when
displaying examples.

To avoid false positives in older versions of "go vet", which are still used
on the build dashboard, we avoid using a multiline string in the test.

Fixes golang/go#26490.

Change-Id: I1da4b3b7e1e5a85a76773e25d9355b3f92479c19
GitHub-Last-Rev: bc5ed29
GitHub-Pull-Request: #42
Reviewed-on: https://go-review.googlesource.com/126256
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
@gopherbot
Copy link
Contributor

This PR is being closed because golang.org/cl/126256 has been merged.

@gopherbot gopherbot closed this Jul 31, 2018
WenzheLiu pushed a commit to WenzheLiu/tools that referenced this pull request Nov 29, 2019
* commit '31f77005d1f38ac58687334cba2c54990b393eb7':
  update download link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants