--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/9d9f188f-c8ff-4fa0-b080-3cd503893820%40googlegroups.com.
in cmd attribute of genrule rule //:abc: label '//:otherfn.txt' in $(location) expression is not a declared prerequisite of this rule
I'm getting this error. What am I missing?$(location otherfn.txt) should work
Alexandre Garcia Mayans
On 19 Mar 2020, 23:15 +0100, kv <vijay....@gmail.com>, wrote:
genrule(--name = "abc",srcs =[ "@com_xyc//:spits2filesasoutput"], #<---- this rule gives me 2 files, fn.txt, otherfn.txtouts = ["newnamefn.log"],cmd = """mv $(locations @com_xyc//:spits2filesasoutput) $@""")
I just want to rename otherfn.txt to newnamefn.log. How do I reference that specific file from the srcs?Thankskv
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-...@googlegroups.com.
On 19 Mar 2020, at 23:40, kv <vijay.k...@gmail.com> wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/f69196da-5c31-46b9-b410-91736144715d%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/74A3F6D0-D6A7-46C6-B8B2-F92E6334980D%40gmail.com.
$(location) requires a label, and only some outputs of a rule have labels (these are the "implicit outputs" of a rule, e.g. for a java_binary named "bar" in a package named "foo", there are the labels "//foo:bar" and "//foo:bar_deploy.jar"). So it depends on the implementation of the rule for "@com_xyc//:spits2filesasoutput"Other times rules put their outputs in providers, which are available to other rules. So depending on the implementation of the rule for "@com_xyc//:spits2filesasoutput", you might need to create a Starlark rule instead of using a genrule so that you can access the outputs in the other rule's providers.
On Thu, Mar 19, 2020 at 6:47 PM Alex Garcia Mayans <the...@gmail.com> wrote:
$(location @com_xyc//:otherfn.txt) maybe ?Regards,Alexandre Garcia Mayans
On 19 Mar 2020, at 23:40, kv <vijay....@gmail.com> wrote:
--in cmd attribute of genrule rule //:abc: label '//:otherfn.txt' in $(location) expression is not a declared prerequisite of this rule
I'm getting this error. What am I missing?
On Thursday, March 19, 2020 at 3:18:06 PM UTC-7, Alex Garcia wrote:$(location otherfn.txt) should work
Alexandre Garcia MayansOn 19 Mar 2020, 23:15 +0100, kv <vijay....@gmail.com>, wrote:
genrule(--name = "abc",srcs =[ "@com_xyc//:spits2filesasoutput"], #<---- this rule gives me 2 files, fn.txt, otherfn.txtouts = ["newnamefn.log"],cmd = """mv $(locations @com_xyc//:spits2filesasoutput) $@""")
I just want to rename otherfn.txt to newnamefn.log. How do I reference that specific file from the srcs?Thankskv
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/9d9f188f-c8ff-4fa0-b080-3cd503893820%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/f69196da-5c31-46b9-b410-91736144715d%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/74A3F6D0-D6A7-46C6-B8B2-F92E6334980D%40gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/b85b6871-3f9d-4f4a-9cd2-c4defa330877%40googlegroups.com.