Skip to content

Commit

Permalink
Avoid overflow with stack build error message
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Nov 29, 2023
1 parent 78a182d commit 113a093
Showing 1 changed file with 84 additions and 64 deletions.
148 changes: 84 additions & 64 deletions posts/2023-11-29-updo-steps.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,17 @@ <h1 id="projects-before-and-after">Projects, Before and After</h1>
<p>Before conversion, the Stack project doesn’t build<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> but Updo conversion will
fix that by keeping both default projects in sync with an upstream
configuration.</p>
<blockquote>
<div class="note">
<div class="title">
<p>Note</p>
</div>
<p>A different approach is mirroring, where one project is maintained,
parsed and mirrored to the other one. There are two tools that do this:</p>
<ul>
<li><a href="https://github.com/iconnect/cabal2stack">cabal2stack</a> converts a Cabal project to Stack.</li>
<li><a href="https://github.com/hasufell/stack2cabal">stack2cabal</a> converts a Stack project to Cabal.</li>
<li><a href="https://github.com/iconnect/cabal2stack">cabal2stack</a> converts a Cabal project to Stack</li>
<li><a href="https://github.com/hasufell/stack2cabal">stack2cabal</a> converts a Stack project to Cabal</li>
</ul>
</div>
</blockquote>
<p>After conversion we can build Cabal with Cabal itself as before but now we can
also build it with Stack!</p>
<pre class="pre"><code>$ cabal clean
Expand Down Expand Up @@ -435,57 +433,69 @@ <h1 id="conversion-steps">Conversion Steps</h1>
<li id="fn1"><p>The Stack project fails to construct a build plan.</p>
<pre class="pre"><code>$ stack build --test --no-run-tests --bench --no-run-benchmarks

Warning: Ignoring cabal-install's bounds on directory (&gt;=1.3.7.0 &amp;&amp; &lt;1.4) and using directory-1.3.6.0.
Reason: allow-newer enabled.
Warning: Ignoring cabal-install's bounds on
directory (&gt;=1.3.7.0 &amp;&amp; &lt;1.4) and using directory-1.3.6.0.
Reason: allow-newer enabled.

Warning: Ignoring hackage-security's bounds on Cabal (&gt;=1.14 &amp;&amp; &lt;1.26 || &gt;=2.0 &amp;&amp; &lt;2.6 || &gt;=3.0 &amp;&amp; &lt;3.7) and using Cabal-3.11.0.0.
Reason: allow-newer enabled.
Warning: Ignoring hackage-security's bounds on
Cabal (&gt;=1.14 &amp;&amp; &lt;1.26 || &gt;=2.0 &amp;&amp; &lt;2.6 || &gt;=3.0 &amp;&amp; &lt;3.7) and
using Cabal-3.11.0.0.
Reason: allow-newer enabled.

Warning: Ignoring hackage-security's bounds on Cabal-syntax (&lt;3.7) and using Cabal-syntax-3.11.0.0.
Reason: allow-newer enabled.
Warning: Ignoring hackage-security's bounds on
Cabal-syntax (&lt;3.7) and using Cabal-syntax-3.11.0.0.
Reason: allow-newer enabled.

Warning: Ignoring cabal-install's bounds on process (&gt;=1.6.15.0 &amp;&amp; &lt;1.7) and using process-1.6.13.2.
Reason: allow-newer enabled.
Warning: Ignoring cabal-install's bounds on
process (&gt;=1.6.15.0 &amp;&amp; &lt;1.7) and using process-1.6.13.2.
Reason: allow-newer enabled.

Warning: Ignoring cabal-testsuite's bounds on Cabal (((&gt;=3.10 &amp;&amp; &lt;3.11) &amp;&amp; &gt;=3.11.0.0 &amp;&amp; &lt;3.12) &amp;&amp; &gt;=3.10 &amp;&amp; &lt;3.11) and using
Cabal-3.11.0.0.
Reason: allow-newer enabled.
Warning: Ignoring cabal-testsuite's bounds on
Cabal (((&gt;=3.10 &amp;&amp; &lt;3.11) &amp;&amp; &gt;=3.11.0.0 &amp;&amp; &lt;3.12) &amp;&amp; &gt;=3.10 &amp;&amp; &lt;3.11) and
using Cabal-3.11.0.0.
Reason: allow-newer enabled.

Warning: Ignoring cabal-testsuite's bounds on Cabal-syntax (((&gt;=3.10 &amp;&amp; &lt;3.11) &amp;&amp; &gt;=3.11.0.0 &amp;&amp; &lt;3.12) &amp;&amp; &gt;=3.10 &amp;&amp; &lt;3.11) and using
Cabal-syntax-3.11.0.0.
Reason: allow-newer enabled.
Warning: Ignoring cabal-testsuite's bounds on
Cabal-syntax (((&gt;=3.10 &amp;&amp; &lt;3.11) &amp;&amp; &gt;=3.11.0.0 &amp;&amp; &lt;3.12) &amp;&amp; &gt;=3.10 &amp;&amp; &lt;3.11) and
using Cabal-syntax-3.11.0.0.
Reason: allow-newer enabled.

Warning: Ignoring cabal-testsuite's bounds on retry (^&gt;=0.9.1.0) and using retry-0.8.1.2.
Reason: allow-newer enabled.
Warning: Ignoring cabal-testsuite's bounds on
retry (^&gt;=0.9.1.0) and using retry-0.8.1.2.
Reason: allow-newer enabled.

Error: [S-4804]
Stack failed to construct a build plan.

While constructing the build plan, Stack encountered the following errors. The 'Stack configuration' refers to the set of package
versions specified by the snapshot (after any dropped packages, or pruned GHC boot packages; if a boot package is replaced, Stack
prunes all other such packages that depend on it) and any extra-deps:
While constructing the build plan, Stack encountered the following errors. The
'Stack configuration' refers to the set of package versions specified by the
snapshot (after any dropped packages, or pruned GHC boot packages; if a boot
package is replaced, Stack prunes all other such packages that depend on it) and
any extra-deps:

In the dependencies for cabal-install-3.11.0.0:
* semaphore-compat must match &gt;=1.0.0 &amp;&amp; &lt;1.1, but no version is in the Stack configuration (latest matching version is 1.0.0).
* semaphore-compat must match &gt;=1.0.0 &amp;&amp; &lt;1.1,
but no version is in the Stack configuration (latest matching version is 1.0.0).
needed since cabal-install is a build target.

In the dependencies for cabal-testsuite-3:
* network-wait must match ^&gt;=0.1.2.0 || ^&gt;=0.2.0.0, but no version is in the Stack configuration (latest matching version is
0.2.0.0).
* network-wait must match ^&gt;=0.1.2.0 || ^&gt;=0.2.0.0,
but no version is in the Stack configuration (latest matching version is 0.2.0.0).
needed since cabal-testsuite is a build target.

In the dependencies for Cabal-tests-3:
* nothunks must match &gt;=0.1.1.0 &amp;&amp; &lt;0.2, but no version is in the Stack configuration (latest matching version is 0.1.5).
* nothunks must match &gt;=0.1.1.0 &amp;&amp; &lt;0.2,
but no version is in the Stack configuration (latest matching version is 0.1.5).
needed since Cabal-tests is a build target.

Some different approaches to resolving some or all of this:

* Recommended action: try adding the following to your extra-deps in /home/philderbeast/dev/src/updo/cabal/stack.yaml
(project-level configuration):
* Recommended action: try adding the following to your extra-deps
in /.../cabal/stack.yaml (project-level configuration):

- network-wait-0.2.0.0@sha256:c9fd762f125b46a9fef5ff477b766c7ee38def659cdc05a2add8f4c6830db54a,3031
- nothunks-0.1.5@sha256:ebe6c82d2533851f10fc9c7a045cedbfc2add3c61e7a03ef47aa07c8220de09a,2721
- semaphore-compat-1.0.0@sha256:8ed6242cab5b0e1a8c654424275ac178035d108dfe4d651053947790fcf83017,1181</code></pre>
- network-wait-0.2.0.0@sha256:c9fd76...
- nothunks-0.1.5@sha256:ebe6c8...
- semaphore-compat-1.0.0@sha256:8ed624...</code></pre>
<a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></li>
<li id="fn2"><p>The <code>project-versions.mk</code> filename is a convention we’ve used so far
but you can use any name for this file.<a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
Expand Down Expand Up @@ -585,19 +595,17 @@ <h1 id="projects-before-and-after">Projects, Before and After</h1>
<p>Before conversion, the Stack project doesn’t build<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> but Updo conversion will
fix that by keeping both default projects in sync with an upstream
configuration.</p>
<blockquote>
<div class="note">
<div class="title">
<p>Note</p>
</div>
<p>A different approach is mirroring, where one project is maintained,
parsed and mirrored to the other one. There are two tools that do this:</p>
<ul>
<li><a href="https://github.com/iconnect/cabal2stack">cabal2stack</a> converts a Cabal project to Stack.</li>
<li><a href="https://github.com/hasufell/stack2cabal">stack2cabal</a> converts a Stack project to Cabal.</li>
<li><a href="https://github.com/iconnect/cabal2stack">cabal2stack</a> converts a Cabal project to Stack</li>
<li><a href="https://github.com/hasufell/stack2cabal">stack2cabal</a> converts a Stack project to Cabal</li>
</ul>
</div>
</blockquote>
<p>After conversion we can build Cabal with Cabal itself as before but now we can
also build it with Stack!</p>
<pre class="pre"><code>$ cabal clean
Expand Down Expand Up @@ -907,57 +915,69 @@ <h1 id="conversion-steps">Conversion Steps</h1>
<li id="fn1"><p>The Stack project fails to construct a build plan.</p>
<pre class="pre"><code>$ stack build --test --no-run-tests --bench --no-run-benchmarks

Warning: Ignoring cabal-install's bounds on directory (&gt;=1.3.7.0 &amp;&amp; &lt;1.4) and using directory-1.3.6.0.
Reason: allow-newer enabled.
Warning: Ignoring cabal-install's bounds on
directory (&gt;=1.3.7.0 &amp;&amp; &lt;1.4) and using directory-1.3.6.0.
Reason: allow-newer enabled.

Warning: Ignoring hackage-security's bounds on Cabal (&gt;=1.14 &amp;&amp; &lt;1.26 || &gt;=2.0 &amp;&amp; &lt;2.6 || &gt;=3.0 &amp;&amp; &lt;3.7) and using Cabal-3.11.0.0.
Reason: allow-newer enabled.
Warning: Ignoring hackage-security's bounds on
Cabal (&gt;=1.14 &amp;&amp; &lt;1.26 || &gt;=2.0 &amp;&amp; &lt;2.6 || &gt;=3.0 &amp;&amp; &lt;3.7) and
using Cabal-3.11.0.0.
Reason: allow-newer enabled.

Warning: Ignoring hackage-security's bounds on Cabal-syntax (&lt;3.7) and using Cabal-syntax-3.11.0.0.
Reason: allow-newer enabled.
Warning: Ignoring hackage-security's bounds on
Cabal-syntax (&lt;3.7) and using Cabal-syntax-3.11.0.0.
Reason: allow-newer enabled.

Warning: Ignoring cabal-install's bounds on process (&gt;=1.6.15.0 &amp;&amp; &lt;1.7) and using process-1.6.13.2.
Reason: allow-newer enabled.
Warning: Ignoring cabal-install's bounds on
process (&gt;=1.6.15.0 &amp;&amp; &lt;1.7) and using process-1.6.13.2.
Reason: allow-newer enabled.

Warning: Ignoring cabal-testsuite's bounds on Cabal (((&gt;=3.10 &amp;&amp; &lt;3.11) &amp;&amp; &gt;=3.11.0.0 &amp;&amp; &lt;3.12) &amp;&amp; &gt;=3.10 &amp;&amp; &lt;3.11) and using
Cabal-3.11.0.0.
Reason: allow-newer enabled.
Warning: Ignoring cabal-testsuite's bounds on
Cabal (((&gt;=3.10 &amp;&amp; &lt;3.11) &amp;&amp; &gt;=3.11.0.0 &amp;&amp; &lt;3.12) &amp;&amp; &gt;=3.10 &amp;&amp; &lt;3.11) and
using Cabal-3.11.0.0.
Reason: allow-newer enabled.

Warning: Ignoring cabal-testsuite's bounds on Cabal-syntax (((&gt;=3.10 &amp;&amp; &lt;3.11) &amp;&amp; &gt;=3.11.0.0 &amp;&amp; &lt;3.12) &amp;&amp; &gt;=3.10 &amp;&amp; &lt;3.11) and using
Cabal-syntax-3.11.0.0.
Reason: allow-newer enabled.
Warning: Ignoring cabal-testsuite's bounds on
Cabal-syntax (((&gt;=3.10 &amp;&amp; &lt;3.11) &amp;&amp; &gt;=3.11.0.0 &amp;&amp; &lt;3.12) &amp;&amp; &gt;=3.10 &amp;&amp; &lt;3.11) and
using Cabal-syntax-3.11.0.0.
Reason: allow-newer enabled.

Warning: Ignoring cabal-testsuite's bounds on retry (^&gt;=0.9.1.0) and using retry-0.8.1.2.
Reason: allow-newer enabled.
Warning: Ignoring cabal-testsuite's bounds on
retry (^&gt;=0.9.1.0) and using retry-0.8.1.2.
Reason: allow-newer enabled.

Error: [S-4804]
Stack failed to construct a build plan.

While constructing the build plan, Stack encountered the following errors. The 'Stack configuration' refers to the set of package
versions specified by the snapshot (after any dropped packages, or pruned GHC boot packages; if a boot package is replaced, Stack
prunes all other such packages that depend on it) and any extra-deps:
While constructing the build plan, Stack encountered the following errors. The
'Stack configuration' refers to the set of package versions specified by the
snapshot (after any dropped packages, or pruned GHC boot packages; if a boot
package is replaced, Stack prunes all other such packages that depend on it) and
any extra-deps:

In the dependencies for cabal-install-3.11.0.0:
* semaphore-compat must match &gt;=1.0.0 &amp;&amp; &lt;1.1, but no version is in the Stack configuration (latest matching version is 1.0.0).
* semaphore-compat must match &gt;=1.0.0 &amp;&amp; &lt;1.1,
but no version is in the Stack configuration (latest matching version is 1.0.0).
needed since cabal-install is a build target.

In the dependencies for cabal-testsuite-3:
* network-wait must match ^&gt;=0.1.2.0 || ^&gt;=0.2.0.0, but no version is in the Stack configuration (latest matching version is
0.2.0.0).
* network-wait must match ^&gt;=0.1.2.0 || ^&gt;=0.2.0.0,
but no version is in the Stack configuration (latest matching version is 0.2.0.0).
needed since cabal-testsuite is a build target.

In the dependencies for Cabal-tests-3:
* nothunks must match &gt;=0.1.1.0 &amp;&amp; &lt;0.2, but no version is in the Stack configuration (latest matching version is 0.1.5).
* nothunks must match &gt;=0.1.1.0 &amp;&amp; &lt;0.2,
but no version is in the Stack configuration (latest matching version is 0.1.5).
needed since Cabal-tests is a build target.

Some different approaches to resolving some or all of this:

* Recommended action: try adding the following to your extra-deps in /home/philderbeast/dev/src/updo/cabal/stack.yaml
(project-level configuration):
* Recommended action: try adding the following to your extra-deps
in /.../cabal/stack.yaml (project-level configuration):

- network-wait-0.2.0.0@sha256:c9fd762f125b46a9fef5ff477b766c7ee38def659cdc05a2add8f4c6830db54a,3031
- nothunks-0.1.5@sha256:ebe6c82d2533851f10fc9c7a045cedbfc2add3c61e7a03ef47aa07c8220de09a,2721
- semaphore-compat-1.0.0@sha256:8ed6242cab5b0e1a8c654424275ac178035d108dfe4d651053947790fcf83017,1181</code></pre>
- network-wait-0.2.0.0@sha256:c9fd76...
- nothunks-0.1.5@sha256:ebe6c8...
- semaphore-compat-1.0.0@sha256:8ed624...</code></pre>
<a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></li>
<li id="fn2"><p>The <code>project-versions.mk</code> filename is a convention we’ve used so far
but you can use any name for this file.<a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
Expand Down

0 comments on commit 113a093

Please sign in to comment.