-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from cabalism/bump/hpack-version-0.36
Use hpack-0.36.0 in tests
- Loading branch information
Showing
54 changed files
with
205 additions
and
71 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
# NOTE: Dependencies are intentionally not listed. | ||
|
||
.PHONY: delete-golden | ||
delete-golden: \ | ||
delete-cabal-golden \ | ||
delete-json-golden \ | ||
delete-yaml-golden | ||
|
||
.PHONY: delete-cabal-golden | ||
delete-cabal-golden: | ||
cd test-suite-golden \ | ||
&& find -type f \ | ||
| grep --perl-regexp ".*\.cabal\.golden$$" \ | ||
| xargs --no-run-if-empty --max-args=1 --verbose rm | ||
|
||
.PHONY: delete-json-golden | ||
delete-json-golden: | ||
cd test-suite-golden \ | ||
&& find -type f \ | ||
| grep --perl-regexp ".*\.json\.golden$$" \ | ||
| xargs --no-run-if-empty --max-args=1 --verbose rm | ||
|
||
.PHONY: delete-yaml-golden | ||
delete-yaml-golden: | ||
cd test-suite-golden \ | ||
&& find -type f \ | ||
| grep --perl-regexp ".*\.yaml\.golden$$" \ | ||
| xargs --no-run-if-empty --max-args=1 --verbose rm | ||
|
||
.PHONY: delete-generated | ||
.PHONY: delete-generated-cabal | ||
.PHONY: delete-generated-json | ||
.PHONY: delete-generated-yaml | ||
delete-generated: \ | ||
delete-generated-cabal \ | ||
delete-generated-json \ | ||
delete-generated-yaml | ||
|
||
delete-generated-cabal: | ||
cd test-suite-golden \ | ||
&& find -type f \ | ||
| grep --perl-regexp ".*(?<!\.yaml)\.cabal$$" \ | ||
| xargs --no-run-if-empty --max-args=1 --verbose rm | ||
|
||
delete-generated-json: | ||
cd test-suite-golden \ | ||
&& find -type f \ | ||
| grep --perl-regexp ".*\.json$$" \ | ||
| xargs --no-run-if-empty --max-args=1 --verbose rm | ||
|
||
delete-generated-yaml: | ||
cd test-suite-golden \ | ||
&& find -type f \ | ||
| grep --perl-regexp ".*(?<!package)\.yaml$$" \ | ||
| xargs --no-run-if-empty --max-args=1 --verbose rm | ||
|
||
KY := test-suite-golden/test-files/key | ||
RW := test-suite-golden/test-files/real-world | ||
|
||
.PHONY: generate-cabal | ||
generate-cabal: \ | ||
$(KY)/empty-inferred/empty-inferred.cabal \ | ||
$(KY)/empty-package.cabal \ | ||
$(KY)/with-GHC2021.cabal \ | ||
$(KY)/when-dependencies.cabal \ | ||
$(KY)/import-relative/import-relative.cabal \ | ||
$(KY)/import-local/import-local.cabal \ | ||
$(KY)/empty-inferred/empty-inferred.cabal \ | ||
$(RW)/stack/stack.cabal \ | ||
$(RW)/hpack/hpack.cabal | ||
|
||
$(KY)/empty-package.cabal: | ||
dhall-hpack-cabal --package-dhall=$(@:.cabal=.dhall) | ||
|
||
$(KY)/when-dependencies.cabal: | ||
dhall-hpack-cabal --package-dhall=$(@:.cabal=.dhall) | ||
|
||
$(KY)/with-GHC2021.cabal: | ||
dhall-hpack-cabal --package-dhall=$(@:.cabal=.dhall) | ||
|
||
$(KY)/%.cabal: | ||
cd $(@D) && dhall-hpack-cabal | ||
|
||
$(RW)/%.cabal: | ||
dhall-hpack-cabal --package-dhall=$(@:.cabal=.dhall) | ||
|
||
.PHONY: generate-json | ||
generate-json: \ | ||
$(KY)/empty-inferred/package.json \ | ||
$(KY)/empty-package.json \ | ||
$(KY)/with-GHC2021.json \ | ||
$(KY)/when-dependencies.json \ | ||
$(KY)/import-relative/package.json \ | ||
$(KY)/import-local/package.json \ | ||
$(KY)/empty-inferred/package.json \ | ||
$(RW)/stack/stack.json \ | ||
$(RW)/hpack/hpack.json | ||
|
||
$(KY)/empty-package.json: | ||
dhall-hpack-json --package-dhall=$(@:.json=.dhall) > $@ | ||
|
||
$(KY)/when-dependencies.json: | ||
dhall-hpack-json --package-dhall=$(@:.json=.dhall) > $@ | ||
|
||
$(KY)/with-GHC2021.json: | ||
dhall-hpack-json --package-dhall=$(@:.json=.dhall) > $@ | ||
|
||
$(KY)/%/package.json: | ||
cd $(@D) && dhall-hpack-json > $(@F) | ||
|
||
$(RW)/%.json: | ||
dhall-hpack-json --package-dhall=$(@:.json=.dhall) > $@ | ||
|
||
.PHONY: generate-yaml | ||
generate-yaml: \ | ||
$(KY)/empty-inferred/package.yaml \ | ||
$(KY)/empty-package.yaml \ | ||
$(KY)/with-GHC2021.yaml \ | ||
$(KY)/when-dependencies.yaml \ | ||
$(KY)/import-relative/package.yaml \ | ||
$(KY)/import-local/package.yaml \ | ||
$(KY)/empty-inferred/package.yaml \ | ||
$(RW)/stack/stack.yaml \ | ||
$(RW)/hpack/hpack.yaml | ||
|
||
$(KY)/empty-package.yaml: | ||
dhall-hpack-yaml --package-dhall=$(@:.yaml=.dhall) > $@ | ||
|
||
$(KY)/when-dependencies.yaml: | ||
dhall-hpack-yaml --package-dhall=$(@:.yaml=.dhall) > $@ | ||
|
||
$(KY)/with-GHC2021.yaml: | ||
dhall-hpack-yaml --package-dhall=$(@:.yaml=.dhall) > $@ | ||
|
||
$(KY)/%/package.yaml: | ||
cd $(@D) && dhall-hpack-yaml > $(@F) | ||
|
||
$(RW)/%.yaml: | ||
dhall-hpack-yaml --package-dhall=$(@:.yaml=.dhall) > $@ |
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ cabal-version: 1.12 | |
-- see: https://github.com/sol/hpack | ||
|
||
name: hpack-dhall | ||
version: 0.5.7 | ||
version: 0.5.8 | ||
synopsis: hpack's dhalling | ||
description: Use hpack phrasing in dhall to write cabal files. | ||
. | ||
|
@@ -22,7 +22,7 @@ category: Development | |
homepage: https://github.com/cabalism/hpack-dhall#readme | ||
bug-reports: https://github.com/cabalism/hpack-dhall/issues | ||
maintainer: Phil de Joux <[email protected]> | ||
copyright: © 2018 - 2022 Phil de Joux, © 2018 - 2022 Block Scope Limited | ||
copyright: © 2018 - 2024 Phil de Joux, © 2018 - 2024 Block Scope Limited | ||
license: BSD3 | ||
license-file: LICENSE | ||
build-type: Simple | ||
|
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 |
---|---|---|
|
@@ -18,10 +18,10 @@ let deps = | |
in let exe-deps = [ "optparse-applicative" ] | ||
|
||
in { name = "hpack-dhall" | ||
, version = "0.5.7" | ||
, version = "0.5.8" | ||
, maintainer = "Phil de Joux <[email protected]>" | ||
, copyright = | ||
"© 2018 - 2022 Phil de Joux, © 2018 - 2022 Block Scope Limited" | ||
"© 2018 - 2024 Phil de Joux, © 2018 - 2024 Block Scope Limited" | ||
, license = "BSD3" | ||
, license-file = "LICENSE" | ||
, category = "Development" | ||
|
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
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
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
4 changes: 1 addition & 3 deletions
4
test-suite-golden/test-files/key/empty-inferred/empty-inferred.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
4 changes: 1 addition & 3 deletions
4
test-suite-golden/test-files/key/empty-inferred/empty-inferred.cabal.golden
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
2 changes: 1 addition & 1 deletion
2
test-suite-golden/test-files/key/empty-inferred/package.json.golden
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 |
---|---|---|
@@ -1 +1 @@ | ||
{} | ||
{} |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
{} | ||
|
2 changes: 1 addition & 1 deletion
2
test-suite-golden/test-files/key/empty-inferred/package.yaml.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
1 change: 1 addition & 0 deletions
1
test-suite-golden/test-files/key/empty-inferred/package.yaml.golden
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
{} | ||
|
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
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
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"name": "empty-package" | ||
} | ||
} |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
name: empty-package | ||
|
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
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
name: empty-package | ||
|
4 changes: 1 addition & 3 deletions
4
test-suite-golden/test-files/key/import-local/import-local.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
4 changes: 1 addition & 3 deletions
4
test-suite-golden/test-files/key/import-local/import-local.cabal.golden
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
2 changes: 1 addition & 1 deletion
2
test-suite-golden/test-files/key/import-local/package.json.golden
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"name": "import-local" | ||
} | ||
} |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
name: import-local | ||
|
2 changes: 1 addition & 1 deletion
2
test-suite-golden/test-files/key/import-local/package.yaml.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
1 change: 1 addition & 0 deletions
1
test-suite-golden/test-files/key/import-local/package.yaml.golden
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
name: import-local | ||
|
Oops, something went wrong.