diff --git a/plugins/package-managers/stack/src/funTest/assets/projects/external/quickcheck-state-machine-expected-output.yml b/plugins/package-managers/stack/src/funTest/assets/projects/external/quickcheck-state-machine-expected-output.yml index 72b80ae5c8616..25352cbd9973c 100644 --- a/plugins/package-managers/stack/src/funTest/assets/projects/external/quickcheck-state-machine-expected-output.yml +++ b/plugins/package-managers/stack/src/funTest/assets/projects/external/quickcheck-state-machine-expected-output.yml @@ -1122,12 +1122,12 @@ packages: type: "Git" url: "https://github.com/haskell-compat/base-compat" revision: "" - path: "" + path: "base-compat" vcs_processed: type: "Git" url: "https://github.com/haskell-compat/base-compat.git" revision: "" - path: "" + path: "base-compat" - id: "Hackage:Compatibility:base-orphans:0.8" purl: "pkg:hackage/Compatibility/base-orphans@0.8" authors: @@ -2399,12 +2399,12 @@ packages: type: "Git" url: "https://github.com/haskell/cabal/" revision: "" - path: "" + path: "Cabal" vcs_processed: type: "Git" url: "https://github.com/haskell/cabal.git" revision: "" - path: "" + path: "Cabal" - id: "Hackage:GHC:ghc-prim:0.5.3" purl: "pkg:hackage/GHC/ghc-prim@0.5.3" declared_licenses: @@ -2428,12 +2428,12 @@ packages: type: "Git" url: "http://git.haskell.org/ghc.git" revision: "" - path: "" + path: "libraries/ghc-prim" vcs_processed: type: "Git" url: "http://git.haskell.org/ghc.git" revision: "" - path: "" + path: "libraries/ghc-prim" - id: "Hackage:Generics:generics-sop:0.4.0.1" purl: "pkg:hackage/Generics/generics-sop@0.4.0.1" authors: @@ -2803,12 +2803,12 @@ packages: type: "Git" url: "http://git.haskell.org/ghc.git" revision: "" - path: "" + path: "libraries/base" vcs_processed: type: "Git" url: "http://git.haskell.org/ghc.git" revision: "" - path: "" + path: "libraries/base" - id: "Hackage:System:directory:1.3.3.0" purl: "pkg:hackage/System/directory@1.3.3.0" declared_licenses: @@ -3110,12 +3110,12 @@ packages: type: "Git" url: "http://git.haskell.org/ghc.git" revision: "" - path: "" + path: "libraries/template-haskell" vcs_processed: type: "Git" url: "http://git.haskell.org/ghc.git" revision: "" - path: "" + path: "libraries/template-haskell" - id: "Hackage:Testing:QuickCheck:2.13.1" purl: "pkg:hackage/Testing/QuickCheck@2.13.1" authors: diff --git a/plugins/package-managers/stack/src/funTest/assets/projects/synthetic/stack-yesodweb-simple-expected-output.yml b/plugins/package-managers/stack/src/funTest/assets/projects/synthetic/stack-yesodweb-simple-expected-output.yml index ed56aba4741ff..6f3badc0b6dff 100644 --- a/plugins/package-managers/stack/src/funTest/assets/projects/synthetic/stack-yesodweb-simple-expected-output.yml +++ b/plugins/package-managers/stack/src/funTest/assets/projects/synthetic/stack-yesodweb-simple-expected-output.yml @@ -125482,12 +125482,12 @@ packages: type: "Git" url: "https://github.com/haskell-compat/base-compat" revision: "" - path: "" + path: "base-compat" vcs_processed: type: "Git" url: "https://github.com/haskell-compat/base-compat.git" revision: "" - path: "" + path: "base-compat" - id: "Hackage:Compatibility:base-compat-batteries:0.11.2" purl: "pkg:hackage/Compatibility/base-compat-batteries@0.11.2" authors: @@ -125524,12 +125524,12 @@ packages: type: "Git" url: "https://github.com/haskell-compat/base-compat" revision: "" - path: "" + path: "base-compat-batteries" vcs_processed: type: "Git" url: "https://github.com/haskell-compat/base-compat.git" revision: "" - path: "" + path: "base-compat-batteries" - id: "Hackage:Compatibility:base-orphans:0.8.4" purl: "pkg:hackage/Compatibility/base-orphans@0.8.4" authors: @@ -126566,12 +126566,12 @@ packages: type: "Git" url: "git://github.com/vincenthz/hs-crypto-cipher" revision: "" - path: "" + path: "types" vcs_processed: type: "Git" url: "https://github.com/vincenthz/hs-crypto-cipher.git" revision: "" - path: "" + path: "types" - id: "Hackage:Cryptography:crypto-random:0.0.9" purl: "pkg:hackage/Cryptography/crypto-random@0.0.9" authors: @@ -126598,12 +126598,12 @@ packages: type: "Git" url: "git://github.com/vincenthz/hs-crypto-random" revision: "" - path: "" + path: "types" vcs_processed: type: "Git" url: "https://github.com/vincenthz/hs-crypto-random.git" revision: "" - path: "" + path: "types" - id: "Hackage:Cryptography:cryptonite:0.26" purl: "pkg:hackage/Cryptography/cryptonite@0.26" authors: @@ -126784,12 +126784,12 @@ packages: type: "Git" url: "https://github.com/vincenthz/hs-asn1" revision: "" - path: "" + path: "encoding" vcs_processed: type: "Git" url: "https://github.com/vincenthz/hs-asn1.git" revision: "" - path: "" + path: "encoding" - id: "Hackage:Data:asn1-parse:0.9.5" purl: "pkg:hackage/Data/asn1-parse@0.9.5" authors: @@ -126817,12 +126817,12 @@ packages: type: "Git" url: "https://github.com/vincenthz/hs-asn1" revision: "" - path: "" + path: "parse" vcs_processed: type: "Git" url: "https://github.com/vincenthz/hs-asn1.git" revision: "" - path: "" + path: "parse" - id: "Hackage:Data:asn1-types:0.3.4" purl: "pkg:hackage/Data/asn1-types@0.3.4" authors: @@ -127875,12 +127875,12 @@ packages: type: "Git" url: "git://github.com/vincenthz/hs-certificate" revision: "" - path: "" + path: "x509" vcs_processed: type: "Git" url: "https://github.com/vincenthz/hs-certificate.git" revision: "" - path: "" + path: "x509" - id: "Hackage:Data:x509-store:1.6.7" purl: "pkg:hackage/Data/x509-store@1.6.7" authors: @@ -127908,12 +127908,12 @@ packages: type: "Git" url: "git://github.com/vincenthz/hs-certificate" revision: "" - path: "" + path: "x509-store" vcs_processed: type: "Git" url: "https://github.com/vincenthz/hs-certificate.git" revision: "" - path: "" + path: "x509-store" - id: "Hackage:Data:x509-system:1.6.6" purl: "pkg:hackage/Data/x509-system@1.6.6" authors: @@ -127940,12 +127940,12 @@ packages: type: "Git" url: "git://github.com/vincenthz/hs-certificate" revision: "" - path: "" + path: "x509-system" vcs_processed: type: "Git" url: "https://github.com/vincenthz/hs-certificate.git" revision: "" - path: "" + path: "x509-system" - id: "Hackage:Data:x509-validation:1.6.11" purl: "pkg:hackage/Data/x509-validation@1.6.11" authors: @@ -127972,12 +127972,12 @@ packages: type: "Git" url: "git://github.com/vincenthz/hs-certificate" revision: "" - path: "" + path: "x509-validation" vcs_processed: type: "Git" url: "https://github.com/vincenthz/hs-certificate.git" revision: "" - path: "" + path: "x509-validation" - id: "Hackage:Data:yaml:0.11.5.0" purl: "pkg:hackage/Data/yaml@0.11.5.0" authors: @@ -129070,12 +129070,12 @@ packages: type: "Git" url: "https://github.com/haskell/cabal/" revision: "" - path: "" + path: "Cabal" vcs_processed: type: "Git" url: "https://github.com/haskell/cabal.git" revision: "" - path: "" + path: "Cabal" - id: "Hackage:Distribution:cabal-doctest:1.0.8" purl: "pkg:hackage/Distribution/cabal-doctest@1.0.8" authors: @@ -129135,12 +129135,12 @@ packages: type: "Git" url: "http://git.haskell.org/ghc.git" revision: "" - path: "" + path: "libraries/ghc-prim" vcs_processed: type: "Git" url: "http://git.haskell.org/ghc.git" revision: "" - path: "" + path: "libraries/ghc-prim" - id: "Hackage:Language:language-javascript:0.7.1.0" purl: "pkg:hackage/Language/language-javascript@0.7.1.0" authors: @@ -129635,12 +129635,12 @@ packages: type: "Git" url: "https://github.com/vincenthz/hs-tls" revision: "" - path: "" + path: "core" vcs_processed: type: "Git" url: "https://github.com/vincenthz/hs-tls.git" revision: "" - path: "" + path: "core" - id: "Hackage:Network, Web:http-date:0.0.10" purl: "pkg:hackage/Network%2C%20Web/http-date@0.0.10" authors: @@ -129800,12 +129800,12 @@ packages: type: "Git" url: "git://github.com/haskell/aeson.git" revision: "" - path: "" + path: "attoparsec-iso8601" vcs_processed: type: "Git" url: "https://github.com/haskell/aeson.git" revision: "" - path: "" + path: "attoparsec-iso8601" - id: "Hackage:Parsing:parsec:3.1.14.0" purl: "pkg:hackage/Parsing/parsec@3.1.14.0" authors: @@ -129871,12 +129871,12 @@ packages: type: "Git" url: "https://gitlab.haskell.org/ghc/ghc.git" revision: "" - path: "" + path: "libraries/base" vcs_processed: type: "Git" url: "https://gitlab.haskell.org/ghc/ghc.git" revision: "" - path: "" + path: "libraries/base" - id: "Hackage:System:byteorder:1.0.4" purl: "pkg:hackage/System/byteorder@1.0.4" authors: @@ -130461,12 +130461,12 @@ packages: type: "Git" url: "https://gitlab.haskell.org/ghc/ghc.git" revision: "" - path: "" + path: "libraries/template-haskell" vcs_processed: type: "Git" url: "https://gitlab.haskell.org/ghc/ghc.git" revision: "" - path: "" + path: "libraries/template-haskell" - id: "Hackage:Template Haskell:th-lift-instances:0.1.18" purl: "pkg:hackage/Template%20Haskell/th-lift-instances@0.1.18" authors: @@ -131016,12 +131016,12 @@ packages: type: "Git" url: "https://github.com/haskell-foundation/foundation" revision: "" - path: "" + path: "basement" vcs_processed: type: "Git" url: "https://github.com/haskell-foundation/foundation.git" revision: "" - path: "" + path: "basement" - id: "Hackage:Web:clientsession:0.9.1.2" purl: "pkg:hackage/Web/clientsession@0.9.1.2" authors: diff --git a/plugins/package-managers/stack/src/main/kotlin/Stack.kt b/plugins/package-managers/stack/src/main/kotlin/Stack.kt index 10250c7a1f545..73d06bba4b68e 100644 --- a/plugins/package-managers/stack/src/main/kotlin/Stack.kt +++ b/plugins/package-managers/stack/src/main/kotlin/Stack.kt @@ -307,10 +307,12 @@ private fun parseCabalFile(cabal: String, identifierType: String): Package { val vcsType = (map["source-repository-this-type"] ?: map["source-repository-head-type"]).orEmpty() val vcsUrl = (map["source-repository-this-location"] ?: map["source-repository-head-location"]).orEmpty() + val vcsPath = (map["source-repository-this-subdir"] ?: map["source-repository-head-subdir"]).orEmpty() val vcs = VcsInfo( type = VcsType.forName(vcsType), revision = map["source-repository-this-tag"].orEmpty(), - url = vcsUrl + url = vcsUrl, + path = vcsPath ) val homepageUrl = map["homepage"].orEmpty()