Skip to content

Commit 21fdb63

Browse files
committed
debug: fail if we have a bug in the logic and try to use the same file for multiple platforms
1 parent 0296116 commit 21fdb63

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/private/pypi/parse_requirements.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,11 @@ def parse_requirements(
332332
tokenized_options.append(p)
333333

334334
pip_args = tokenized_options + extra_pip_args
335+
logger.debug(lambda: "Using {} for {}".format(file, plats))
335336
for p in plats:
337+
if p in requirements:
338+
fail_fn("Attempting to override a requirements file. Existing value: {}".format(requirements[p]))
339+
return None
336340
requirements[p] = requirements_dict
337341
options[p] = pip_args
338342

0 commit comments

Comments
 (0)