We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ec284b commit 4f4e5fbCopy full SHA for 4f4e5fb
python/private/common.bzl
@@ -379,7 +379,18 @@ def _third_party_first(targets):
379
This is because the DAG is going from first-party deps to third-party deps and usually
380
no third-party deps include first-party deps.
381
"""
382
- return sorted(targets, lambda x: PyInfo in x and not x[PyInfo].package)
+
383
+ # this ensures that within the 2 groups of packages the order is maintained
384
+ pypi_targets = []
385
+ nonpypi_targets = []
386
387
+ for target in targets:
388
+ if PyInfo in target and target[PyInfo].package:
389
+ pypi_targets.append(target)
390
+ else:
391
+ nonpypi_targets.append(target)
392
393
+ return pypi_targets + nonpypi_targets
394
395
def create_py_info(
396
ctx,
0 commit comments