bazel-contrib / bazel-contrib/rules_jsonnet

Support import_prefix and strip_import_prefix attrs in jsonnet_library

Open
#155 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Starlark
Stars
72
Forks
87
PR merge metrics
No merged PRs in 30d

Description

In light of #139 and #154, I think we should add `import_prefix` and `strip_import_prefix` attrs to `jsonnet_library` to bring virtual includes paths to jsonnet.

`proto_library` and `cc_library` had exact same issues in the past, and prefix magic solved the problem. I believe we can do the same for jsonnet.

Speaking of this, I think we also need to improve `imports` a little bit to make it similar to `cc_library` in some sense.

Contributor guide

Open the contributing guide

Research direction

No implementation file or test is named. Start by comparing the existing jsonnet_library behavior with the referenced proto_library and cc_library prefix handling, then clarify how import_prefix, strip_import_prefix, and imports should interact. Done means the requested virtual include paths work consistently and the behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.