Implement entry points for tools#1243
Conversation
14593f2 to
fab4a3f
Compare
|
I'm trying to understand what this does, but I'm completely lost TBH. |
I'm trying to make it so you can define a file within a rule as the "entry point" to that rule when you run it. Say you have the compiled go SDK that looks like: This will allow you to add entry_points = {
"go": "bin/go",
"fmt": "bin/fmt",
}to your rule and then add: tools = {
"GO": "//tools:go_sdk|go",
"LINT": "//tools:go_sdk|fmt",
}This will make the whole of |
|
Interesting, thanks for the explanation! |
8300add to
2896978
Compare
1760754 to
dedebd4
Compare
| } | ||
| } | ||
| // The remote action will set the output directory outs here | ||
| if !runRemotely { |
There was a problem hiding this comment.
just checking this is deliberate? Not sure I see how it's related...?
There was a problem hiding this comment.
Yeah I just moved the addOutputDirectoriesToBuildOutput(target) into the else branch of the above if statement. It used to look like:
if runRemotely {
...
} else {
...
}
if !runRemotely {
... := addOutputDirectoriesToBuildOutput(target)
}
which was superfluous. The diff doesn't make it that clear though.
| // RuleMetadata is the metadata attached to this build rule. It can be accessed through the "get_rule_metadata" BIF. | ||
| RuleMetadata interface{} `name:"config"` | ||
| // EntryPoints represent named binaries within the rules output that can be targeted via //package:rule|entry_point_name | ||
| EntryPoints map[string]string |
There was a problem hiding this comment.
add the name:"entry_points" tag, that will make plz query print show it nicely
| // ActionResult. Servers do not necessarily verify this but we need to make sure they are | ||
| // complete for future requests. | ||
| func (c *Client) verifyActionResult(target *core.BuildTarget, command *pb.Command, actionDigest *pb.Digest, ar *pb.ActionResult, verifyOutputs, isTest bool) error { | ||
| func (c *Client) verifyActionResult(target *core.BuildTarget, command *pb.Command, actionDigest *pb.Digest, ar *pb.ActionResult, verifyRemoteBlobsExists, isTest bool) error { |
There was a problem hiding this comment.
nit: verifyRemoteBlobsExist
| ) | ||
|
|
||
| filegroup( | ||
| name = "free_bsd_config", |
5e24a0d to
e5a2b6d
Compare
I think this is about ready to be merged. There're a few things that will have to follow:
plz runentry point aware