Skip to content

Commit 6dad6da

Browse files
committed
Add an error if a package is declared twice in stack_snapshot
1 parent 984750c commit 6dad6da

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
@@ -1613,6 +1613,8 @@ def _parse_packages_list(packages, vendored_packages):
16131613
unversioned = _chop_version(package) if has_version else package
16141614
if unversioned in vendored_packages:
16151615
fail("Duplicate package '{}'. Packages may not be listed in both 'packages' and 'vendored_packages'.".format(package))
1616+
if unversioned in all_packages:
1617+
fail("Duplicate package '{}'. Packages should be declared only once in 'packages'.".format(package))
16161618
all_packages.append(unversioned)
16171619
if has_version:
16181620
versioned_packages.append(package)

0 commit comments

Comments
 (0)