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

x/tools/gopls: OrganizeImports truncates file with line directives #59124

Closed
pjweinb opened this issue Mar 19, 2023 · 2 comments
Closed

x/tools/gopls: OrganizeImports truncates file with line directives #59124

pjweinb opened this issue Mar 19, 2023 · 2 comments
Assignees
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@pjweinb
Copy link

pjweinb commented Mar 19, 2023

with gopls at tip, here are before and after OrganizeImports

"//line foo.y:103\npackage main\n\nimport "fmt"\n\n// this comment is necessary for failure\nfunc a() { fmt.Println()}\n"
"//line foo.y:103\npackage main\n\nimport "fmt"\n\n// this comment is necessary for failure\n"

@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Mar 19, 2023
@gopherbot gopherbot added this to the Unreleased milestone Mar 19, 2023
@findleyr findleyr modified the milestones: Unreleased, gopls/v0.12.0 Mar 29, 2023
@findleyr
Copy link
Contributor

This was fixed in https://go.dev/cl/480515 (the issue formatting was broken in that commit message).

@gopherbot
Copy link

Change https://go.dev/cl/484739 mentions this issue: gopls/internal/regstest/misc: use go 1.19 instead of 1.29 in TestIssue59124

gopherbot pushed a commit to golang/tools that referenced this issue Apr 14, 2023
…e59124

Since Go 1.29 hasn't been released, we can't say (and shouldn't rely
on) what its behavior might be. This looks like a typo anyway. 😅

Updates golang/go#59124.

Change-Id: I9a6f04040847b907389f6e5bbccb238a46e4e223
Reviewed-on: https://go-review.googlesource.com/c/tools/+/484739
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
@golang golang locked and limited conversation to collaborators Apr 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants