Skip to content

Use genrule output directory as srcs for ruby_library #82

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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