-
Notifications
You must be signed in to change notification settings - Fork 769
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
Support for test flags when calling gopls packages command #3670
Comments
Hmm, I think the Packages command should ideally query the packages that gopls sees. If users want to operate on specific |
To be clear I was thinking of an optional parameter that would modify Packages' behavior. Should I take your comment to mean, "Packages' behavior should not be modifiable in that manner"? I think that's a reasonable decision I just want to be sure I understand. I'm not sure how the optional behavior modification would work; given my (admittedly limited) understanding of how gopls handles tags, snapshots, views, etc it seems like "interpret this code with a transient set of tags" really doesn't fit the model. That being said, we may need to consider changing how build flags and test flags are handled. As @hyangah says here, currently Maybe |
Yes, that is what I meant: there is a lot of setup logic required to handle a new logical build, and I think generally we must require that users manage configuration for custom build configurations.
That is unfortunate. I think https://go.dev/issue/65757 is a better path forward for build configuration. |
When vscode calls the gopls packages command to list tests, is it feasible to pass testFlags? The test flags could include -tags which could change which tests are available, causing a mismatch between what the test explorer reports and what can actually be executed with the given test flags. If a CL for #1904 is merged then we'd also have benchmark flags. Alternatively, we could explicitly exclude -tags from testFlags (and benchFlags if that happens). I think we should do one or the other (or perhaps one then the other) because otherwise someone is inevitably going to try running tests with -tags in testFlags and it be buggy.
The text was updated successfully, but these errors were encountered: