You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
@mariusgrigoriu The main reason I could not implement what you proposed was due to a limitation in bazel/starlark: bazelbuild/bazel#1232. But if you do find a better way of implementing this I would be very happy to get a PR in.
I actually did think of some improvement of this a while ago, because it also becomes a bit weird when one uses a filegroup. I was thinking one way of improving this is that if one only provides the ext_str_files or ext_code_files without the corresponding ext_str_file_vars/ext_code_file_vars it could choose the name automatically based on the file name. Which in would probably be fine for >90% of the cases.
ext_code
andext_str
take a map of variable names and values, butext_code_files
andext_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.
The text was updated successfully, but these errors were encountered: