-
Notifications
You must be signed in to change notification settings - Fork 710
Allow build-type Configure to work with Components #10966
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
Open
angerman
wants to merge
1
commit into
haskell:master
Choose a base branch
from
stable-haskell:angerman/fix-4548
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,238
−13
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
49 changes: 49 additions & 0 deletions
49
cabal-testsuite/PackageTests/BuildTypeConfigure/Component/cabal.out
This file contains hidden or 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,49 @@ | ||
# cabal 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: | ||
- test-pkg-0.1.0.0 (lib) (first run) | ||
Configuring library for test-pkg-0.1.0.0... | ||
Preprocessing library for test-pkg-0.1.0.0... | ||
Building library for test-pkg-0.1.0.0... | ||
# cabal v2-build | ||
Configuration is affected by the following files: | ||
- cabal.project | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following will be built: | ||
- test-pkg-0.1.0.0 (exe:exe) (first run) | ||
Configuring executable 'exe' for test-pkg-0.1.0.0... | ||
Preprocessing executable 'exe' for test-pkg-0.1.0.0... | ||
Building executable 'exe' for test-pkg-0.1.0.0... | ||
# cabal v2-run | ||
Configuration is affected by the following files: | ||
- cabal.project | ||
# cabal v2-run | ||
Configuration is affected by the following files: | ||
- cabal.project | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following will be built: | ||
- test-pkg-0.1.0.0 (exe:exe-dep) (first run) | ||
Configuring executable 'exe-dep' for test-pkg-0.1.0.0... | ||
Preprocessing executable 'exe-dep' for test-pkg-0.1.0.0... | ||
Building executable 'exe-dep' for test-pkg-0.1.0.0... | ||
# cabal v2-build | ||
Configuration is affected by the following files: | ||
- cabal.project | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following will be built: | ||
- test-pkg-0.1.0.0 (lib:foo) (first run) | ||
Configuring library 'foo' for test-pkg-0.1.0.0... | ||
Preprocessing library 'foo' for test-pkg-0.1.0.0... | ||
Building library 'foo' for test-pkg-0.1.0.0... | ||
# cabal v2-build | ||
Configuration is affected by the following files: | ||
- cabal.project | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following will be built: | ||
- test-pkg-0.1.0.0 (lib:bar) (first run) | ||
Configuring library 'bar' for test-pkg-0.1.0.0... | ||
Preprocessing library 'bar' for test-pkg-0.1.0.0... | ||
Building library 'bar' for test-pkg-0.1.0.0... |
1 change: 1 addition & 0 deletions
1
cabal-testsuite/PackageTests/BuildTypeConfigure/Component/cabal.project
This file contains hidden or 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 @@ | ||
packages: test-pkg |
21 changes: 21 additions & 0 deletions
21
cabal-testsuite/PackageTests/BuildTypeConfigure/Component/cabal.test.hs
This file contains hidden or 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,21 @@ | ||
import Test.Cabal.Prelude | ||
-- Test build-tool-depends between two packages | ||
main = cabalTest $ do | ||
-- main library, and executable should run configure and generate a | ||
-- buildinfo file. | ||
cabal' "build" ["test-pkg:test-pkg"] >>= | ||
assertOutputContains "config.status: creating test-pkg.buildinfo" | ||
cabal' "v2-build" ["test-pkg:exe"] >>= | ||
assertOutputContains "config.status: creating test-pkg.buildinfo" | ||
-- configure values should not be embeddable in the executable. | ||
cabal' "v2-run" ["test-pkg:exe"] >>= | ||
assertOutputContains "Hi-Exe" | ||
-- configure values should be embeddable in the library. | ||
cabal' "v2-run" ["test-pkg:exe-dep"] >>= | ||
assertOutputContains "Hi-Lib" | ||
-- sublibs should not run configure | ||
cabal' "v2-build" ["test-pkg:lib:foo"] >>= | ||
assertOutputDoesNotContain "config.status: creating test-pkg.buildinfo" | ||
cabal' "v2-build" ["test-pkg:lib:bar"] >>= | ||
assertOutputDoesNotContain "config.status: creating test-pkg.buildinfo" | ||
|
5 changes: 5 additions & 0 deletions
5
cabal-testsuite/PackageTests/BuildTypeConfigure/Component/test-pkg/CHANGELOG.md
This file contains hidden or 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,5 @@ | ||
# Revision history for test-pkg | ||
|
||
## 0.1.0.0 -- YYYY-mm-dd | ||
|
||
* First version. Released on an unsuspecting world. |
29 changes: 29 additions & 0 deletions
29
cabal-testsuite/PackageTests/BuildTypeConfigure/Component/test-pkg/LICENSE
This file contains hidden or 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,29 @@ | ||
Copyright (c) 2025, Moritz Angermann | ||
|
||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials provided | ||
with the distribution. | ||
|
||
* Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.