Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rules_haskel allows for "duplicates" within stack_snapshot::packages #1813

Closed
kczulko opened this issue Sep 2, 2022 · 1 comment
Closed

Comments

@kczulko
Copy link

kczulko commented Sep 2, 2022

Describe the bug
Accidentally, I've discovered that stack_snapshot packages list may contain "quasi-duplicates".

To Reproduce
Put two packages to stack_snapshot::packages where one is taken from stack snapshot and the other one contains a strict version, e.g:

stack_snapshot(
  packages = [
    ...
    "wai-make-assets",
    "wai-make-assets-0.2",
    ...
  ]
)

Expected behavior
While, in duplicated such case, using reference without the version is allowed for targets of type e.g. haskell_library:

haskell_library(
   deps = [
      "@stackage//:wai-make-asstets",
   ],
)

rules_haskell should probably generate an error. For a reader it may be a bit misleading what's happening in such case. Does the dependency come from stackage or hackage (https://rules-haskell.readthedocs.io/en/latest/haskell-use-cases.html#version-overrides-or-hackage-dependencies)?

Environment

  • OS name + version: Nixos 22.05.2351.e4c9d950a3c
  • Bazel version: bazel 4.1.0-
  • Version of the rules: "rules_haskell-0.14"

Additional context
tweag/gazelle_cabal#46

mergify bot added a commit that referenced this issue Dec 6, 2022
Add an error if a package is declared twice in stack_snapshot
@aherrmann
Copy link
Member

Closed in #1815

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants