Skip to content

Commit d51411f

Browse files
GuillaumeGenmergify[bot]
authored andcommitted
Add an error if a package is declared twice in stack_snapshot
1 parent 4a71029 commit d51411f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: haskell/cabal.bzl

+2
Original file line numberDiff line numberDiff line change
@@ -1624,6 +1624,8 @@ def _parse_packages_list(packages, vendored_packages):
16241624
unversioned = _chop_version(package) if has_version else package
16251625
if unversioned in vendored_packages:
16261626
fail("Duplicate package '{}'. Packages may not be listed in both 'packages' and 'vendored_packages'.".format(package))
1627+
if unversioned in all_packages:
1628+
fail("Duplicate package '{}'. Packages should be declared only once in 'packages'.".format(package))
16271629
all_packages.append(unversioned)
16281630
if has_version:
16291631
versioned_packages.append(package)

0 commit comments

Comments
 (0)