Skip to content
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

Please document what substitutions are available in rule outputs #115

Closed
zrlk opened this issue Apr 13, 2015 · 5 comments
Closed

Please document what substitutions are available in rule outputs #115

zrlk opened this issue Apr 13, 2015 · 5 comments
Assignees
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: documentation (cleanup)
Milestone

Comments

@zrlk
Copy link

zrlk commented Apr 13, 2015

In the outputs of a rule, %{name} does something; %{src} also appears to do something, but I can't find this documented anywhere. What's the context in which these are evaluated? Can I write expressions or just variable lookups?

@laszlocsomor
Copy link
Contributor

AFAIK that's only supposed to work in a few attributes and it should be documented in the BE. Which rule and attribute name did you try? Can you tell more about what %{src} seems to do?

@ulfbot
Copy link

ulfbot commented Apr 14, 2015

You can basically refer to any attribute, no expressions. However,
referring to anything other than %{name} is likely to run into problems,
because these templates are evaluated at loading time, at which point we
don't have full information about the attributes yet - things like select()
and filegroup make this hard.

If you are writing a built-in (native) rule, you can subclass
ImplicitOutputsFunction with custom code. If you don't need to be able to
refer to the files by name in another rule, then you don't need to use this
at all; you can just generate file names as you wish. However, you need to
make sure that you don't get name conflicts with other rules in the same
package.

It would be good if you could tell us what you're trying to do.

On Tue, Apr 14, 2015 at 9:37 AM, László Csomor [email protected]
wrote:

AFAIK that's only supposed to work in a few attributes and it should be
documented in the BE. Which rule and attribute name did you try? Can you
tell more about what %{src} seems to do?


Reply to this email directly or view it on GitHub
#115 (comment).

@hanwen
Copy link
Contributor

hanwen commented Apr 15, 2015

this commit expanded what %{attr} expansions are available: 6c8b0b6

Let's use this issue for the missing documentation.

@zrlk - can you open a separate issue if there is functionality you are missing?

@hanwen
Copy link
Contributor

hanwen commented Apr 15, 2015

Laurent, can you make the rule() documentation point to the relevant part of the BE, and/or document any other limitations on naming outputs?

@damienmg damienmg added the P3 We're not considering working on this, but happy to review a PR. (No assignee) label Jun 14, 2016
@dslomov dslomov added this to the 0.6 milestone Dec 8, 2016
@laurentlb
Copy link
Contributor

Won't fix: this feature is now deprecated (#6241).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: documentation (cleanup)
Projects
None yet
Development

No branches or pull requests

9 participants