-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow specifying a stack.yaml for stack configurations (#230)
* allow specifying a stack.yaml for stack configurations * fix test cases * add test cases for stack with custom yaml * add parser test cases * whitespace * change suggestive name * fix test cases (again) * add missing files to distribution * fix typo * default settings for configurations * add warning about multiple stackYamls * review fixes * [ci skip] document changes to cabal configurations * Use suggested changes Co-authored-by: fendor <fendor@users.noreply.github.com>
1 parent
0f823f9
commit 0ed7604
Showing
24 changed files
with
402 additions
and
84 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
dist/ | ||
dist-newstyle/ | ||
.stack-work/ | ||
stack.yaml | ||
stack.yaml.lock | ||
tests/projects/**/stack*.yaml | ||
tests/projects/**/stack*.yaml.lock | ||
cabal.project.local* | ||
.vscode/ |
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
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
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,12 @@ | ||
cradle: | ||
cabal: | ||
components: | ||
- path: "./src" | ||
component: "lib:hie-bios" | ||
- path: "./" | ||
component: "lib:hie-bios" | ||
components: | ||
- path: "./src" | ||
component: "exe:hie-bios" | ||
- path: "./" | ||
component: "exe:hie-bios" |
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 @@ | ||
cradle: | ||
stack: | ||
stackYaml: "stack-8.8.3.yaml" | ||
components: | ||
- path: "./src" | ||
component: "lib:hie-bios" | ||
- path: "./vendor" | ||
component: "parser-tests" |
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,4 @@ | ||
cradle: | ||
stack: | ||
stackYaml: "stack-8.8.3.yaml" | ||
component: "hie-bios:hie" |
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,3 @@ | ||
cradle: | ||
stack: | ||
stackYaml: "stack-8.8.3.yaml" |
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,2 @@ | ||
import Distribution.Simple | ||
main = defaultMain |
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,12 @@ | ||
cabal-version: >=2.0 | ||
name: appA | ||
version: 0.1.0.0 | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: Lib | ||
-- other-modules: | ||
-- other-extensions: | ||
build-depends: base >=4.10 && < 5, filepath | ||
hs-source-dirs: src | ||
default-language: Haskell2010 |
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 @@ | ||
module Lib where |
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,2 @@ | ||
import Distribution.Simple | ||
main = defaultMain |
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,12 @@ | ||
cabal-version: >=2.0 | ||
name: appB | ||
version: 0.1.0.0 | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: Lib | ||
-- other-modules: | ||
-- other-extensions: | ||
build-depends: base >=4.10 && < 5, filepath | ||
hs-source-dirs: src | ||
default-language: Haskell2010 |
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 @@ | ||
module Lib where |
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,16 @@ | ||
cradle: | ||
multi: | ||
- path: "appA" | ||
config: | ||
cradle: | ||
stack: | ||
- path: appA/src | ||
component: appA:lib | ||
stackYaml: stack-alt.yaml | ||
- path: "appB" | ||
config: | ||
cradle: | ||
stack: | ||
- path: appB/src | ||
component: appB:lib | ||
stackYaml: stack-alt.yaml |
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,2 @@ | ||
import Distribution.Simple | ||
main = defaultMain |
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,4 @@ | ||
|
||
import System.Directory (getCurrentDirectory) | ||
|
||
main = return () |
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 @@ | ||
cradle: | ||
stack: | ||
stackYaml: "stack-alt.yaml" | ||
components: | ||
- path: ./src | ||
component: "stack-with-yaml:lib" | ||
|
||
- path: ./app | ||
component: "stack-with-yaml:exe:stack-with-yaml" |
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,5 @@ | ||
module Lib where | ||
|
||
import System.FilePath ((</>)) | ||
|
||
foo = "test" </> "me" |
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,23 @@ | ||
cabal-version: >=2.0 | ||
name: stack-with-yaml | ||
version: 0.1.0.0 | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: Lib | ||
-- other-modules: | ||
-- other-extensions: | ||
build-depends: base >=4.10 && < 5, filepath | ||
hs-source-dirs: src | ||
default-language: Haskell2010 | ||
|
||
|
||
|
||
executable stack-with-yaml | ||
main-is: app/Main.hs | ||
-- other-modules: | ||
-- other-extensions: | ||
build-depends: base >=4.10 && < 5, directory | ||
-- hs-source-dirs: | ||
default-language: Haskell2010 | ||
ghc-options: +RTS -A1m -N -RTS -Wall |