
I would like to make a Cabal release Real Soon Now, version 1.0.2. There are always more changes that would be good to get in, but we have to release sometime. This is just a minor release, and it's not being released with a compiler like the 1.0 release, so it doesn't need to be "perfect". We haven't exactly been releasing early and often, but in that spirit, let's get the many changes since 1.0 out into the wild. Here's a summary from the changelog: * Handles recursive modules for GHC 6.2 and GHC 6.4. * Added "setup test" command (Used with UserHook) * implemented handling of _stub.{c,h,o} files * Added support for profiling * Changed install prefix of libraries (pref/pkgname-version to prefix/pkgname-version/compname-version) * Added pattern guards as a language extension * Moved some functionality to Language.Haskell.Extension * Register / unregister .bat files for windows * Exposed more of the API * Added support for the hide-all-packages flag in GHC > 6.4 * Several bug fixes Oh, and though it's not a big change from Cabal's perspective, there are some changes that are necessary to get Hackage out the door. Does anyone know of any: - critical bugs that we shouldn't release without fixing - interface changes that are so horrible that we shouldn't release without fixing them I'm a bit concerned about the different release cycles that Cabal and the compilers will be following, but I think that if we are careful with version numbers we'll be OK :) peace, isaac

Isaac Jones
I would like to make a Cabal release Real Soon Now, version 1.0.2.
Incidentally, I note that the webpages at http://haskell.org/cabal/ seem to predate even the current release 1.0. Is there a more up-to-date source of information about Cabal somewhere? Specific problems with the webpages: * latest release is 0.5, dated 19th February * changelog indicates no activity since Feb * the link to Hackage is broken * I was hoping to find a darcs repository Regards, Malcolm

Malcolm Wallace
Specific problems with the webpages: * latest release is 0.5, dated 19th February
Hm... Seems that I never put the 1.0 tarball up on the web page. I'll do that asap. 0.5 is really very similar, and the user's guide is up to date.
* changelog indicates no activity since Feb * the link to Hackage is broken * I was hoping to find a darcs repository
The latest snapshot and darcs repo are in the "code" section. peace, isaac

I've updated the web page to have 1.0 (as Malcolm requested), and added 1.1.1, which is a "release candidate" for 1.2. Please forgive me for going insane with the version numbers. I'd appreciate it if early adopter types try out 1.1.1. In particular, check out the README wrt installing alongside-of or instead-of 1.0 with ghc 6.4. BTW, if anyone loves to manage releases and would like to relieve me of this duty so I can spend my time fixing bugs and adding features, just let me know ;) peace, isaac --------------------------------------------------------------- The Haskell Cabal The Common Architecture for Building Applications and Libraries. http://www.haskell.org/cabal IMPORTANT INFORMATION: See both the README file and the changelog for important interface changes and installation instructions. DOWNLOAD: The Haskell Cabal has reached version 1.1.1. This pre-release has a number of new features including a hook for testing, support for profiling, and support for _stub files, as well as several bug fixes. Download the Cabal here (source and debian versions available): http://www.haskell.org/cabal/download.html BUGS: Please report bugs and wish-list items to libraries@haskell.org and Isaac Jones: ijones@syntaxpolice.org. ABOUT: The Haskell Cabal is meant to be a part of a larger infrastructure for distributing, organizing, and cataloging Haskell Libraries and Tools. It is an effort to provide a framework for developers to more effectively contribute their software to the Haskell community. Specifically, the Cabal describes what a Haskell package is, how these packages interact with the language, and what Haskell implementations must to do to support packages. The Cabal also specifies some infrastructure (code) that makes it easy for tool authors to build and distribute conforming packages. The Cabal is only one contribution to the larger goal. In particular, the Cabal says nothing about more global issues such as how authors decide where in the module name space their library should live; how users can find a package they want; how orphan packages find new owners; and so on. NOTES: You cannot currently execute most setup scripts with "./Setup.lhs" since most systems do not have a runHaskell executable installed. You can compile it with ghc thusly: "ghc -package Cabal Setup.lhs -o setup" and then use the "setup" executable after that. This release is meant to provide the community with concrete information about how the interfaces are shaping up. This release does NOT fix the interfaces, we can't promise not to break anything that relies on these interfaces. We hope that Haskell authors will try to package their software using these tools, and let us know where they fall short. MORE INFORMATION: Please see the web site for the source code, interfaces, and especially the proposal, which will serve as documentation for this release: http://www.haskell.org/cabal/

On 7/14/05, Isaac Jones
I've updated the web page to have 1.0 (as Malcolm requested), and added 1.1.1, which is a "release candidate" for 1.2. Please forgive me for going insane with the version numbers.
I'd appreciate it if early adopter types try out 1.1.1. In particular, check out the README wrt installing alongside-of or instead-of 1.0 with ghc 6.4.
BTW, if anyone loves to manage releases and would like to relieve me of this duty so I can spend my time fixing bugs and adding features, just let me know ;)
I don't want to be a release manager (who does :). However, I noticed that Cabal doesn't seem to get tested much in Windows* so I can volunteer to be the semi-official tester for Windows. However, I would like to know what versions of GHC, NHC, and Hugs you want to support for the Cabal 1.2 release on Windows. (I don't normally use NHC at all but I'm not opposed to doing some basic tests with it). In particular, can we just skip support for GHC 6.4? The installation instructions for GHC 6.4 are workable, but it looks like the GHC 6.4.1 experience will be much better. Plus, I think that the package management changes between GHC 6.4.0 and 6.4.1 will cause problems for people packaging their stuff using Cabal. So, could we just say that Cabal 1.2 requires GHC 6.2.2 or GHC 6.4.1 or later? * The new call to SHGetFolderPath does not get linked correctly, causing Cabal 1.1.1 to not work once it is installed due to linker failure. At least part of the problem is that The foreign import declaration in Disbribution.Simple.Configure should be: - foreign import stdcall unsafe "SHGetFolderPath" + foreign import stdcall unsafe "SHGetFolderPathA" or - foreign import stdcall unsafe "SHGetFolderPath" +foreign import stdcall unsafe "SHGetFolderPathW" depending on whether or not you are expecting ANSI or Unicode results. You probably want the Unicode version because the "Program Files" folder can contain Arabic, Japanese, etc. characters that ANSI can't represent. * On GHC 6.4, trying to install Cabal 1.1.1 using Cabal 1.0 fails due to the bug in Cabal 1.0's "copy" command that I reported last month (which is fixed in Cabal 1.1.1). The workaround is to delete the "Executable: cabal-setup" stanza from Cabal.cabal. I believe that this executable is useless anyway. * In Distribution.Preprocess, there are two places where you have this: #if __HUGS__ && mingw32_TARGET_OS = rawSystemVerbose verbose "sh" (cpphs : extraArgs ++ ["-O" ++ outFile, inFile]) #else If I am reading this correctly then it doesn't make sense because you can't assume that all Hugs users on Windows users have a "sh" executable. * It should be possible for Windows users to build Cabal 1.1.1 on both GHC 6.2.2 and GHC 6.4.1 without having GNU make installed. This process needs to be documented. I will wait to send you the docs until I find out if GHC 6.4(.0) will be supported in Cabal 1.2. - Brian

Brian Smith
I don't want to be a release manager (who does :).
No idea... A guy can dream, can't he? Maybe things will be better now that I have a script.
However, I noticed that Cabal doesn't seem to get tested much in Windows* so I can volunteer to be the semi-official tester for Windows.
That's super! I'm CCing Krasimir because he's our Windows go-to guy. Maybe we can get the test suite in better shape for Windows. What happens when you "make check"? Does it all just explode?
However, I would like to know what versions of GHC, NHC, and Hugs you want to support for the Cabal 1.2 release on Windows. (I don't normally use NHC at all but I'm not opposed to doing some basic tests with it).
I would like to support all of the recently released tools. NHC doesn't yet have proper Cabal support; it just comes with Cabal, and the Hugs version is March 2005.
In particular, can we just skip support for GHC 6.4? The installation instructions for GHC 6.4 are workable, but it looks like the GHC 6.4.1 experience will be much better. Plus, I think that the package management changes between GHC 6.4.0 and 6.4.1 will cause problems for people packaging their stuff using Cabal. So, could we just say that Cabal 1.2 requires GHC 6.2.2 or GHC 6.4.1 or later?
I do indeed think that the next version of GHC will be better for installing packages, but I don't think we should give up on 6.4. OTOH, I don't think that it's a huge deal to just document the difficulties. It's really no harder than removing the old Cabal before installing the new one. Maybe we should just force everyone to do that, or make that the default behavior for "make install". That'll probably offend some folks' sensibilities. What do folks here think?
* The new call to SHGetFolderPath does not get linked correctly, causing Cabal 1.1.1 to not work once it is installed due to linker failure. At least part of the problem is that The foreign import declaration in Disbribution.Simple.Configure should be: - foreign import stdcall unsafe "SHGetFolderPath" + foreign import stdcall unsafe "SHGetFolderPathA" or - foreign import stdcall unsafe "SHGetFolderPath" +foreign import stdcall unsafe "SHGetFolderPathW"
depending on whether or not you are expecting ANSI or Unicode results. You probably want the Unicode version because the "Program Files" folder can contain Arabic, Japanese, etc. characters that ANSI can't represent.
I made this change; of course, I can't test it. Can anyone enlighten me as to why this is incorrect? Is this the correct name on some version of some compilers or windows? Do we need more ifdefs to get this exactly right?
* On GHC 6.4, trying to install Cabal 1.1.1 using Cabal 1.0 fails due to the bug in Cabal 1.0's "copy" command that I reported last month (which is fixed in Cabal 1.1.1). The workaround is to delete the "Executable: cabal-setup" stanza from Cabal.cabal. I believe that this executable is useless anyway.
It's not quite useless, but I really haven't decided if it's a good idea. I use it, so I expect others would like to as well. But for now, I'll remove it. I didn't even document it.
* In Distribution.Preprocess, there are two places where you have this: #if __HUGS__ && mingw32_TARGET_OS = rawSystemVerbose verbose "sh" (cpphs : extraArgs ++ ["-O" ++ outFile, inFile]) #else
If I am reading this correctly then it doesn't make sense because you can't assume that all Hugs users on Windows users have a "sh" executable.
Can anyone else comment on this? Why is this like that? Why not just call it the way we call it in Unix?
* It should be possible for Windows users to build Cabal 1.1.1 on both GHC 6.2.2 and GHC 6.4.1 without having GNU make installed. This process needs to be documented. I will wait to send you the docs until I find out if GHC 6.4(.0) will be supported in Cabal 1.2.
Yes, I would like to support it. The only extra steps are those in the "make setup" command, which is just a couple of extra flags to GHC for bootstrapping. A batch file / shell script would actually work just as well. The GNUMakefile is really just a glorified shell script. peace, isaac p.s. these changes are in the darcs repo and on the latest snapshot tarball on the web page, but not yet in the CVS repo. I need to figure out how to move a directory and keep darcs in sync w/ cvs before I can commit there again. Get the snapshot here: http://www.haskell.org/cabal/code.html

