
Hi, I have few more questions, I couldn't find answer on my own, even if they mostly seem silly :-) If there's resolutions requiring coding, I'll try to follow up with patches. * Are extended fields going to be part of public interface (HEAD Cabal doesn't warn for fields starting "x-")? * Could we document what's allowed format/character set for file specified by license-file? (cabal2wix needs to make rtf from the text to show it during install - I'd like to know if that's going to be sensibly possible.) * Is ghc-pkg supposed to handle license-file field? GHC documents it, referring to Cabal docs, but Cabal doesn't generate it for installed-pkg-config. (Maybe because license file is not installed?) * Are defaultMain-helpers supposed to turn relative paths from commandline into absolute ones? (I ran into this problem with Alex' Setup.lhs, which changes working directory for copying files.) Best regards, Esa

On Sat, 2007-08-11 at 16:05 +0300, Esa Ilari Vuokko wrote:
Hi,
I have few more questions, I couldn't find answer on my own, even if they mostly seem silly :-) If there's resolutions requiring coding, I'll try to follow up with patches.
* Are extended fields going to be part of public interface (HEAD Cabal doesn't warn for fields starting "x-")?
They probably should be, just as a [(Name, Value)] style format.
* Could we document what's allowed format/character set for file specified by license-file? (cabal2wix needs to make rtf from the text to show it during install - I'd like to know if that's going to be sensibly possible.)
We should say that .cabal files and the license file are UTF8. But then we need to make that true too ;-)
* Is ghc-pkg supposed to handle license-file field? GHC documents it, referring to Cabal docs, but Cabal doesn't generate it for installed-pkg-config. (Maybe because license file is not installed?)
No idea. It looks like it does not contain the license file in the InstalledPackageInfo which is the structure ghc-pkg uses. Do you think we really need that? We can install the license file even without ghc-pkg knowing about it.
* Are defaultMain-helpers supposed to turn relative paths from commandline into absolute ones? (I ran into this problem with Alex' Setup.lhs, which changes working directory for copying files.)
No idea. Can you be more specific? Duncan

On 8/12/07, Duncan Coutts
On Sat, 2007-08-11 at 16:05 +0300, Esa Ilari Vuokko wrote:
* Are extended fields going to be part of public interface (HEAD Cabal doesn't warn for fields starting "x-")?
They probably should be, just as a [(Name, Value)] style format.
Cool.
* Could we document what's allowed format/character set for file specified by license-file? (cabal2wix needs to make rtf from the text to show it during install - I'd like to know if that's going to be sensibly possible.)
We should say that .cabal files and the license file are UTF8. But then we need to make that true too ;-)
Hehe. Maybe I'll go utf-8 and fallback on wierd stuff to...Windows stuff.
* Is ghc-pkg supposed to handle license-file field? GHC documents it, referring to Cabal docs, but Cabal doesn't generate it for installed-pkg-config. (Maybe because license file is not installed?)
No idea. It looks like it does not contain the license file in the InstalledPackageInfo which is the structure ghc-pkg uses.
Do you think we really need that? We can install the license file even without ghc-pkg knowing about it.
In theory, I'd love to have it - it would make it easy to make installers for programs, and add all licenses into the installer. Might be great quick start for open source programs, at least. But it's certainly not a big deal.
* Are defaultMain-helpers supposed to turn relative paths from commandline into absolute ones? (I ran into this problem with Alex' Setup.lhs, which changes working directory for copying files.)
No idea. Can you be more specific?
Running following in alex source directory setup copy --destdir=dist\cabal2wix causes alex's setup hooks copy files in template\ directory to template\dist\cabal2wix\$datadir, because dist\cabal2wix is assumed to be absolute, and hook changes the working directory into template\. Thanks, Esa

On Sun, 2007-08-12 at 18:15 +0300, Esa Ilari Vuokko wrote:
* Are defaultMain-helpers supposed to turn relative paths from commandline into absolute ones? (I ran into this problem with Alex' Setup.lhs, which changes working directory for copying files.)
No idea. Can you be more specific?
Running following in alex source directory
setup copy --destdir=dist\cabal2wix
causes alex's setup hooks copy files in template\ directory to template\dist\cabal2wix\$datadir, because dist\cabal2wix is assumed to be absolute, and hook changes the working directory into template\.
Sounds like the hook should not change the working directory. eg instead of: install pkg_descr lbi copy_dest = excursion "templates" $ do let dataDir = mkDataDir pkg_descr lbi copy_dest createDirectoryIfMissing True dataDir sequence [ copyFile f (dataDir ++ '/':f) | (f,_) <- all_templates ] it should stay in the same dir and just prefix "templates/": install pkg_descr lbi copy_dest = do let dataDir = mkDataDir pkg_descr lbi copy_dest createDirectoryIfMissing True dataDir sequence [ copyFile ("templates" > f) (dataDir > f) | (f,_) <- all_templates ] Duncan
participants (2)
-
Duncan Coutts
-
Esa Ilari Vuokko