Bram Neijt | 11 Jun 23:15 2013
Picon

Cabal dependency extrema testing

Hi all,

I think it would be interesting to test build a package with the
"latest" and "oldest" allowed dependencies, to see if the dependency
boundaries hold. For example, build the text[1] package with version
0.2 of test-framework-hunit (oldest allowed according to .cabal file)
to see if that is still works.

Does anybody know of previous work on that?
Does anybody have pointers on how to build with a specific version set?
What is the easiest way to parse the dependencies in the cabal file,
API pointers are also very much appreciated :)

Greetings,

Bram

[1] http://hackage.haskell.org/packages/archive/text/0.11.2.3/text.cabal
Henning Thielemann | 11 Jun 23:24 2013
Picon

Re: Cabal dependency extrema testing


On Tue, 11 Jun 2013, Bram Neijt wrote:

> I think it would be interesting to test build a package with the
> "latest" and "oldest" allowed dependencies, to see if the dependency
> boundaries hold. For example, build the text[1] package with version
> 0.2 of test-framework-hunit (oldest allowed according to .cabal file)
> to see if that is still works.

It would be great to have a tool to do this. Maybe it could be just 
another option in cabal-install, like the --constraint option?

> Does anybody know of previous work on that?
> Does anybody have pointers on how to build with a specific version set?
> What is the easiest way to parse the dependencies in the cabal file,
> API pointers are also very much appreciated :)

http://hackage.haskell.org/packages/archive/Cabal/1.16.0.3/doc/html/Distribution-PackageDescription-Parse.html
Henning Thielemann | 11 Jun 23:30 2013
Picon

Re: Cabal dependency extrema testing


On Tue, 11 Jun 2013, Bram Neijt wrote:

> I think it would be interesting to test build a package with the
> "latest" and "oldest" allowed dependencies, to see if the dependency
> boundaries hold. For example, build the text[1] package with version
> 0.2 of test-framework-hunit (oldest allowed according to .cabal file)
> to see if that is still works.

Another nice test would be, whether the package can actually be compiled 
with all compiler versions that are listed in Tested-With.
Roman Cheplyaka | 12 Jun 00:05 2013

Re: Cabal dependency extrema testing

* Bram Neijt <bneijt <at> gmail.com> [2013-06-11 23:15:39+0200]
> Hi all,
> 
> I think it would be interesting to test build a package with the
> "latest" and "oldest" allowed dependencies, to see if the dependency
> boundaries hold. For example, build the text[1] package with version
> 0.2 of test-framework-hunit (oldest allowed according to .cabal file)
> to see if that is still works.
> 
> Does anybody know of previous work on that?
> Does anybody have pointers on how to build with a specific version set?
> What is the easiest way to parse the dependencies in the cabal file,
> API pointers are also very much appreciated :)

