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

[feature] Add repository rule for translation of "properties" file into a .bzl #453

Open
eustas opened this issue Jul 1, 2023 · 3 comments
Labels
P3 We're not considering to work on this, but happy to review a PR. (No assignee) type: feature request

Comments

@eustas
Copy link

eustas commented Jul 1, 2023

Context: bazelbuild/bazel#18617; example: knik0/faad2#162

Just asking if it is appropriate. If so, I'll prepare a PR.

Reasoning: normally to translate "properties" into skylark variables we have to

  1. add repository rule into e.g. workspace.bzl
  2. load and use that rule in WORKSPACE
  3. load resulting .bzl in target BUILD file

Step (1) could be removed if such a rule is a part of bazel-skylib. As a stretch goal, we could add more input formats alongside nearly-native JSON.

@tetromino
Copy link
Collaborator

I'm not sure if this would be best done as a repository rule or a module extension. (@Wyverald, are repository rules going away?)

@Wyverald
Copy link
Member

Wyverald commented Jul 5, 2023

Repo rules are not going away. This seems appropriate as a repo rule -- pass a JSON file in, spit a .bzl file out.

@tetromino tetromino added type: feature request P3 We're not considering to work on this, but happy to review a PR. (No assignee) labels Jul 5, 2023
@tetromino
Copy link
Collaborator

Thanks! In this case, a PR is welcome

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

No branches or pull requests

3 participants