Skip to content

Use genrule output directory as srcs for ruby_library #82

Open
@shs96c

Description

@shs96c

When using a genrule to generate ruby sources, it's helpful to output a directory and then use that for the sources of a ruby_library

For example:

genrule(
  name = "gen-src-dir",
  outs = ["some-directory"],
  cmd = "mkdir -p $@ && touch $@/foo.rb $@/bar.rb"
)

ruby_library(
  name = "my-lib",
  srcs = [":gen-src-dir"],
)

Note that because these are generated files, it's hard to know what prefix to place in the include attribute, so ideally, that would allow itself to be relative to the output directory the genrule created.

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions