What is the relationship between dependency constraints in “stack configuration”, xxx.cabal, and cabal.config?










0















I haven't tried solving the issue yet; first I want to understand where the issue comes from:



TextTerra $ stack --nix test

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for TextTerra-0.1.0.0:
easytest-0.2 from stack configuration does not match ==0.2.1 (latest matching version is 0.2.1)
needed since TextTerra is a build target.

Some different approaches to resolving this:

* Set 'allow-newer: true' to ignore all version constraints and build anyway.

* Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be convenient when dealing with many complicated constraint
errors, but results may be unpredictable.

* Recommended action: try adding the following to your extra-deps in /home/brandon/workspace/TextTerra/stack.yaml:

- easytest-0.2.1

Plan construction failed.


There is now no other reference to easytest, particularly easytest-0.2; the single reference is what I just added:



TextTerra $ rg easytest
TextTerra.cabal
67: , easytest == 0.2.1


However, there was a reference to easytest-0.2 in cabal.config. I'm not aware of the relevance of this file as a quick search doesn't turn up much and removing the file has no effect on the build (in particular, I get the same error message above).










share|improve this question






















  • Does this related to the curated/fixed-version packages in LTS?

    – bbarker
    Nov 15 '18 at 2:08






  • 1





    "Does this related to the curated/fixed-version packages in LTS?" -- Likely so. Look for the resolver field in stack.yaml, then look for easytest in the Stackage page for the snapshot mentioned there (for instance, this is the page for LTS 12.18).

    – duplode
    Nov 15 '18 at 2:23











  • Thanks, yeah updating the resolver fixed it! Perhaps that should be one of the approaches listed for solving the issue in the error message?

    – bbarker
    Nov 15 '18 at 2:56











  • Possibly. I believe the error message makes the conservative assumption that you (or upstream) have already decided which resolver to use and just want to adjust your configuration for a new dependency (as opposed to, say, wanting to update the dependencies of an old project).

    – duplode
    Nov 15 '18 at 3:19















0















I haven't tried solving the issue yet; first I want to understand where the issue comes from:



TextTerra $ stack --nix test

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for TextTerra-0.1.0.0:
easytest-0.2 from stack configuration does not match ==0.2.1 (latest matching version is 0.2.1)
needed since TextTerra is a build target.

Some different approaches to resolving this:

* Set 'allow-newer: true' to ignore all version constraints and build anyway.

* Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be convenient when dealing with many complicated constraint
errors, but results may be unpredictable.

* Recommended action: try adding the following to your extra-deps in /home/brandon/workspace/TextTerra/stack.yaml:

- easytest-0.2.1

Plan construction failed.


There is now no other reference to easytest, particularly easytest-0.2; the single reference is what I just added:



TextTerra $ rg easytest
TextTerra.cabal
67: , easytest == 0.2.1


However, there was a reference to easytest-0.2 in cabal.config. I'm not aware of the relevance of this file as a quick search doesn't turn up much and removing the file has no effect on the build (in particular, I get the same error message above).










share|improve this question






















  • Does this related to the curated/fixed-version packages in LTS?

    – bbarker
    Nov 15 '18 at 2:08






  • 1





    "Does this related to the curated/fixed-version packages in LTS?" -- Likely so. Look for the resolver field in stack.yaml, then look for easytest in the Stackage page for the snapshot mentioned there (for instance, this is the page for LTS 12.18).

    – duplode
    Nov 15 '18 at 2:23











  • Thanks, yeah updating the resolver fixed it! Perhaps that should be one of the approaches listed for solving the issue in the error message?

    – bbarker
    Nov 15 '18 at 2:56











  • Possibly. I believe the error message makes the conservative assumption that you (or upstream) have already decided which resolver to use and just want to adjust your configuration for a new dependency (as opposed to, say, wanting to update the dependencies of an old project).

    – duplode
    Nov 15 '18 at 3:19













0












0








0








I haven't tried solving the issue yet; first I want to understand where the issue comes from:



TextTerra $ stack --nix test

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for TextTerra-0.1.0.0:
easytest-0.2 from stack configuration does not match ==0.2.1 (latest matching version is 0.2.1)
needed since TextTerra is a build target.

Some different approaches to resolving this:

* Set 'allow-newer: true' to ignore all version constraints and build anyway.

* Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be convenient when dealing with many complicated constraint
errors, but results may be unpredictable.

* Recommended action: try adding the following to your extra-deps in /home/brandon/workspace/TextTerra/stack.yaml:

- easytest-0.2.1

Plan construction failed.


There is now no other reference to easytest, particularly easytest-0.2; the single reference is what I just added:



TextTerra $ rg easytest
TextTerra.cabal
67: , easytest == 0.2.1


However, there was a reference to easytest-0.2 in cabal.config. I'm not aware of the relevance of this file as a quick search doesn't turn up much and removing the file has no effect on the build (in particular, I get the same error message above).










share|improve this question














I haven't tried solving the issue yet; first I want to understand where the issue comes from:



TextTerra $ stack --nix test

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for TextTerra-0.1.0.0:
easytest-0.2 from stack configuration does not match ==0.2.1 (latest matching version is 0.2.1)
needed since TextTerra is a build target.

Some different approaches to resolving this:

* Set 'allow-newer: true' to ignore all version constraints and build anyway.

* Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be convenient when dealing with many complicated constraint
errors, but results may be unpredictable.

* Recommended action: try adding the following to your extra-deps in /home/brandon/workspace/TextTerra/stack.yaml:

- easytest-0.2.1

Plan construction failed.


There is now no other reference to easytest, particularly easytest-0.2; the single reference is what I just added:



TextTerra $ rg easytest
TextTerra.cabal
67: , easytest == 0.2.1


However, there was a reference to easytest-0.2 in cabal.config. I'm not aware of the relevance of this file as a quick search doesn't turn up much and removing the file has no effect on the build (in particular, I get the same error message above).







haskell cabal haskell-stack






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 15 '18 at 2:00









bbarkerbbarker

1,96921827




1,96921827












  • Does this related to the curated/fixed-version packages in LTS?

    – bbarker
    Nov 15 '18 at 2:08






  • 1





    "Does this related to the curated/fixed-version packages in LTS?" -- Likely so. Look for the resolver field in stack.yaml, then look for easytest in the Stackage page for the snapshot mentioned there (for instance, this is the page for LTS 12.18).

    – duplode
    Nov 15 '18 at 2:23











  • Thanks, yeah updating the resolver fixed it! Perhaps that should be one of the approaches listed for solving the issue in the error message?

    – bbarker
    Nov 15 '18 at 2:56











  • Possibly. I believe the error message makes the conservative assumption that you (or upstream) have already decided which resolver to use and just want to adjust your configuration for a new dependency (as opposed to, say, wanting to update the dependencies of an old project).

    – duplode
    Nov 15 '18 at 3:19

















  • Does this related to the curated/fixed-version packages in LTS?

    – bbarker
    Nov 15 '18 at 2:08






  • 1





    "Does this related to the curated/fixed-version packages in LTS?" -- Likely so. Look for the resolver field in stack.yaml, then look for easytest in the Stackage page for the snapshot mentioned there (for instance, this is the page for LTS 12.18).

    – duplode
    Nov 15 '18 at 2:23











  • Thanks, yeah updating the resolver fixed it! Perhaps that should be one of the approaches listed for solving the issue in the error message?

    – bbarker
    Nov 15 '18 at 2:56











  • Possibly. I believe the error message makes the conservative assumption that you (or upstream) have already decided which resolver to use and just want to adjust your configuration for a new dependency (as opposed to, say, wanting to update the dependencies of an old project).

    – duplode
    Nov 15 '18 at 3:19
















Does this related to the curated/fixed-version packages in LTS?

– bbarker
Nov 15 '18 at 2:08





Does this related to the curated/fixed-version packages in LTS?

– bbarker
Nov 15 '18 at 2:08




1




1





"Does this related to the curated/fixed-version packages in LTS?" -- Likely so. Look for the resolver field in stack.yaml, then look for easytest in the Stackage page for the snapshot mentioned there (for instance, this is the page for LTS 12.18).

– duplode
Nov 15 '18 at 2:23





"Does this related to the curated/fixed-version packages in LTS?" -- Likely so. Look for the resolver field in stack.yaml, then look for easytest in the Stackage page for the snapshot mentioned there (for instance, this is the page for LTS 12.18).

– duplode
Nov 15 '18 at 2:23













Thanks, yeah updating the resolver fixed it! Perhaps that should be one of the approaches listed for solving the issue in the error message?

– bbarker
Nov 15 '18 at 2:56





Thanks, yeah updating the resolver fixed it! Perhaps that should be one of the approaches listed for solving the issue in the error message?

– bbarker
Nov 15 '18 at 2:56













Possibly. I believe the error message makes the conservative assumption that you (or upstream) have already decided which resolver to use and just want to adjust your configuration for a new dependency (as opposed to, say, wanting to update the dependencies of an old project).

– duplode
Nov 15 '18 at 3:19





Possibly. I believe the error message makes the conservative assumption that you (or upstream) have already decided which resolver to use and just want to adjust your configuration for a new dependency (as opposed to, say, wanting to update the dependencies of an old project).

– duplode
Nov 15 '18 at 3:19












1 Answer
1






active

oldest

votes


















2














In...




easytest-0.2 from stack configuration does not match ==0.2.1




... the "stack configuration" means the set of packages specified through the resolver (typically a Stackage snapshot -- you can find lists of packages and versions in a snapshot at the Stackage site) and the extra-deps in stack.yaml, while the ==0.2.1 constraint is what your .cabal file is asking. The suggestions given by the error message (ignoring .cabal upper bounds with allow-newer, and adding packages to extra-deps) are appropriate in the cases in which you want, or need, to build with a specific resolver. If that is not the case (say, if you are trying to update an old project to a recent LTS snapshot), you can also change the resolver to something that includes the packages and versions you are looking for (if such a resolver is available).






share|improve this answer






















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53311370%2fwhat-is-the-relationship-between-dependency-constraints-in-stack-configuration%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    In...




    easytest-0.2 from stack configuration does not match ==0.2.1




    ... the "stack configuration" means the set of packages specified through the resolver (typically a Stackage snapshot -- you can find lists of packages and versions in a snapshot at the Stackage site) and the extra-deps in stack.yaml, while the ==0.2.1 constraint is what your .cabal file is asking. The suggestions given by the error message (ignoring .cabal upper bounds with allow-newer, and adding packages to extra-deps) are appropriate in the cases in which you want, or need, to build with a specific resolver. If that is not the case (say, if you are trying to update an old project to a recent LTS snapshot), you can also change the resolver to something that includes the packages and versions you are looking for (if such a resolver is available).






    share|improve this answer



























      2














      In...




      easytest-0.2 from stack configuration does not match ==0.2.1




      ... the "stack configuration" means the set of packages specified through the resolver (typically a Stackage snapshot -- you can find lists of packages and versions in a snapshot at the Stackage site) and the extra-deps in stack.yaml, while the ==0.2.1 constraint is what your .cabal file is asking. The suggestions given by the error message (ignoring .cabal upper bounds with allow-newer, and adding packages to extra-deps) are appropriate in the cases in which you want, or need, to build with a specific resolver. If that is not the case (say, if you are trying to update an old project to a recent LTS snapshot), you can also change the resolver to something that includes the packages and versions you are looking for (if such a resolver is available).






      share|improve this answer

























        2












        2








        2







        In...




        easytest-0.2 from stack configuration does not match ==0.2.1




        ... the "stack configuration" means the set of packages specified through the resolver (typically a Stackage snapshot -- you can find lists of packages and versions in a snapshot at the Stackage site) and the extra-deps in stack.yaml, while the ==0.2.1 constraint is what your .cabal file is asking. The suggestions given by the error message (ignoring .cabal upper bounds with allow-newer, and adding packages to extra-deps) are appropriate in the cases in which you want, or need, to build with a specific resolver. If that is not the case (say, if you are trying to update an old project to a recent LTS snapshot), you can also change the resolver to something that includes the packages and versions you are looking for (if such a resolver is available).






        share|improve this answer













        In...




        easytest-0.2 from stack configuration does not match ==0.2.1




        ... the "stack configuration" means the set of packages specified through the resolver (typically a Stackage snapshot -- you can find lists of packages and versions in a snapshot at the Stackage site) and the extra-deps in stack.yaml, while the ==0.2.1 constraint is what your .cabal file is asking. The suggestions given by the error message (ignoring .cabal upper bounds with allow-newer, and adding packages to extra-deps) are appropriate in the cases in which you want, or need, to build with a specific resolver. If that is not the case (say, if you are trying to update an old project to a recent LTS snapshot), you can also change the resolver to something that includes the packages and versions you are looking for (if such a resolver is available).







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 15 '18 at 4:01









        duplodeduplode

        23k44886




        23k44886





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53311370%2fwhat-is-the-relationship-between-dependency-constraints-in-stack-configuration%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            How to read a connectionString WITH PROVIDER in .NET Core?

            Museum of Modern and Contemporary Art of Trento and Rovereto

            In R, how to develop a multiplot heatmap.2 figure showing key labels successfully