-
-
Notifications
You must be signed in to change notification settings - Fork 652
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
[internal] Hook up check
to Go
#13322
Conversation
1cd9a53
to
94361c2
Compare
check
to Gocheck
to Go
[ci skip-rust] [ci skip-build-wheels]
94361c2
to
d319f4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also should be streaming the result of each compilation as it happens, which has an added benefit of that output happening when compilation happens as a side effect of run, package, and test. Those fixes will be in a followup.
Not a blocker, but if you do end up making changes here, this is pretty easy to do... mostly just adding def message
and def level
methods to FallibleBuiltGoPackage
.
build_requests = await MultiGet( | ||
Get(FallibleBuildGoPackageRequest, BuildGoPackageTargetRequest(field_set.address)) | ||
for field_set in request.field_sets | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would probably represent a fatal error, right? i.e., something that would prevent anything from compiling? If so, probably fine for it not to be fallible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #13334. We run go list
to determine how to build a package, and also its decencies for inference etc. It's important that syntax errors there don't break the entire build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Python, I think that we skip inference in that case, and the effect is that whichever tool you were attempting to use will fail with the parse error instead (I just observed this with mypy
reporting a parse error, which after fixing allowed inference to get further). But yea, either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly. That PR has the same effect. We give up on inference if we fail to run go list
This lets you compile a package without needing to run tests or package a binary.
Note that you can only directly compile a first-party package - to check if a third-party package is buildable, it must be a dependency of a first-party package. Works around #13175.
This does not yet have an optimal UX. It's overly chatty:
We also should be streaming the result of each compilation as it happens, which has an added benefit of that output happening when compilation happens as a side effect of
run
,package
, andtest
. Those fixes will be in a followup.[ci skip-rust]
[ci skip-build-wheels]