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/go/packages: allow gopackagesdriver to decline a request #39202

Closed
stamblerre opened this issue May 21, 2020 · 3 comments
Closed

x/tools/go/packages: allow gopackagesdriver to decline a request #39202

stamblerre opened this issue May 21, 2020 · 3 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@stamblerre
Copy link
Contributor

Instead of supporting a single gopackagesdriver per build system, with its own built-in fallbacks, we should support having a list of gopackagesdrivers. Each driver could decline to respond to certain requests, resulting in a fallback to the next gopackagesdriver in the list. That way, custom drivers can fallback to the default behavior of the go list driver without writing that fallback into the driver. We should add this ability to decline a request to the gopackagesdriver.

/cc @matloob

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label May 21, 2020
@gopherbot gopherbot added this to the Unreleased milestone May 21, 2020
@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 21, 2020
@cagedmantis
Copy link
Contributor

/cc @matloob

@matloob
Copy link
Contributor

matloob commented Jun 4, 2020

Okay, I think we should add a NotHandled bool field to the driverResponse struct, and if it's set, fall back to the go list driver. (Leaving the door open to have a chain of drivers sometime in the future).

I'll send a CL that does this.

I'm open to better names than NotHandled...

@gopherbot
Copy link

Change https://golang.org/cl/236758 mentions this issue: go/packages: add a mechanism for drivers to decline requests

@golang golang locked and limited conversation to collaborators Jun 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants