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

source-repository vs source-repository-package #9655

Closed
philderbeast opened this issue Jan 24, 2024 · 2 comments
Closed

source-repository vs source-repository-package #9655

philderbeast opened this issue Jan 24, 2024 · 2 comments

Comments

@philderbeast
Copy link
Collaborator

philderbeast commented Jan 24, 2024

What is wrong with the docs?
I'm familiar with source-repository-package in projects. I'm reading about the source-repository stanza of a package. The section title "Source Repositories" is plural.

Source Repositories
^^^^^^^^^^^^^^^^^^^
.. pkg-section:: source-repository
:since: 1.6
It is often useful to be able to specify a source revision control
repository for a package. Cabal lets you specify this information in
a relatively structured form which enables other tools to interpret and

I saw that and immediately wondered what use would there be in one package for multiple source-repository stanzas?

Can we be clearer that all source-repository elements are for the one package and not for dependencies?

@philderbeast
Copy link
Collaborator Author

I ran a quick cabal check and we can have as many source-repository stanza as we please. The following passes cabal check;

$ git diff
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index f842d4d31..afc1101b9 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -26,6 +26,23 @@ source-repository head
   location: https://github.com/haskell/cabal/
   subdir:   cabal-install
 
+source-repository head
+  type:     git
+  location: https://gitlab.com/haskell/cabal/
+  subdir:   cabal-install
+
+source-repository this
+  type:     git
+  location: https://github.com/haskell/cabal/
+  tag:      v3.11.0.0
+  subdir:   cabal-install
+
+source-repository this
+  type:     git
+  location: https://gitlab.com/haskell/cabal/
+  tag:      v3.11.0.0
+  subdir:   cabal-install

@philderbeast
Copy link
Collaborator Author

The docs have been fixed by #9701.

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

1 participant