On 7/17/05, Isaac Jones
Brian Smith
writes: That's super! I'm CCing Krasimir because he's our Windows go-to guy. Maybe we can get the test suite in better shape for Windows. What happens when you "make check"? Does it all just explode?
Although I normially use MSYS/MinGW, I did all my testing without it because GHC does not require MSYS or MinGW. In other words, I didn't use "make" because Windows doesn't have "make." Instead, I installed Cabal like I would install any other Cabal package (see below).
However, I would like to know what versions of GHC, NHC, and Hugs you want to support for the Cabal 1.2 release on Windows. (I don't normally use NHC at all but I'm not opposed to doing some basic tests with it).
I would like to support all of the recently released tools. NHC doesn't yet have proper Cabal support; it just comes with Cabal, and the Hugs version is March 2005.
Hugs/March 2005 for Windows has not been released yet. I am not sure if it is even in a buildable condition. This means that there is no Cabal-capable Hugs on Windows.
* The new call to SHGetFolderPath does not get linked correctly, causing Cabal 1.1.1 to not work once it is installed due to linker failure. At least part of the problem is that The foreign import declaration in Disbribution.Simple.Configure should be: - foreign import stdcall unsafe "SHGetFolderPath" + foreign import stdcall unsafe "SHGetFolderPathA" or - foreign import stdcall unsafe "SHGetFolderPath" +foreign import stdcall unsafe "SHGetFolderPathW"
depending on whether or not you are expecting ANSI or Unicode results. You probably want the Unicode version because the "Program Files" folder can contain Arabic, Japanese, etc. characters that ANSI can't represent.
I made this change; of course, I can't test it. Can anyone enlighten me as to why this is incorrect? Is this the correct name on some version of some compilers or windows? Do we need more ifdefs to get this exactly right?
In the Windows API, for every function xxx that deals with user-visible strings, there are two versions provided: an ANSI (single-byte characters) version named xxxA and a unicode version (wide characters) named xxxW. There is never a function named just xxx. Rather, the C/C++ header files have something like #ifdef USE_WIDE_CHARS #define xxx xxxW #else #define xxx xxxA #endif I am not an authority on this, but I believe the jist is right. Unfortunately, I don't know enough about low-level Windows programming or the Haskell FFI to give you a patch. I suggest looking in the Win32 package to see how that code deals with it.
* In Distribution.Preprocess, there are two places where you have this: #if __HUGS__ && mingw32_TARGET_OS = rawSystemVerbose verbose "sh" (cpphs : extraArgs ++ ["-O" ++ outFile, inFile]) #else
If I am reading this correctly then it doesn't make sense because you can't assume that all Hugs users on Windows users have a "sh" executable.
Can anyone else comment on this? Why is this like that? Why not just call it the way we call it in Unix?
I assume that this code is attempting to execute a program named "sh" On windows, there is no program named "sh" or "sh.exe" because Windows doesn't have the Bourne shell, just like Windows usually doesn't have GNU Make. Even though the target name is "mingw32_TARGET_OS," you can't assume that the user actually has MinGW/MSYS installed; a more accurate name for the target would be "w32_TARGET_OS". I am not sure why cpphs is not just executed directly (instead of being executed through SH) in this code. But, anyway, it doesn't matter in the short-term as Hugs+Windows+Cabal doesn't exist currently.
* It should be possible for Windows users to build Cabal 1.1.1 on both GHC 6.2.2 and GHC 6.4.1 without having GNU make installed. This process needs to be documented. I will wait to send you the docs until I find out if GHC 6.4(.0) will be supported in Cabal 1.2.
Yes, I would like to support it. The only extra steps are those in the "make setup" command, which is just a couple of extra flags to GHC for bootstrapping. A batch file / shell script would actually work just as well. The GNUMakefile is really just a glorified shell script.
If you put {-# OPTIONS -cpp #-} on all the Cabal source files that need preprocessing, then you can install Cabal 1.1.1 exactly like any other cabal package on GHC >= 6.4. runghc Setup.lhs configure runghc Setup.lhs build runghc Setup.lhs install The only reason that it doesn't work on GHC 6.2.2 is because there is no "runghc" in that version. For GHC 6.2.2 and later, this seems to work: ghc -cpp --make Setup.lhs -o setup setup configure setup build setup install However, it won't work for Hugs unless runhugs has something equivalent to {#- OPTIONS -cpp #-} - Brian

On Sun, Jul 17, 2005 at 12:12:27PM -0500, Brian Smith wrote:
* In Distribution.Preprocess, there are two places where you have this: #if __HUGS__ && mingw32_TARGET_OS = rawSystemVerbose verbose "sh" (cpphs : extraArgs ++ ["-O" ++ outFile, inFile]) #else
If I am reading this correctly then it doesn't make sense because you can't assume that all Hugs users on Windows users have a "sh" executable.
It's intended only for building the fptools libraries as part of the Hugs build, which is expected to take place inside Cygwin or MSYS/MinGW. As you say, it's no use to ordinary users -- something new is needed. On a system built with a compiler, cpphs and hsc2hs will be binaries and can be executed directly, but Hugs doesn't create binaries. Without a compiler, cpphs and hsc2hs will be shell scripts (or BAT files, though Cabal isn't set up for running those either). Any ideas? Another deficiency in Windows+Cabal is the lack of some counterpart of the scheme described in section 2.2 of the user's guide. It would probably suffice in many cases to have fixed variants of the system-specific files for each non-Unix system.

