question about aliases and executable targets

592 views
Skip to first unread message

Warren Turkal

unread,
May 18, 2016, 1:48:23 AM5/18/16
to bazel-discuss
Hi bazel experts,

I have a repo at https://github.com/wt/bazel_rules_nodejs.

I locally added the following line to examples/hello_world/BUILD:
alias(name="a", actual=":hello_world")

I was then able to successfully build ":hello_world" and ":a".

However, I am running into an issue with running the alias. The following command works:
bazel run :hello_world

However, the following fails:
bazel run :a

Here's the output::
examples/hello_world$ bazel run :a
ERROR
: Cannot run target //examples/hello_world:a: Not executable.
INFO
: Elapsed time: 0.174s
ERROR
: Build failed. Not running target.

Should the alias not also be runnable?

Thanks,
wt

Warren Turkal

unread,
May 18, 2016, 10:12:36 PM5/18/16
to bazel-discuss
Ping? Does anyone have any ideas about this behavior?

Thanks,
wt

Damien Martin-guillerez

unread,
May 19, 2016, 6:54:52 AM5/19/16
to Warren Turkal, bazel-discuss, lbe...@google.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-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/47cb7861-e713-402b-b220-d9da9797d775%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lukács T. Berki

unread,
May 19, 2016, 7:58:38 AM5/19/16
to Damien Martin-guillerez, Warren Turkal, bazel-discuss
You just found a bug! I'm dabbling around in the alias rule right now anyway, so I thought I'll just fix this quick, but it does not seem to be a trivial one. I filed https://github.com/bazelbuild/bazel/issues/1290 .

--
Lukács T. Berki | Software Engineer | lbe...@google.com | 

Google Germany GmbH | Erika-Mann-Str. 33  | 80636 München | Germany | Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle | Registergericht und -nummer: Hamburg, HRB 86891

Lukács T. Berki

unread,
May 19, 2016, 8:27:30 AM5/19/16
to Damien Martin-guillerez, Warren Turkal, bazel-discuss
Fix submitted for internal review. Should be there in tomorrow's push (or Monday's, if the push happens before the change is submitted)

Warren Turkal

unread,
May 20, 2016, 5:26:42 AM5/20/16
to bazel-discuss, dmar...@google.com, w...@penguintechs.org
Reply all
Reply to author
Forward
0 new messages