fix(server): guard status.html post-build on dflash_server target (unblock CI)#351
Merged
Conversation
PR #322 added an unconditional add_custom_command(TARGET dflash_server) plus install() to copy status.html next to the binary. PR #294 had made dflash_server conditional on find_package(CURL) so the build still succeeds without libcurl-dev (the CI "Build dflash" job runs without it). When CURL is absent the target is skipped, but the post-build copy still references it, producing a hard configure error: No TARGET 'dflash_server' has been created in this directory. Wrap the add_custom_command + install in if(TARGET dflash_server) so the status.html wiring is only emitted when the target actually exists. Verified on a clean main checkout (lucebox2, CUDA 12.6): - configure with CURL force-disabled: was "Configuring incomplete" with the missing-target error; now "Configuring done", target cleanly skipped. - configure with CURL present: dflash_server target still created and status.html copy wired up. Co-Authored-By: WOZCODE <contact@withwoz.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
mainfails the CI Build (cmake + uv sync --extra megakernel) → Build dflash (smoke + server) step at configure time:(e.g. run 27104177622, surfaced on #322's CI.)
Root cause — interaction of two already-merged PRs
The CI "Build dflash" job runs without libcurl-dev by design (
ci.yml: "Server unit tests require libcurl-dev; skipped when CURL is absent").fix(ci): make CURL optional) made the server target conditional so a no-libcurl box wouldn't break:ensure status.html is found from build directory) then added the status.html copy after thatendif(), outside the guard:Neither change is wrong alone. Combined on
main, when CURL is absent the target is skipped but the post-build copy still references it → hard configure error.Fix
Wrap the post-build copy +
installinif(TARGET dflash_server)so they are only emitted when the target exists. This matches #294's intent (a no-CURL build simply skips the server and its post-build steps).Verification (clean
maincheckout, lucebox2, CUDA 12.6)Reproduced the exact CI error with
-DCMAKE_DISABLE_FIND_PACKAGE_CURL=ONon pristinemain, then confirmed this patch fixes it:No TARGET 'dflash_server'→ Configuring incompletedflash_servertarget created, status.html copied🧙 Built with WOZCODE