typelead / etlas

Etlas, the build tool and package manager for the Eta programming language
63 stars 10 forks source link

etlas configure doesn't persist libdir, datadir, docdir, etc. #62

Open puffnfresh opened 6 years ago

puffnfresh commented 6 years ago

I've never used new-configure or new-build so I'm not sure if this is intended behaviour from the Cabal side. I'm trying to set a lot of the installation directories at configure time:

etlas configure \
   --libdir="$out/lib" \
   --datadir="$data/share/${hpkgs.eta.name}" \
   --docdir="$doc/share/doc/${pname}-${version}" \
   --allow-boot-library-installs

The only setting which is persisted in cabal.project.local is allow-boot-library-installs.

rahulmutt commented 6 years ago

I'll check this out. new-configure has been rather experimental and I think they recently merged changes that should fix this.

puffnfresh commented 6 years ago

@rahulmutt thanks, my workaround at the moment is to supply the flags for each command but means things get reconfigured (with the same flags) and thus rebuilt on eta build and eta install :crying_cat_face:

rahulmutt commented 6 years ago

@puffnfresh You can create a cabal.project file in the script that supplies the equivalent fields in the file. No need to run etlas configure then.

puffnfresh commented 6 years ago

@rahulmutt it doesn't use configuration from that. For example, if I set store-dir in cabal.project, it still tries to use the default value instead.

rahulmutt commented 6 years ago

@puffnfresh That's definitely a bug. I recall setting store-dir in a cabal.project on Windows to avoid the path limit and it worked as intended.

puffnfresh commented 6 years ago

I think the problem is actually that I'm passing allow-boot-library-installs to etlas build and etlas install, which doesn't work for configure because it's a build/install flag. When I pass it to install, it reconfigures.