On 7/14/05, Isaac Jones
I'd appreciate it if early adopter types try out 1.1.1. In particular, check out the README wrt installing alongside-of or instead-of 1.0 with ghc 6.4.
(1) The {-# LANGUAGE ... #-} pragma doesn't seem to work (Tested on GHC 6.4, GHC 6.4.1). If it was never implemented then it should be removed from the documentation. Also, I think that this is a very useful feature, but it should be implemented in the Haskell implementations (Hugs, GHC, etc.), not in Cabal. In particular, I want to be able to use {-# LANGUAGE ... #-} in a file loaded directly into GHC(i) and Hugs. (2) When Main-Is is malformed, the error message has a typo: Setup.hs: Main doesn't exists ("exists" should be "exist".) This error message is not very helpful, because in fact module Main does exist. What _doesn't_ exist is a file named "Main". The error message should say: Setup.hs:6: file "Main" does not exist. (Notice I added the line number) See the attached testcases.

The documentation implies that, if I include the field: Hs-Source-Dirs: src in my Cabal package description, then _ONLY_ src will be considered the root source code directory. However, this is not the case. The current working directory is always implicitly part of Hs-Source-Dirs, at least when running with "runghc" or "runhugs." See the included testcase. It looks like this: .cabal file: .... Hs-Source-Dirs: src ... Main-Is: Main.hs files: Hs-Source-Dirs-Test-1.cabal Test1.hs src/Main.hs If the documentation was correct, then the package should fail to build because "Test1.hs" is in "." instead of in "src/". Yet, with both Hugs and GHC, the package builds successfully because they find Test1.hs in "." Yet, let's say I switch the locations of Test1.hs and Main.hs: Hs-Source-Dirs: src Main-Is: Main.hs files: Hs-Source-Dirs-Test-2.cabal Main.hs src/Test.hs I would guess, from the results of Test1, that Test2 should successfully build. Yet, it fails: with "Setup.hs: Main.hs doesn't exists" [sic].
From the results of these two tests, we can conclude that sometimes "." is part of the module search path, and sometimes it isn't. This is bad. Either "." should be always be implicitly part of the search path (better), or it should be implicitly part of the search path _only when no Hs-Source-Dirs field is present_ (best).
Secondly, I have seen references that say that all relative paths in a
Cabal package are relative to the directory containing the package
description. This is not true either. Instead, the whole Cabal library
treats relative paths as relative to the current working directory.
This is a problem for tools that want to reuse the Cabal API but
potentially need to change the current working directly throughout
their execution. For example, if we were to integrate some support for
Cabal into GHCi, then this would interact badly with the :cd command.
- Brian
On 7/14/05, Isaac Jones
I've updated the web page to have 1.0 (as Malcolm requested), and added 1.1.1, which is a "release candidate" for 1.2. Please forgive me for going insane with the version numbers.
I'd appreciate it if early adopter types try out 1.1.1. In particular, check out the README wrt installing alongside-of or instead-of 1.0 with ghc 6.4.
BTW, if anyone loves to manage releases and would like to relieve me of this duty so I can spend my time fixing bugs and adding features, just let me know ;)
peace,
isaac
--------------------------------------------------------------- The Haskell Cabal The Common Architecture for Building Applications and Libraries. http://www.haskell.org/cabal
IMPORTANT INFORMATION:
See both the README file and the changelog for important interface changes and installation instructions.
DOWNLOAD:
The Haskell Cabal has reached version 1.1.1. This pre-release has a number of new features including a hook for testing, support for profiling, and support for _stub files, as well as several bug fixes.
Download the Cabal here (source and debian versions available): http://www.haskell.org/cabal/download.html
BUGS:
Please report bugs and wish-list items to libraries@haskell.org and Isaac Jones: ijones@syntaxpolice.org.
ABOUT:
The Haskell Cabal is meant to be a part of a larger infrastructure for distributing, organizing, and cataloging Haskell Libraries and Tools. It is an effort to provide a framework for developers to more effectively contribute their software to the Haskell community.
Specifically, the Cabal describes what a Haskell package is, how these packages interact with the language, and what Haskell implementations must to do to support packages. The Cabal also specifies some infrastructure (code) that makes it easy for tool authors to build and distribute conforming packages.
The Cabal is only one contribution to the larger goal. In particular, the Cabal says nothing about more global issues such as how authors decide where in the module name space their library should live; how users can find a package they want; how orphan packages find new owners; and so on.
NOTES:
You cannot currently execute most setup scripts with "./Setup.lhs" since most systems do not have a runHaskell executable installed. You can compile it with ghc thusly: "ghc -package Cabal Setup.lhs -o setup" and then use the "setup" executable after that.
This release is meant to provide the community with concrete information about how the interfaces are shaping up. This release does NOT fix the interfaces, we can't promise not to break anything that relies on these interfaces. We hope that Haskell authors will try to package their software using these tools, and let us know where they fall short.
MORE INFORMATION:
Please see the web site for the source code, interfaces, and especially the proposal, which will serve as documentation for this release:
http://www.haskell.org/cabal/ _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries

