-
Notifications
You must be signed in to change notification settings - Fork 704
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
Setup.hs copy/install
work when data-files uses **. (#6127)
Treating globs like filenames was always illegitimate, but this code was broken further by the addition of recursive globs. I had a look around for other dubious code along these lines, and it looks like this site is the only problematic one. Fixes #6125.
- Loading branch information
1 parent
ed3ae13
commit 7fec503
Showing
8 changed files
with
44 additions
and
7 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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
main = return () |
1 change: 1 addition & 0 deletions
1
cabal-testsuite/PackageTests/Regression/T6125/data/foo/bar.html
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 @@ | ||
<!DOCTYPE html>Some random data. |
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: 2.4 | ||
name: myprog | ||
version: 0 | ||
data-files: data/**/*.html | ||
|
||
executable myprog | ||
build-depends: base | ||
main-is: Main.hs | ||
default-language: Haskell2010 |
9 changes: 9 additions & 0 deletions
9
cabal-testsuite/PackageTests/Regression/T6125/setup.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,9 @@ | ||
# Setup configure | ||
Resolving dependencies... | ||
Configuring myprog-0... | ||
# Setup build | ||
Preprocessing executable 'myprog' for myprog-0.. | ||
Building executable 'myprog' for myprog-0.. | ||
# Setup copy | ||
Installing executable myprog in <PATH> | ||
Warning: The directory <ROOT>/setup.cabal.dist/usr/bin is not in the system search path. |
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 @@ | ||
# Setup configure | ||
Configuring myprog-0... | ||
# Setup build | ||
Preprocessing executable 'myprog' for myprog-0.. | ||
Building executable 'myprog' for myprog-0.. | ||
# Setup copy | ||
Installing executable myprog in <PATH> | ||
Warning: The directory <ROOT>/setup.dist/usr/bin is not in the system search path. |
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,6 @@ | ||
import Test.Cabal.Prelude | ||
main = setupAndCabalTest $ do | ||
withPackageDb $ do | ||
setup "configure" [] | ||
setup "build" ["myprog"] | ||
setup "copy" ["myprog"] |
7fec503
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that pushing directly to
master
when one adds test should be prohibited.I reverted this commit. Make a PR and make the CI spin.
7fec503
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argh, I reverted my revert. Why there weren't merge commit? It's very confusing.
7fec503
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh. I just pressed the default merge button, which was to squash. If we don't want to allow that, it can be turned off somewhere in the settings. (Maybe it was previously?)
7fec503
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squash is sometimes useful, but merge should be the default. I think GitHub remembers the last type of merge action you used.