Skip to content

Commit 63f7a3c

Browse files
authored
Merge pull request #1815 from tweag/gg/#1813
Add an error if a package is declared twice in stack_snapshot
2 parents 213b4e8 + aa2bef9 commit 63f7a3c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

haskell/cabal.bzl

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

0 commit comments

Comments
 (0)