On Sun, Aug 07, 2005 at 11:40:07PM -0500, Brian Smith wrote:
The documentation implies that, if I include the field: Hs-Source-Dirs: src in my Cabal package description, then _ONLY_ src will be considered the root source code directory. However, this is not the case. The current working directory is always implicitly part of Hs-Source-Dirs, at least when running with "runghc" or "runhugs." See the included testcase. It looks like this: .cabal file: .... Hs-Source-Dirs: src ... Main-Is: Main.hs
files: Hs-Source-Dirs-Test-1.cabal Test1.hs src/Main.hs
If the documentation was correct, then the package should fail to build because "Test1.hs" is in "." instead of in "src/". Yet, with both Hugs and GHC, the package builds successfully because they find Test1.hs in "."
Note that your package description is faulty in that it doesn't list the module Test1 -- the last stanza is missing a line Other-Modules: Test1 As a result building for Hugs produces an incomplete program (the build phase succeeds because it doesn't do much in this case). If you include that line, building for Hugs reports an error. There was a bug with building for GHC, though: it was adding hs-source-dirs to the default path of ghc --make without resetting the path first (now fixed).
Secondly, I have seen references that say that all relative paths in a Cabal package are relative to the directory containing the package description. This is not true either. Instead, the whole Cabal library treats relative paths as relative to the current working directory. This is a problem for tools that want to reuse the Cabal API but potentially need to change the current working directly throughout their execution. For example, if we were to integrate some support for Cabal into GHCi, then this would interact badly with the :cd command.
True, it's been assumed that the current directory is the same as the package root, because that's the way Setup.hs is supposed to be run, and so far Setup.hs has been the only client for the library. The library is ripe for generalization.
participants (4)
-
Brian Smith
-
Isaac Jones
-
Malcolm Wallace
-
Ross Paterson