-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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/go/packages: undeprecate Load* mode flags (or fix Need* flags) #70470
Comments
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
I agree that we should undeprecate them, recommend their use, and improve their documentation. The Load flags are not only simpler, but they have fewer combinations, which means fewer "colors" (really: subtle Pantone shades) of Packages data structures that algorithms need to deal with.
See this list of need-related issues for starters:
|
Thank you. Somehow this github search fails to return any of those... |
Change https://go.dev/cl/630435 mentions this issue: |
@findleyr I think the issues are listed in the comments of |
Updates golang/go#70470 Change-Id: Ia254b993b301fcc708d07b3773fad31a971c5997 Reviewed-on: https://go-review.googlesource.com/c/tools/+/630435 Reviewed-by: Robert Findley <[email protected]> Reviewed-by: Alan Donovan <[email protected]> Auto-Submit: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
Thanks for the contribution! I think we can actually close this issue now, since we do have other issues filed for the broken Need flags. |
Especially with the 'deprecated' gopls analyzer, I keep bumping up against the fact that go/packages.LoadAllSyntax is deprecated, yet we continue to use it, and keep adding more uses. The stated reason for continuing to use it are usually (1) it is convenient, and (2) the Need* flags interact surprisingly in complicated ways. (To be honest, I can't recall exactly how NeedFlags don't behave as expected -- perhaps @adonovan remembers).
Assertions:
Since we're unlikely to have time to prioritize digging deeply into this problem, I think we should just remove the deprecation notices from these mode flags. Given that the original addition did not have a proposal (https://go.dev/cl/173959), I don't think we need a proposal here. (deprecation is a reversible decision).
CC @adonovan @matloob
The text was updated successfully, but these errors were encountered: