Open
Description
At IOG we have started using a custom hackage repositories, which we informally call CHaP.
To add the custom repository to a project we have been doing
repository cardano-haskell-packages
url: https://input-output-hk.github.io/cardano-haskell-packages
secure: True
root-keys:
-- snip
index-state: 2022-07-01T00:00:00Z
index-state: cardano-haskell-packages 2022-10-20T00:00:00Z
We thought the first index-state
would apply to all active repositories, and the second one only to the specified repository. (For context: we did this because we were working around a limination with another tool which we use to parse cabal.project
).
But we were wrong! After a while it became clear that the second index-state completely overrides the first (as the first was never there).
Indeed, the correct way to express two index-states would be
index-state:
, hackage.haskell.org 2022-07-01T00:00:00Z
, cardano-haskell-packages 2022-10-20T00:00:00Z
- Is this the intended behaviour?
- Should cabal accept multiple
index-state
stanza (for different repos) - Should cabal give a warning when it sees stanzas which override previos ones?
Thanks!
Ping @michaelpj @angerman