bazel-contrib / bazel-contrib/rules_jsonnet

ext_code and ext_str are inconsistent with ext_code_files and ext_str_files

Open
#101 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
72
Forks
87
PR merge metrics
No merged PRs in 30d

Description

`ext_code` and `ext_str` take a map of variable names and values, but `ext_code_files` and `ext_str_files` use parallel arrays. In my opinion, the map is a much better experience since it is possible for the user to accidentally transpose values in a larger list without noticing.

Any reason to keep the parallel arrays or would it be ok to switch everything to a map?

I was getting started on a PR to #98 but this style issue needs to be resolved prior to introducing
more inconsistency.

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by comparing the ext_code/ext_str interfaces with ext_code_files/ext_str_files and review the context from issue #98; done means the interface choice is resolved and the related API behavior is made consistent.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.