on master help sign in
Merge pull request #629 from maxsnew/cabal

Fix Build Issues

commit0cd3ea1368b25b1e7c8f9f7223dec3d77196774c authorEvan Czaplicki <info@elm-lang.org> dateMon 12 May 2014, 16:14 (12 years ago) parenta38e0c1b3ef1b2
3 files changed+43−8
.travis.yml+31−3 Elm.cabal+8−4 compiler/Build/Dependencies.hs+4−1
.travis.yml+31−3
@@ -1,3 +1,31 @@
1−language: haskell
2−ghc:
3− - 7.6
1+# Based on https://github.com/hvr/multi-ghc-travis and https://github.com/ekmett/lens/blob/master/.travis.yml
2+
3+# NB: don't set `language: haskell` here
4+
5+# The following enables several GHC versions to be tested; often it's enough to test only against the last release in a major GHC version. Feel free to omit lines listings versions you don't need/want testing for.
6+env:
7+ - GHCVER=7.6.3
8+ - GHCVER=7.8.2
9+
10+# Note: the distinction between `before_install` and `install` is not important.
11+before_install:
12+ - travis_retry sudo add-apt-repository -y ppa:hvr/ghc
13+ - travis_retry sudo apt-get update
14+ - travis_retry sudo apt-get install cabal-install-1.18 ghc-$GHCVER happy alex # see note about happy/alex
15+ - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.18/bin:$PATH
16+ - cabal update
17+ # Update happy when building with GHC 7.8 or head
18+ - |
19+ if [ $GHCVER = "head" ] || [ $GHCVER = "7.8.2" ]; then
20+ cabal install happy alex
21+ export PATH=$HOME/.cabal/bin:$PATH
22+ fi
23+
24+install:
25+ - cabal install --only-dependencies --enable-tests --enable-benchmarks
26+
27+# Here starts the actual work to be performed for the package under test; any command which exits with a non-zero exit code causes the build to fail.
28+script:
29+ - cabal configure --enable-tests
30+ - cabal build
31+ - cabal test
Elm.cabal+8−4
@@ -115,7 +115,8 @@ Library
115115 text,
116116 transformers >= 0.2,
117117 union-find,
118− unordered-containers
118+ unordered-containers,
119+ yaml
119120
120121Executable elm
121122 Main-is: Compiler.hs
@@ -199,7 +200,8 @@ Executable elm
199200 text,
200201 transformers >= 0.2,
201202 union-find,
202− unordered-containers
203+ unordered-containers,
204+ yaml
203205
204206Executable elm-doc
205207 Main-is: Docs.hs
@@ -239,7 +241,8 @@ Executable elm-doc
239241 parsec >= 3.1.1,
240242 pretty,
241243 text,
242− union-find
244+ union-find,
245+ yaml
243246
244247Test-Suite compiler-tests
245248 Type: exitcode-stdio-1.0
@@ -279,7 +282,8 @@ Test-Suite compiler-tests
279282 text,
280283 transformers >= 0.2,
281284 union-find,
282− unordered-containers
285+ unordered-containers,
286+ yaml
283287
284288Test-Suite library-tests
285289 Type: exitcode-stdio-1.0
compiler/Build/Dependencies.hs+4−1
@@ -62,7 +62,10 @@ getDependencies =
6262
6363nativeFiles :: [FilePath] -> ErrorT String IO [FilePath]
6464nativeFiles directories =
65− concat `fmap` mapM getNativeFiles directories
65+ do exists <- liftIO $ doesFileExist Path.dependencyFile
66+ if not exists
67+ then return []
68+ else concat `fmap` mapM getNativeFiles directories
6669 where
6770 getNativeFiles dir =
6871 Deps.withDeps (dir </> Path.dependencyFile) $ \deps ->