
On Mon, Aug 22, 2005 at 09:08:01AM -0700, Isaac Jones wrote:
Frederik Eaton
writes: If there have been a lot of discussions and decisions, I don't think that mailing list archives, or wherever the analysis is located, are a good repository for design documents. I believe (and I'm not saying you disagree at this point) that things which are planned and which we want people to potentially help out with should go on the wiki, along with their rationale.
We wrote and maintained a proposal document. It's on the web page.
Oh, this?: http://www.haskell.org/hawiki/LibraryInfrastructure Looks good.
(about adding a --package-conf= flag to cabal):
(snip)
In a way, the problem isn't "lack of support" but a different model of finding packages... It's not like a compiler extension that one system supports and one doesn't; this flag breaks abstraction between compilers in a way that --in-place does not. I haven't heard any use cases where --in-place won't work.
Well, we're talking about two different features here.
I'm talking about use cases, not features :)
We're talking about two different use cases.
I want to be able to specify an arbitrary location. You want to be able to specify the current working directory. Not the same thing, is it? I think it should be possible to specify an arbitrary location, at least for ghc.
Since this breaks abstraction, I would prefer to avoid this until I see a convincing use case.
I thought I already gave one: http://toastball.net/toast/ Here's another: http://www.wigwam-framework.org/doc/overview.html
Those aren't use cases. Can you please explain a situation where --in-place doesn't work, and --package-conf= is required?
Did you look at these tools? In order to use cabal packages with them, you'd have to be able to specify arbitrary package databases for each package. People have good reasons for doing so. Read the wigwam page especially. If cabal packages can't be installed in arbitrary locations, then not only will this be an serious pain in the ass for some special users - which should be enough of a reason on its own! - but it will rule out using Haskell in the server infrastructure of certain large software companies. I worked at Yahoo which doesn't use wigwam but uses something similar; I'm sure other places are moving or have moved in the same direction. Writing off these groups is surely a bad idea! Achieving this modularity with your --in-place suggestion, as I understand it, would require specifying a separate -package-conf option per package (or directory of packages, when that becomes allowed) per ghc invocation, at which point one would be hard pressed to call the things "package databases" since they will mostly contain one package each. Cabal would thus be forcing users to re-implement their own package database; plus, it would still require an interface to let them specify the package database locations, so nothing gained ... Note that any compiler that has a notion of packages is going to have a notion of a package database, whether it is a file or a directory or a search path of directories or a network server. It's where we go to find packages. All I'm saying is that this needs to be virtualizable. Cabal needs to let users specify it, whatever it is.
But let's think about what you're saying. You don't want to break some abstractions in your implementation, so you're causing the abstraction that you are supposed to be providing your users with to break.
Of course that's not what I'm saying. I still seen a use case where --in-place won't work.
Here's a general rule I follow when making decisions about cabal: If I have two possible features, but only one use-case, and feature number 1 covers that use-case just as well as feature number 2, and feature number 1 maintains abstraction between compilers, whereas feature number 2 breaks it, then I choose feature number 1.
That is, try to find a way to solve the users' problem without breaking the abstractions between compilers.
To be sure, there is a trade-off between generality and practicality. However, I think you're failing to be general enough in the design of Cabal. Since it's going to be so widely used, we want to come up with an interface which won't have to change much, and this will require something which is more general than usual. However, there are valid use cases to support my argument for greater abstraction. Please let me know if there is still confusion over the use cases I've been presenting.
We need to be able to deal with packages getting installed anywhere and everywhere and every which way. Everything about the installation of a package needs to be virtualizable.
I disagree. When you write a common interface on top of multiple implementations, you sometimes lose control over the details of the implementations, but the interface remains useful because it is consistent and nevertheless powerful. If you want control over every aspect, then you can drop down to the implementations and use them directly.
So you're saying that someone who needs a particular level of abstraction from cabal should rewrite the build systems of all the packages that they intend to use, rather than asking Cabal to harbor a certain feature, if that feature is one which might only be supported when Cabal is used in conjunction with ghc? That's ridiculous. We have to look forwards, not backwards. We can't just restrict ourselves to the lowest common denominator of all compilers, or we won't go anywhere. Keep in mind that Cabal exists to serve its users, not the other way around.
The package database should not be tied to the user or the system or the compiler version.
There's really no way around that. Each compilers' binary format differ.
That's not what I meant. With ghc, there is a default package database which depends on the user and the compiler version. But you can specify a non-default location as well. Cabal should provide an interface which allows you to access this feature. Frederik -- http://ofb.net/~frederik/

