building a project with new-* commands

Ramakrishnan Muthukrishnan ram at rkrishnan.org
Fri Sep 16 12:34:14 UTC 2016


Hi Lennart,

Thanks for the email. Sorry, I wrongly wrote the path "dist" when I
meant "dist-newstyle". When I created a fresh project, just doing `cabal
new-build' created a binary. Here is what I get in my blog directory.

ram at knuth:~/src/newblog$ cabal new-configure
Resolving dependencies...
In order, the following would be built (use -v for more details):
zip-archive-0.3.0.5
pandoc-1.17.2
pandoc-citeproc-0.10.1
hakyll-4.8.3.2
rkrishnan-0.0.1
ram at knuth:~/src/newblog$ cabal new-build .
In order, the following will be built (use -v for more details):
zip-archive-0.3.0.5
pandoc-1.17.2
pandoc-citeproc-0.10.1
hakyll-4.8.3.2
rkrishnan-0.0.1
Configuring zip-archive-0.3.0.5...
ram at knuth:~/src/newblog$ ls dist-newstyle/build/
ram at knuth:~/src/newblog$ cd ..
ram at knuth:~/src$ cabal new-build ./new-blog/
BadPackageLocations [BadLocGlobEmptyMatch "./*.cabal"]

I will try building and trying the `master' branch. Thanks again.

Cheers
Ramakrishnan


On Fri, Sep 16, 2016, at 05:53 PM, lennart spitzner wrote:
> The build artefacts of new-* are placed in a "dist-newstyle" directory.
> 
> Another common mistake with 1.24.0.0 is that `cabal new-build` won't
> do much at all if run in some parent directory. You might need to
> `cabal new-build ./my-blog/` and then get the artefacts somewhere
> (burried) in ./my-blog/dist-newstyle/...
> 
> (I believe there is some improvement regarding behaviour in the parent
> directory in master already; certainly was planned.)
> 
> Hope that helps.
> 
> -- lennart
> 
> 
> On 16/09/16 13:40, Ramakrishnan Muthukrishnan wrote:
> > I have a fairly simple hakyll based blog website that I usually build
> > with cabal sandbox.
> > 
> > Today I tried the new-configure/new-build commands. It built a bunch of
> > dependencies but the dist/build directory is empty. It doesn't look like
> > it built the project itself. Subsequent builds are fast as expected. But
> > I still don't see anything in dist/build directory. Am I missing
> > something or doing something silly? Not sure if this is the right list
> > to discuss "user" issues as this is a "devel" list.
> > 
> > I created a new project with `cabal init' and built it with the new
> > style commands and it produced an executable in the expected place.
> > 
> > The cabal-install/Cabal version I am running is 1.24.0.0 (for both) with
> > GHC 8.0.1 on Debian GNU/Linux x86-64.
> > 
> > Thanks
> > 
> 


-- 
  Ramakrishnan


More information about the cabal-devel mailing list