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

src/goTest: Use more robust method to find module name in go.mod #2172

Closed
wants to merge 4 commits into from

Conversation

dlipovetsky
Copy link
Contributor

@dlipovetsky dlipovetsky commented Apr 8, 2022

The previous method found the name only if it appeared on the first line. However, it is legal for comments to precede the line with the module name.

The first commit is a failing integration test, and the second commit is the fix.

Fixes #2171

The previous method found the name only if it appeared on the first
line. However, it is legal for comments to precede the line with the
module name.
@gopherbot
Copy link
Collaborator

This PR (HEAD: a4774b9) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/vscode-go/+/399074 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@dlipovetsky
Copy link
Contributor Author

FYI, I also entertained finding the name by calling go list -m. That would have been a strategic change, and a much larger one, so I chose to make the smaller, tactical fix.

@gopherbot
Copy link
Collaborator

Message from Gopher Robot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
A maintainer will review your change and provide feedback. See
https://go.dev/doc/contribute#review for more info and tips to get your
patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.


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

@gopherbot
Copy link
Collaborator

Message from Hyang-Ah Hana Kim:

Patch Set 1: Run-TryBot+1

(4 comments)


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

@gopherbot
Copy link
Collaborator

Message from kokoro:

Patch Set 1:

Kokoro presubmit build starting for golang/vscode-go/gcp_ubuntu/presubmit
Logs at:
https://source.cloud.google.com/results/invocations/55c02ad5-caa3-4300-8b14-d9b11a9f61ff


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

@gopherbot
Copy link
Collaborator

Message from kokoro:

Patch Set 1: TryBot-Result+1

Kokoro presubmit build finished with status: SUCCESS
Logs at: https://source.cloud.google.com/results/invocations/55c02ad5-caa3-4300-8b14-d9b11a9f61ff


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

@gopherbot
Copy link
Collaborator

Message from Daniel Lipovetsky:

Patch Set 1:

(4 comments)


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

@gopherbot
Copy link
Collaborator

This PR (HEAD: 389f39a) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/vscode-go/+/399074 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Collaborator

Message from Daniel Lipovetsky:

Patch Set 2:

(2 comments)


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

@gopherbot
Copy link
Collaborator

Message from Hyang-Ah Hana Kim:

Patch Set 2: Run-TryBot+1 Auto-Submit+1 Code-Review+2 Trust+1

(2 comments)


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

@gopherbot
Copy link
Collaborator

Message from kokoro:

Patch Set 2:

Kokoro presubmit build starting for golang/vscode-go/gcp_ubuntu/presubmit
Logs at:
https://source.cloud.google.com/results/invocations/353dc16b-2f1a-40a6-9284-417210ee2e2d


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

@gopherbot
Copy link
Collaborator

Message from Hyang-Ah Hana Kim:

Patch Set 2:

(1 comment)


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

@gopherbot
Copy link
Collaborator

Message from kokoro:

Patch Set 2: TryBot-Result+1

Kokoro presubmit build finished with status: SUCCESS
Logs at: https://source.cloud.google.com/results/invocations/353dc16b-2f1a-40a6-9284-417210ee2e2d


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

@gopherbot
Copy link
Collaborator

Message from Daniel Lipovetsky:

Patch Set 3:

(3 comments)


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

gopherbot pushed a commit that referenced this pull request Apr 8, 2022
The previous method found the name only if it appeared on the first line. However, it is legal for comments to precede the line with the module name.

The first commit is a failing integration test, and the second commit is the fix.

Fixes #2171

Change-Id: Iafc6ad7b02061ba57994d194ec2a68ec755caeeb
GitHub-Last-Rev: 389f39a
GitHub-Pull-Request: #2172
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/399074
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Suzy Mueller <suzmue@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
@gopherbot
Copy link
Collaborator

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

@gopherbot gopherbot closed this Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test explorer fails to resolve module name when the name does not appear on the first line in go.mod
2 participants