Frederik Eaton
On Mon, Aug 22, 2005 at 09:08:01AM -0700, Isaac Jones wrote:
Frederik Eaton
writes: If there have been a lot of discussions and decisions, I don't think that mailing list archives, or wherever the analysis is located, are a good repository for design documents. I believe (and I'm not saying you disagree at this point) that things which are planned and which we want people to potentially help out with should go on the wiki, along with their rationale.
We wrote and maintained a proposal document. It's on the web page.
Oh, this?: http://www.haskell.org/hawiki/LibraryInfrastructure
No, that's not the proposal document. It's in the "old" links of the web page. It used to be on the front page, but I recently moved it, which I forgot about, since it's not really necessary anymore. You could have found it if you googled for "cabal proposal" though.
Looks good.
Thanks. The wiki page was superseded by the proposal document, but wasn't really maintained much anyway, as I mentioned.
(about adding a --package-conf= flag to cabal): (snip)
I thought I already gave one: http://toastball.net/toast/ Here's another: http://www.wigwam-framework.org/doc/overview.html
Those aren't use cases. Can you please explain a situation where --in-place doesn't work, and --package-conf= is required?
Did you look at these tools? In order to use cabal packages with them, you'd have to be able to specify arbitrary package databases for each package. People have good reasons for doing so.
I have looked at these tools. I looked at toast some time back. Can you explain what's broken about the toast / cabal integration? Looks to me like cabal was integrated with toast in May and it took about 10 lines, but maybe it's broken because of what you're talking about?
Read the wigwam page especially.
Honestly, I don't see the problem. Can you please explain it to me?
If cabal packages can't be installed in arbitrary locations, then not only will this be an serious pain in the ass for some special users - which should be enough of a reason on its own! - but it will rule out using Haskell in the server infrastructure of certain large software companies. I worked at Yahoo which doesn't use wigwam but uses something similar; I'm sure other places are moving or have moved in the same direction. Writing off these groups is surely a bad idea!
I don't understand this part. Cabal packages can be installed in arbitrary locations. (snip)
We need to be able to deal with packages getting installed anywhere and everywhere and every which way. Everything about the installation of a package needs to be virtualizable.
I disagree. When you write a common interface on top of multiple implementations, you sometimes lose control over the details of the implementations, but the interface remains useful because it is consistent and nevertheless powerful. If you want control over every aspect, then you can drop down to the implementations and use them directly.
So you're saying that someone who needs a particular level of abstraction from cabal
So far, I don't think you've every been right when you start a sentence with "so you're saying..."
should rewrite the build systems of all the packages that they intend to use, rather than asking Cabal to harbor a certain feature, if that feature is one which might only be supported when Cabal is used in conjunction with ghc?
We have added features to cabal that only make sense with particular compilers, for instance, some compiler extensions. One of Cabal's main goals is to abstract the difference between compilers. To the extent that it does not do so it fails at this goal. So when someone asks for a feature, I try to figure out how to make it generic among compilers, and I work with the users, as I'm working with you, to understand their requirements so we can maintain compatibility and keep users happy at the same time.
That's ridiculous. We have to look forwards, not backwards. We can't just restrict ourselves to the lowest common denominator of all compilers, or we won't go anywhere.
Keep in mind that Cabal exists to serve its users, not the other way around.
The problem is that you keep demanding a particular implementation of a feature instead of just explaining a use case. (Another problem is that you're being rather rude about it.) Honestly, I don't want to read in detail about toast and wigwam and try to guess what the problem is. It's definitely not as obvious to me as it is to you. Please take a few minutes and just explain the use case. I promise that it'll be more constructive than your demands and snide remarks. peace, isaac

On Mon, Aug 22, 2005 at 06:11:11PM -0700, Isaac Jones wrote:
Frederik Eaton
writes: On Mon, Aug 22, 2005 at 09:08:01AM -0700, Isaac Jones wrote:
Frederik Eaton
writes: If there have been a lot of discussions and decisions, I don't think that mailing list archives, or wherever the analysis is located, are a good repository for design documents. I believe (and I'm not saying you disagree at this point) that things which are planned and which we want people to potentially help out with should go on the wiki, along with their rationale.
We wrote and maintained a proposal document. It's on the web page.
Oh, this?: http://www.haskell.org/hawiki/LibraryInfrastructure
No, that's not the proposal document.
It's in the "old" links of the web page. It used to be on the front page, but I recently moved it, which I forgot about, since it's not really necessary anymore. You could have found it if you googled for "cabal proposal" though.
Looks good.
Thanks.
The wiki page was superseded by the proposal document, but wasn't really maintained much anyway, as I mentioned.
(about adding a --package-conf= flag to cabal): (snip)
I thought I already gave one: http://toastball.net/toast/ Here's another: http://www.wigwam-framework.org/doc/overview.html
Those aren't use cases. Can you please explain a situation where --in-place doesn't work, and --package-conf= is required?
Did you look at these tools? In order to use cabal packages with them, you'd have to be able to specify arbitrary package databases for each package. People have good reasons for doing so.
I have looked at these tools. I looked at toast some time back. Can you explain what's broken about the toast / cabal integration? Looks to me like cabal was integrated with toast in May and it took about 10 lines, but maybe it's broken because of what you're talking about?
Read the wigwam page especially.
Honestly, I don't see the problem. Can you please explain it to me?
If cabal packages can't be installed in arbitrary locations, then not only will this be an serious pain in the ass for some special users - which should be enough of a reason on its own! - but it will rule out using Haskell in the server infrastructure of certain large software companies. I worked at Yahoo which doesn't use wigwam but uses something similar; I'm sure other places are moving or have moved in the same direction. Writing off these groups is surely a bad idea!
I don't understand this part. Cabal packages can be installed in arbitrary locations.
(snip)
We need to be able to deal with packages getting installed anywhere and everywhere and every which way. Everything about the installation of a package needs to be virtualizable.
I disagree. When you write a common interface on top of multiple implementations, you sometimes lose control over the details of the implementations, but the interface remains useful because it is consistent and nevertheless powerful. If you want control over every aspect, then you can drop down to the implementations and use them directly.
So you're saying that someone who needs a particular level of abstraction from cabal
So far, I don't think you've every been right when you start a sentence with "so you're saying..."
Then please furnish a corrected version. What other option does this person have?
should rewrite the build systems of all the packages that they intend to use, rather than asking Cabal to harbor a certain feature, if that feature is one which might only be supported when Cabal is used in conjunction with ghc?
We have added features to cabal that only make sense with particular compilers, for instance, some compiler extensions. One of Cabal's main goals is to abstract the difference between compilers. To the extent that it does not do so it fails at this goal. So when someone asks for a feature, I try to figure out how to make it generic among compilers, and I work with the users, as I'm working with you, to understand their requirements so we can maintain compatibility and keep users happy at the same time.
What is the purpose of abstracting differences between compilers? Isn't it so that users can switch between compilers transparently? What if a user needs a feature of one compiler which is not present in another compiler? How would Cabal be hurting him if Cabal let him access that feature? After all, switching between compilers was never an option for him in the first place.
That's ridiculous. We have to look forwards, not backwards. We can't just restrict ourselves to the lowest common denominator of all compilers, or we won't go anywhere.
Keep in mind that Cabal exists to serve its users, not the other way around.
The problem is that you keep demanding a particular implementation of a feature instead of just explaining a use case. (Another problem is that you're being rather rude about it.) Honestly, I don't want to read in detail about toast and wigwam and try to guess what the problem is. It's definitely not as obvious to me as it is to you.
Please take a few minutes and just explain the use case. I promise that it'll be more constructive than your demands and snide remarks.
I'm sorry if I sound frustrated, but I had thought there would be more of an understanding. However, I resent the manner in which you now seem to be attacking my comments. There is no need to be ad hominem. Also, I haven't been trying to hide information from you. It would have been helpful if you'd asked for clarification earlier on. So, the whole point of wigwam, and a feature of toast, is to allow things to be installed in multiple different "roots" ("playpens" in wigwam). The idea is that you may want to install, say, a web server and a bunch of its dependencies in one root, so that it can be tested and deployed in a completely encapsulated and reliable manner. You may want to test it independently of different versions of the same things in other roots, or you may want to deploy it side-by-side with an older version on a front-end server so that it is possible to seamlessly switch between old and new versions. If all roots share a package database, then you end up having to give the things which are installed in those roots separate version numbers in order to keep the package registrations from overwriting each other. Yet the version number mapping won't always be injective. You might have packages which you consider different, yet which have the same version number. For instance, maybe they are two different revisions from a source repository, which have the same package version number; or maybe the same package has been compiled with two different compilers. Both cases are a common occurrence in QA work, and it would be severely onerous if people were required to manually insert new version numbers simply because Haskell package databases were not virtualizable through Cabal. Frederik -- http://ofb.net/~frederik/

Frederik Eaton
So, the whole point of wigwam, and a feature of toast, is to allow things to be installed in multiple different "roots" ("playpens" in wigwam). The idea is that you may want to install, say, a web server and a bunch of its dependencies in one root, so that it can be tested and deployed in a completely encapsulated and reliable manner. You may want to test it independently of different versions of the same things in other roots, or you may want to deploy it side-by-side with an older version on a front-end server so that it is possible to seamlessly switch between old and new versions. If all roots share a package database, then you end up having to give the things which are installed in those roots separate version numbers in order to keep the package registrations from overwriting each other.
I see. Gentoo has this sort of thing as well. I had thought that in such cases, GHC itself would be installed in the same "root" as this version of Cabal and the packages that you want to test, in which case, ghc-pkg would use a different package database. Is that not the case? BTW, Debian takes this a step further, with its use of chroot on its build servers, I believe. Conveniently for upstream authors and packagers, using chroot doesn't require altering all of the packages which you would want to test in such a way. peace, isaac

On Mon, Aug 22, 2005 at 08:27:57PM -0700, Isaac Jones wrote:
Frederik Eaton
writes: (snip)
So, the whole point of wigwam, and a feature of toast, is to allow things to be installed in multiple different "roots" ("playpens" in wigwam). The idea is that you may want to install, say, a web server and a bunch of its dependencies in one root, so that it can be tested and deployed in a completely encapsulated and reliable manner. You may want to test it independently of different versions of the same things in other roots, or you may want to deploy it side-by-side with an older version on a front-end server so that it is possible to seamlessly switch between old and new versions. If all roots share a package database, then you end up having to give the things which are installed in those roots separate version numbers in order to keep the package registrations from overwriting each other.
I see. Gentoo has this sort of thing as well.
Really? That makes me inclined to switch.
I had thought that in such cases, GHC itself would be installed in the same "root" as this version of Cabal and the packages that you want to test, in which case, ghc-pkg would use a different package database. Is that not the case?
I have actually been using this feature, however, I don't think it should be required. Partly because of the space overhead $ du -sh .toast-i386/pkg/ghc/v6.4-i386-unknown-linux/ 239M .toast-i386/pkg/ghc/v6.4-i386-unknown-linux/ , partly because of the fact that "creating a new root" shouldn't require "installing a new version of every compiler system"... Typically not everything goes into the root, just the stuff which is, say, necessary to servers at runtime. A third reason is that one should be able to use packages installed in user and global package databases, and package databases from multiple roots, simultaneously. My choice of the term "root" here was perhaps a bit unwise. I don't mean to refer to a thing that you are limited to using 1 of, it's just a place where a bunch of packages may be installed. So for instance Cabal currently recognizes 2 "roots", the "user" and the "global". In addition on my system I have the toast root. You can have a compiler in each root and rely on this hack to get separation of package databases, but you would still need a way to specify which of these databases you want to pull packages from when you compile an additional package, which would require support from Cabal. Well, I guess this would be possible if ghc recognized environment variables and Cabal didn't clear the environment. Configuring an environment to use several roots is simple when environment variables are recognized by tools. On my system, I have for instance $ print -l $CPATH $MANPATH $INFOPATH $LIBRARY_PATH $LD_LIBRARY_PATH /home/frederik/.toast-i386/armed/include:/home/frederik/include /home/frederik/.toast-i386/armed/man:/home/frederik/share/man:/usr/local/share/man:/usr/share/man /home/frederik/.toast-i386/armed/info:/home/frederik/info /home/frederik/.toast-i386/armed/lib:/home/frederik/arch/i386/lib:/home/frederik/arch/i386/lib/mysql /home/frederik/.toast-i386/armed/lib:/home/frederik/arch/i386/lib:/home/frederik/arch/i386/lib/mysql It is rather difficult to do any other way. This is why I asked (on March 9) for environment variable support in ghc, and was rather disappointed to find that lack of support was actually intentional: simonmar> There's the GHCRTS environment variable that you can use for setting simonmar> heap sizes and so on, and the ~/.ghci file, but nothing for setting ghc simonmar> command-line arguments. We're a bit wary of adding more things that we simonmar> have to ask for in a bug report... Remember that one of the most common uses for this sort of virtualization support is QA! Frederik -- http://ofb.net/~frederik/

On Mon, 2005-08-22 at 23:08 -0700, Frederik Eaton wrote:
On Mon, Aug 22, 2005 at 08:27:57PM -0700, Isaac Jones wrote:
Frederik Eaton
writes: (snip)
So, the whole point of wigwam, and a feature of toast, is to allow things to be installed in multiple different "roots" ("playpens" in wigwam). The idea is that you may want to install, say, a web server and a bunch of its dependencies in one root, so that it can be tested and deployed in a completely encapsulated and reliable manner. You may want to test it independently of different versions of the same things in other roots, or you may want to deploy it side-by-side with an older version on a front-end server so that it is possible to seamlessly switch between old and new versions. If all roots share a package database, then you end up having to give the things which are installed in those roots separate version numbers in order to keep the package registrations from overwriting each other.
So it sounds rather like a "fully relocatable package". Perhaps you would be satisfied with the same interface that the Gentoo packaging people are asking for. Instead of getting cabal to register into an arbitrary package conf file we hope to have cabal give us the package file(s) which we can then register ourselves using ghc-pkg. So yes, this would be sort of a back-door. But it would allow you to hack up whatever you need to do for package registration. On the other hand, we would have to accept that such a thing is a back door and so the interface and capabilites might be less stable than the public interface. It also means of course that you'd have to know all about ghc-pkg/hugs-pkg/nhc-pkg etc, which is something that cabal is trying to protect users from (which is why this 'feature' does not fit the cabal abstraction). So if we're nice to Isaac and can persuade him that giving us a limited back door is better than implementing our obscure features generically in cabal itself (not to mention easier for Isaac since he doesn't have to implement them!) then we might get it. Though we may also have to swear not to publicise the back door too much so that it doesn't get abused as if it were an ordinary public interface. :-) Duncan
participants (3)
-
Duncan Coutts
-
Frederik Eaton
-
Isaac Jones