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

Casing of extra-source-files in Cabal-hooks #10738

Open
philderbeast opened this issue Jan 12, 2025 · 0 comments · May be fixed by #10740
Open

Casing of extra-source-files in Cabal-hooks #10738

philderbeast opened this issue Jan 12, 2025 · 0 comments · May be fixed by #10740

Comments

@philderbeast
Copy link
Collaborator

#10716 changed the case of files included in Cabal-hooks but didn't change those in the .cabal file.

extra-source-files:
readme.md changelog.md

Could we please add a cabal install cabal-install:exe:cabal --dry-run CI check to catch this before fixing it? We have .github/workflows/check-sdist.yml but this does less, creating a cabal sdist cabal-install and then installing that.

$ git checkout d165dfda4361a7c1c51b6e7869ffcb2c0311b6d0
...
HEAD is now at d165dfda4 Bump hlint warning counts

$ ~/.ghcup/bin/cabal-3.12.1.0 install cabal-install:exe:cabal --dry-run
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-3.15.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-described-3.15.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-syntax-3.15.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-hooks-3.16.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/cabal-install-3.15.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/cabal-install-solver-3.15.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/buildinfo-reference-generator-0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-QuickCheck-3.15.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-tests-3.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-tree-diff-3.15.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/cabal-validate-1.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/cabal-testsuite-3.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/cabal-benchmarks-3.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/solver-benchmarks-3.tar.gz
Resolving dependencies...
Build profile: -w ghc-9.10.1 -O1
In order, the following would be built (use -v for more details):
 - Cabal-syntax-3.15.0.0 (lib) (requires build)
 - hackage-security-0.6.2.6 (lib) (requires build)
 - Cabal-3.15.0.0 (lib) (requires build)
 - cabal-install-solver-3.15.0.0 (lib) (requires build)
 - cabal-install-3.15.0.0 (lib) (requires build)
 - cabal-install-3.15.0.0 (exe:cabal) (requires build)
$  git checkout 1c7243f612f95eb9de2914f719ca2a7b2005c323
...
HEAD is now at 1c7243f61 Merge pull request #10716 from jimbob88/fix-cabal-hooks-readme

$~/.ghcup/bin/cabal-3.12.1.0 install cabal-install:exe:cabal --dry-run
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-3.15.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-described-3.15.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-syntax-3.15.0.0.tar.gz
Error: [Cabal-6661]
filepath wildcard 'readme.md' does not match any files.

Making a dry run at the fix:

$ git diff
diff --git a/Cabal-hooks/Cabal-hooks.cabal b/Cabal-hooks/Cabal-hooks.cabal
index 6b41d1f00..5490807fb 100644
--- a/Cabal-hooks/Cabal-hooks.cabal
+++ b/Cabal-hooks/Cabal-hooks.cabal
@@ -15,7 +15,7 @@ category:       Distribution
 build-type:     Simple
 
 extra-source-files:
-  readme.md changelog.md
+  README.md CHANGELOG.md
 
 source-repository head
   type:     git
$ ~/.ghcup/bin/cabal-3.12.1.0 install cabal-install:exe:cabal --dry-run
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-3.15.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-described-3.15.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-syntax-3.15.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-hooks-3.16.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/cabal-install-3.15.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/cabal-install-solver-3.15.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/buildinfo-reference-generator-0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-QuickCheck-3.15.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-tests-3.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/Cabal-tree-diff-3.15.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/cabal-validate-1.0.0.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/cabal-testsuite-3.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/cabal-benchmarks-3.tar.gz
Wrote tarball sdist to
/home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/sdist/solver-benchmarks-3.tar.gz
Resolving dependencies...
Build profile: -w ghc-9.10.1 -O1
In order, the following would be built (use -v for more details):
 - Cabal-syntax-3.15.0.0 (lib) (requires build)
 - hackage-security-0.6.2.6 (lib) (requires build)
 - Cabal-3.15.0.0 (lib) (requires build)
 - cabal-install-solver-3.15.0.0 (lib) (requires build)
 - cabal-install-3.15.0.0 (lib) (requires build)
 - cabal-install-3.15.0.0 (exe:cabal) (requires build)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant