Skip to content

Is it possible to generate variables in a BUILD file when extending gazelle? #1978

Answered by mclarke47
mclarke47 asked this question in Q&A
Discussion options

You must be logged in to vote

Seems to work by doing something like:

r := rule.NewRule("someValue  = some_other_rule", "name1")
r2 := rule.NewRule("some_other_rule", "name2")
r2.SetAttr("value", &bzl.Ident{
	Name: "someValue",
})

Though I'm not sure how intentional this is.

It also seems to mess up the imports

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mclarke47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant