-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
make oci_image()
accept a file for workdir
#673
base: main
Are you sure you want to change the base?
Conversation
This clones much of the same logic as `entrypoint` and friends. Also refactor docstring a little to illuminate "wrapper vs the rule" and the dual typed args.
I used this to clone the language rule's "set a default My intent is to extract some of my local changes and add default |
oci_image()
macro wrapper accept a file for workdiroci_image()
accept a file for workdir
also worth noting that it breaks backwards compatibility: |
I don’t think it makes sense to have an attribute that takes an array for a single value. Doesn’t make sense from public api standpoint. |
@lazcamus I love the idea to be able to use the output of a target by just passing the label but I agree with @thesayyn re. not using an array. Also, per the Dockerfile spec, Following your notation (which I also think is great and clarifies the wrapper-vs-rule) I'd prefer if |
On Sun, Sep 1, 2024 at 2:22 AM Sahin Yort ***@***.***> wrote:
I don’t think it makes sense to have an attribute that takes an array for
a single value. Doesn’t make sense from public api standpoint.
Makes sense. I'll up my skylark skills and re-work it :)
… Message ID: ***@***.***>
|
It kinda doesn't exist in macro-land, so build a hacky string parsing heuristic
I pushed a commit that makes The reason I originally ended up on the list is b/c it's easy to check with There is no "is this string a valid label?" check in macro context, so I did some hacky string matching. It comes with the corner case of: what do you do if you get "foo" ? It's a valid target (I'd use |
CI status seems like a runner failure, hopefully intermittent?
|
i am afraid only possible solution here is to allow string only from the macro since we can't distinguish between string vs label despite best efforts. I believe it was one of the big mistakes of bazel not making it apparently obvious between string vs label from use-site perspective. |
This clones much of the same logic as
entrypoint
and friends. Also refactor docstring a little to illuminate "wrapper vs the rule" and the dual typed args.