-
Notifications
You must be signed in to change notification settings - Fork 14
Change outs
from string_list
to output_list
#10
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
Conversation
This will allow using the `outs` produced by `pkl_eval` as inputs to other rules.
@@ -1 +1 @@ | |||
tests/pkl_eval/pkl_eval_with_out/helloworld.pcf | |||
tests/pkl_eval/helloworld.pcf |
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.
I'm not sure if removing the intermediary directories is an issue here. I would appreciate feedback on this.
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.
It's backward incompatible but I support this change:
- when
outs
is specified, then I strongly prefer not namespacing with a directory (otherwise it's confusing to the user: they specify a path that looks relative to the Bazel package dir and would end up with a different path) - when
outs
is unspecified withmultiple_outputs = False
, there's already namespacing going on via the file name - when
outs
is unspecified withmultiple_outputs = True
, namespacing is still happening via a directory.
For context, initially, the rationale for a namespacing directory was to keep every case above consistent (they would all be under a namespaced directory) but taking a step back, the suggested approach has more benefits.
Otherwise we'll find that the common prefix of `[somedir/two, somedir/three]` is `somedir/t`.
Writing this test case produced caused the previous implementation to fail. After spending some time debugging it, I realised that the `output_location` for multiple defined `outs` can be simplified to just use the `genfiles_dir` concatenated with the `label.package`.
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.
LGTM 👍
This will allow using the
outs
produced bypkl_eval
as inputs to other rules.