<p><b>@cbeams</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/3718#discussion_r354500885">Makefile</a>:</p>
<pre style='color:#555'>> +    # fails to bind to one of the listed block notification ports
+       echo exit 0 >> .localnet/bitcoind/blocknotify
+
+# Alias '.localnet' to 'localnet' so the target is discoverable in tab
+# completion
+localnet: .localnet
+
+# Deploy a complete localnet by running all required Bitcoin and Bisq
+# nodes, each in their own named screen window. If you are not a screen
+# user, you'll need to manually run each of the targets listed below
+# commands manually in a separate terminal or as background jobs.
+deploy: setup
+       # create a new screen session named 'localnet'
+       screen -dmS localnet
+       # deploy each node in its own named screen window
+       targets=('bitcoind' 'seednode' 'seednode2' 'alice' 'bob' 'mediator'); \
</pre>
<blockquote>
<p>Doing a clean-rebuild takes a very long time and is not practical for quick iteration cycles.</p>
</blockquote>
<p>Here's what I'm doing in practice as I develop stuff. The following assumes I have already done a <code>make deploy</code>, and that now I'm iterating on something, using my <code>alice</code> desktop node to see my changes live:</p>
<pre><code># quit my running `alice` node, e.g. with CMD-Q in the UI or ^C on the running process
./gradlew :desktop:build && make alice
</code></pre>
<p>This picks up and rebuilds just the changes I've made and then deploys those new bits as <code>alice</code>.</p>
<blockquote>
<p>Couldn't we ensure somehow that the build runs just once before deploying the individual nodes.</p>
</blockquote>
<p>It does effectively run just once. The individual node deployment targets, e.g. <code>alice</code> and <code>bob</code> depend on <code>build</code>. Note that build is, in the latest commits, actually included once again in PHONY, so it does run every time, but that target just depends on the more specific <code>desktop/build</code> and <code>seednode/build</code> targets, which in turn run only if their respective directories do <em>not</em> already exist. The effect here is that when we deploy more than one node or all of them via <code>make deploy</code>, the <code>{desktop|seednode}/build</code> targets get run once and only once, avoiding the above mentioned race condition and inefficient contention for Gradle resources. If you want to cause a fast (incremental) rebuild, it's simply necessary to drop down to calling gradle directly like I've shown above. calling <code>make clean-build</code> should not be necessary in any case, unless you actually want to blow away all the build directories.</p>
<blockquote>
<p>Is there a significant advantage of having all the individual node commands depend on setup/build that I'm missing?</p>
</blockquote>
<p>It just ensures that deploying any given node causes <code>build</code> and <code>localnet</code> to run if they have not already done so. So someone can come along in a clean checkout and run only <code>make bitcoind</code> and <code>make seednode</code> and everything will work as they expect, meaning that the .localnet dir will get created and the seednode build will run. If that's already happened, then those targets are no-ops.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/3718?email_source=notifications&email_token=AJFFTNTHNWCFBVJ633C75H3QXFIDFA5CNFSM4JTEFEKKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOE3I4Y#discussion_r354500885">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNVANHG5NDCCOHA5ZE3QXFIDFANCNFSM4JTEFEKA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNSNRPBJ6DTO5KH7KX3QXFIDFA5CNFSM4JTEFEKKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOE3I4Y.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/3718?email_source=notifications\u0026email_token=AJFFTNTHNWCFBVJ633C75H3QXFIDFA5CNFSM4JTEFEKKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOE3I4Y#discussion_r354500885",
"url": "https://github.com/bisq-network/bisq/pull/3718?email_source=notifications\u0026email_token=AJFFTNTHNWCFBVJ633C75H3QXFIDFA5CNFSM4JTEFEKKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOE3I4Y#discussion_r354500885",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>