forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not use shallow clones for short revisions
When the `tag` of a `source-repository-stanza` is not a full hash, we cannot do a shallow clone and fetch it separately. Therefore, in those cases, we fall back to doing a full clone. Fixes haskell#10605 Includes a regression test by @9999years. Co-authored-by: Rebecca Turner <[email protected]>
- Loading branch information
Showing
6 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
cabal-testsuite/PackageTests/SourceRepositoryPackageShallow/cabal.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# cabal v2-build | ||
Configuration is affected by the following files: | ||
- cabal.project | ||
Resolving dependencies... | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following will be built: | ||
- puppy-1.0 (lib) (first run) | ||
Configuring library for puppy-1.0... | ||
Preprocessing library for puppy-1.0... | ||
Building library for puppy-1.0... |
8 changes: 8 additions & 0 deletions
8
cabal-testsuite/PackageTests/SourceRepositoryPackageShallow/cabal.project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
packages: . | ||
|
||
-- Regression for https://github.com/haskell/cabal/issues/10605 | ||
-- This is `my-lib` 0.9. | ||
source-repository-package | ||
type: git | ||
location: https://github.com/9999years/cabal-testsuite-my-lib.git | ||
tag: 9a0af0aa |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/SourceRepositoryPackageShallow/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest $ do | ||
cabal "v2-build" [] |
9 changes: 9 additions & 0 deletions
9
cabal-testsuite/PackageTests/SourceRepositoryPackageShallow/puppy.cabal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cabal-version: 3.0 | ||
name: puppy | ||
version: 1.0 | ||
|
||
library | ||
default-language: Haskell2010 | ||
hs-source-dirs: src | ||
build-depends: base | ||
exposed-modules: Puppy |
1 change: 1 addition & 0 deletions
1
cabal-testsuite/PackageTests/SourceRepositoryPackageShallow/src/Puppy.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module Puppy () where |