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

gopackagesdriver: skip root packages that can't be built #3806

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jayconrod
Copy link
Contributor

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

Omits package IDs from gopackagesdriver's roots list if we can't build package metadata for them.

Which issues(s) does this PR fix?

Fixes #3805

Other notes for review

@jayconrod
Copy link
Contributor Author

Are there tests for gopackagesdriver? I didn't see a place to add a test case. If I missed it, please let me know, happy to add.

@fmeum
Copy link
Member

fmeum commented Jan 2, 2024

@JamyDev added a basic test that you could extend (if possible): tests/integration/gopackagesdriver/gopackagesdriver_test.go

@jayconrod
Copy link
Contributor Author

Thanks! Not sure how I missed that. Added a test case there.

@fmeum fmeum force-pushed the fix-gopackagesdriver-incompatible branch from 7a33d8b to 15ff159 Compare January 2, 2024 20:00
@fmeum fmeum enabled auto-merge (squash) January 2, 2024 20:00
@fmeum fmeum disabled auto-merge January 2, 2024 20:37
@fmeum fmeum force-pushed the fix-gopackagesdriver-incompatible branch from c698f48 to 5e026e2 Compare February 9, 2024 15:43
@fmeum
Copy link
Member

fmeum commented Feb 9, 2024

@jayconrod There is still a failure on Bazel 5.4.0. I think it's fine if this fix doesn't support that version, so if you rather want to disable the test in the 5.4.0 CI run, feel free to do so.

@jayconrod
Copy link
Contributor Author

Sorry I haven't gotten back to this yet! I'll take some time this weekend and try to finish it.

I ran into some trouble with the testing framework and was planning to submit another PR ahead of this one that would fix it. Windows, as always, is being troublesome though.

@jayconrod
Copy link
Contributor Author

In #3856, I've moved gopackagesdriver_test into //go/tools/gopackagesdriver. Since it embeds the library instead of calling via bazel run, the test is considerably easier to write, debug, and faster to iterate on.

I've rebased this one, but GitHub won't let me set the base to a branch in my own fork. So... the diff will look ugly until #3856 is merged and this is rebased again. Sorry for the extra confusion.

@jayconrod jayconrod force-pushed the fix-gopackagesdriver-incompatible branch from f359b9a to 8c33593 Compare March 13, 2024 23:29
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.

gopackagesdriver: returns roots for incompatible targets
3 participants