Repository navigation
Keep the configure downloads once per machine and retry them (#570) - #585
Merged
Merged
Conversation
The bootstrap environment, the test registry and jasmine-core were downloaded again by every new build tree, in one attempt: a network hiccup stopped the configure, and a second tree on the same machine paid the download again. webfront_download_verified() now serves both provisioners. A download goes to WEBFRONT_DOWNLOAD_CACHE (the environment variable of that name, else CPM's cache, else the user's cache directory for WebFront's own build; a consuming project keeps its downloads in its build tree unless it sets one), under the first half of its SHA-512, written aside and renamed once verified. The build tree then links it, or copies it where a link cannot be made. A failed download is tried three times; data with another digest never reaches the cache or the build tree. BootstrapProvisioning covers the cache: a fill, a second tree served without the source, a damaged entry downloaded again, a wrong digest kept out, and the retries before the offline hint.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 12 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
# Conflicts: # docs/CHANGELOG.md
…ling (#570) - A cache directory that exists but refuses files stopped the configure: file(MAKE_DIRECTORY) succeeds on it, and the download then failed to create its partial file. A verified entry of such a cache now serves without writing, and a download goes to the cache only when a probe file can be created there; otherwise it stays in the build tree with a warning. - The test registry looked for each archive in WEBFRONT_REGISTRY_DIR before the verified copy already in the build tree, so a configure failed once the offline directory was no longer mounted. The verified copy is kept first, as before the cache. BootstrapProvisioning covers both: a read-only cache, empty then holding the entry (POSIX, skipped where the process writes through permissions), and a registry provisioned again after its offline directory went away. Its checks read CMake's wrapped messages on one line.
…ad cache (#570) DEFINED ENV{CPM_SOURCE_CACHE} is true for a variable set to nothing: the default cache then became /webfront-downloads, at the root, even for a consuming project that asked for no shared cache. Every variable that chooses the place (WEBFRONT_DOWNLOAD_CACHE, CPM_SOURCE_CACHE, LOCALAPPDATA, XDG_CACHE_HOME, HOME) now counts only when it has a value, and the choice goes on to the next; -DWEBFRONT_DOWNLOAD_CACHE= still disables the cache. BootstrapProvisioning reads the default cache under an empty CPM_SOURCE_CACHE, an empty WEBFRONT_DOWNLOAD_CACHE and both set.
…570) The read-only cache keeps the case that stopped the configure, and the default cache the case of an empty CPM_SOURCE_CACHE; the other combinations repeated what those prove. All of them stay inside BootstrapProvisioning: no CTest case is added.
A damaged entry is replaced by the same download that fills the cache, and a wrong digest is refused by the same verification with or without a cache: the fill and the second build tree served from the cache remain.
AM-L
approved these changes
Nov 15, 2026
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.
Point 4 de la proposition faite dans #570 : les téléchargements de la configuration.
Problème
Avec
WEBFRONT_ENABLE_TESTING=ON, la configuration télécharge l'environnement d'amorçage épinglé (4 Mo), les paquets du registre de test (16 Mo) et, pour les projets consommateurs,jasmine-core. Deux défauts :Aucun test ne télécharge quoi que ce soit à l'exécution : seule la configuration est concernée.
Changement
webfront_download_verified()sert désormais les deux mécanismes de téléchargement (webfront_provision_bootstrapetwebfront_provision_registry).WEBFRONT_DOWNLOAD_CACHE. Par ordre de priorité : la variable d'environnement de ce nom, sinon$CPM_SOURCE_CACHE/webfront-downloads, sinon le répertoire de cache de l'utilisateur pour le build de WebFront lui-même. Un projet consommateur garde ses téléchargements dans son arbre de build, sauf s'il en définit un. Une valeur vide désactive le cache.Vérification
BootstrapProvisioningcouvre :Avec l'ancien
WebFrontBootstrap.cmake, il échoue sur ces cas.Essai réel sous Windows : deux configurations neuves dans deux répertoires distincts. La première remplit le cache, la seconde prend 13 s au lieu de 20 s, et ses archives sont des liens physiques vers le cache.
Suite complète Windows (MSVC Release, WebView2, hors
portability) : 175 cas sur 176 passent. Le seul échec,ReleaseDeveloperWorkflowRegression, existait déjà : lebashde WSL ne voit pas le script sousC:/.Non exécuté localement : Linux et macOS, couverts par la CI de la PR. La CI garde son
actions/cachedes archives : un arbre qui contient déjà l'archive vérifiée n'utilise pas le cache par machine.Part of #570.