I believe Bram Schuur (CC'd) worked on this during OdHac.

Roman
Roman Cheplyaka | 12 Jun 00:10 2013

Re: Cabal dependency extrema testing

* Roman Cheplyaka <roma <at> ro-che.info> [2013-06-12 01:05:29+0300]
> * Bram Neijt <bneijt <at> gmail.com> [2013-06-11 23:15:39+0200]
> > Hi all,
> > 
> > I think it would be interesting to test build a package with the
> > "latest" and "oldest" allowed dependencies, to see if the dependency
> > boundaries hold. For example, build the text[1] package with version
> > 0.2 of test-framework-hunit (oldest allowed according to .cabal file)
> > to see if that is still works.
> > 
> > Does anybody know of previous work on that?
> > Does anybody have pointers on how to build with a specific version set?
> > What is the easiest way to parse the dependencies in the cabal file,
> > API pointers are also very much appreciated :)
> 
> I believe Bram Schuur (CC'd) worked on this during OdHac.

Trying his another email...
Roman Cheplyaka | 12 Jun 00:16 2013

Re: Cabal dependency extrema testing

* Roman Cheplyaka <roma <at> ro-che.info> [2013-06-12 01:10:56+0300]
> * Roman Cheplyaka <roma <at> ro-che.info> [2013-06-12 01:05:29+0300]
> > * Bram Neijt <bneijt <at> gmail.com> [2013-06-11 23:15:39+0200]
> > > Hi all,
> > > 
> > > I think it would be interesting to test build a package with the
> > > "latest" and "oldest" allowed dependencies, to see if the dependency
> > > boundaries hold. For example, build the text[1] package with version
> > > 0.2 of test-framework-hunit (oldest allowed according to .cabal file)
> > > to see if that is still works.
> > > 
> > > Does anybody know of previous work on that?
> > > Does anybody have pointers on how to build with a specific version set?
> > > What is the easiest way to parse the dependencies in the cabal file,
> > > API pointers are also very much appreciated :)
> > 
> > I believe Bram Schuur (CC'd) worked on this during OdHac.
> 
> Trying his another email...

Still no luck. This is his github account, maybe try to reach him there:
https://github.com/craffit

Roman
Erik Hesselink | 12 Jun 09:29 2013
Picon

Re: Cabal dependency extrema testing

On Wed, Jun 12, 2013 at 12:16 AM, Roman Cheplyaka <roma <at> ro-che.info> wrote:
> * Roman Cheplyaka <roma <at> ro-che.info> [2013-06-12 01:10:56+0300]
>> * Roman Cheplyaka <roma <at> ro-che.info> [2013-06-12 01:05:29+0300]
>> > * Bram Neijt <bneijt <at> gmail.com> [2013-06-11 23:15:39+0200]
>> > > Hi all,
>> > >
>> > > I think it would be interesting to test build a package with the
>> > > "latest" and "oldest" allowed dependencies, to see if the dependency
>> > > boundaries hold. For example, build the text[1] package with version
>> > > 0.2 of test-framework-hunit (oldest allowed according to .cabal file)
>> > > to see if that is still works.
>> > >
>> > > Does anybody know of previous work on that?
>> > > Does anybody have pointers on how to build with a specific version set?
>> > > What is the easiest way to parse the dependencies in the cabal file,
>> > > API pointers are also very much appreciated :)
>> >
>> > I believe Bram Schuur (CC'd) worked on this during OdHac.
>>
>> Trying his another email...
>
> Still no luck. This is his github account, maybe try to reach him there:
> https://github.com/craffit

I believe this address still works.

Regards,

Erik
(Continue reading)

Bram Neijt | 16 Jun 00:18 2013
Picon

Re: Cabal dependency extrema testing

Ok, so I had my first go at this, but it seems all the things I try
will fail. My approach was simple: take a single dependency and change
">=" into "==" for that single dependency, then try to build. Do that
for every dependency in the cabal file.

Turns out, none of the things I tries would work. Here is a concrete example:
mkdir test
cd test
snap init
#Edit the test.cabal file and change bytestring >= 0.9.1 to bytestring == 0.9.1
cabal fetch .

This fails, telling me:
$ cabal fetch .
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: test-0.1 (user goal)
next goal: xmlhtml (dependency of test-0.1)
rejecting: xmlhtml-0.2.0.3/installed-4c6... (conflict: xmlhtml =>
bytestring==0.10.0.1/installed-7e2..., test => bytestring==0.9.1 && <0.11)
trying: xmlhtml-0.2.1
trying: unordered-containers-0.2.3.0/installed-7fe... (dependency of
xmlhtml-0.2.1)
next goal: hashable (dependency of
unordered-containers-0.2.3.0/installed-7fe...)
rejecting: hashable-1.2.0.2/installed-bbd... (conflict: unordered-containers
=> hashable==1.1.2.5/installed-d93...)
rejecting: hashable-1.1.2.5/installed-d93... (conflict: hashable =>
bytestring==0.10.0.1/installed-7e2..., test => bytestring==0.9.1 && <0.11)
rejecting: hashable-1.2.0.10, 1.2.0.9, 1.2.0.8, 1.2.0.7, 1.2.0.6, 1.2.0.5,
(Continue reading)

Roman Cheplyaka | 16 Jun 08:49 2013

Re: Cabal dependency extrema testing

First of all, I don't think libraries <at>  is the right place for this discussion.
You should probably move it to -cafe until you have a concrete proposal
for libraries changes.

To answer your question: you're interpreting the results wrong.
If cabal found a way to build the package with these constraints and the
build itself failed, that would be an argument for restricting bounds.

In this case cabal simply can't find a suitable install plan, which
means that *your* constraints are incompatible. That *probably* means
(although it's easy to come up with a contrived counterexample) that
dependencies can be made a bit tighter, but it's not a maintainer's task
to analyse compatibility of various packages — that's what cabal is for.

Maintainer only specifies constraint within which the package is
supposed to build. The only way such constraints can be proven wrong is
showing a build within the constraints which fails.

Roman

* Bram Neijt <bneijt <at> gmail.com> [2013-06-16 00:18:24+0200]
> Ok, so I had my first go at this, but it seems all the things I try
> will fail. My approach was simple: take a single dependency and change
> ">=" into "==" for that single dependency, then try to build. Do that
> for every dependency in the cabal file.
> 
> Turns out, none of the things I tries would work. Here is a concrete example:
> mkdir test
> cd test
> snap init
(Continue reading)

Henning Thielemann | 16 Jun 11:02 2013
Picon

Re: Cabal dependency extrema testing


On Sun, 16 Jun 2013, Bram Neijt wrote:

> Ok, so I had my first go at this, but it seems all the things I try
> will fail. My approach was simple: take a single dependency and change
> ">=" into "==" for that single dependency, then try to build. Do that
> for every dependency in the cabal file.
>
> Turns out, none of the things I tries would work. Here is a concrete example:
> mkdir test
> cd test
> snap init
> #Edit the test.cabal file and change bytestring >= 0.9.1 to bytestring == 0.9.1
> cabal fetch .

You do not need to touch test.cabal. You can run

$ cabal install --constraint="bytestring == 0.9.1"
Bram Neijt | 16 Jun 11:46 2013
Picon

Re: Cabal dependency extrema testing

Thank you for the responses! The --constraint option is a great tip.

Any further discussion will be continued on the -cafe mailing list.

Greetings,

Bram

On Sun, Jun 16, 2013 at 11:02 AM, Henning Thielemann
<lemming <at> henning-thielemann.de> wrote:
>
> On Sun, 16 Jun 2013, Bram Neijt wrote:
>
>> Ok, so I had my first go at this, but it seems all the things I try
>> will fail. My approach was simple: take a single dependency and change
>> ">=" into "==" for that single dependency, then try to build. Do that
>> for every dependency in the cabal file.
>>
>> Turns out, none of the things I tries would work. Here is a concrete
>> example:
>> mkdir test
>> cd test
>> snap init
>> #Edit the test.cabal file and change bytestring >= 0.9.1 to bytestring ==
>> 0.9.1
>> cabal fetch .
>
>
> You do not need to touch test.cabal. You can run
>
(Continue reading)


Gmane