From 37554eff7e914559653e7170071665e45d351044 Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Tue, 26 Aug 2025 20:13:35 +0700 Subject: [PATCH 1/2] fix(docs): fix local builds with earthly and Just --- specs/Earthfile | 19 +++++++++++++++++++ specs/Justfile | 10 ++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/specs/Earthfile b/specs/Earthfile index e6c010f0707..2ee110aa9c2 100644 --- a/specs/Earthfile +++ b/specs/Earthfile @@ -23,10 +23,21 @@ src: SAVE ARTIFACT signed_doc.json +# Regenerate the json spec file. +regenerate-json: + FROM +src + # Make sure keys are sorted so its both reproducible, AND diffs easily. + RUN cd definitions; \ + cue export -f -s ./signed_docs/docs:signed_docs --out json | jq -S > ../signed_doc.json + + SAVE ARTIFACT --keep-ts signed_doc.json + # Regenerate the full signed document specification json file. regenerate: FROM +src + COPY +regenerate-json/signed_doc.json . + # Make sure keys are sorted so its both reproducible, AND diffs easily. RUN cd definitions; \ cue export -f -s ./signed_docs/docs:signed_docs --out json | jq -S > ../signed_doc.json @@ -37,6 +48,12 @@ regenerate: SAVE ARTIFACT --keep-ts signed_doc.json SAVE ARTIFACT --keep-ts ../gen gen +regenerate-local-json: + FROM +regenerate-json + + SAVE ARTIFACT signed_doc.json AS LOCAL signed_doc.json + + regenerate-local: FROM +regenerate @@ -48,6 +65,8 @@ regenerate-local: check: FROM +src RUN cue fmt --check -s --files ./definitions + RUN cd definitions; \ + cue vet ./cddl RUN cd definitions; \ cue vet ./signed_docs/docs:signed_docs ../signed_doc.json diff --git a/specs/Justfile b/specs/Justfile index 632895d4009..b6ea2e8cf0d 100644 --- a/specs/Justfile +++ b/specs/Justfile @@ -3,7 +3,7 @@ # Developer convenience functions # required to get cuelang to enable file embedding -export CUE_EXPERIMENT := "embed" +export CUE_EXPERIMENT := "evalv3=0" default: @just --list --unsorted @@ -19,16 +19,14 @@ format: # Check the signed document cue files are valid. check: format - cd definitions; cue vet ./signed_docs/docs:signed_docs -c - cd definitions; cue vet ./form_template/elements:form_template -c + earthly +check # Regenerate the full signed document specification json file. regenerate-signed-doc-json: - # Make sure keys are sorted so its both reproducible, AND diffs easily. - cd definitions; cue export -f -s ./signed_docs/docs:signed_docs --out json | jq -S > ../signed_doc.json + earthly +regenerate-local-json # Fix and Check Markdown files -regenerate: check regenerate-signed-doc-json validate && validate-docs +regenerate: earthly +regenerate-local rm -rf "../docs/src/architecture/08_concepts/signed_doc" mv temp_gen "../docs/src/architecture/08_concepts/signed_doc" From 6bb0cf8df73e3554ede978721ff8cd0a12f38a3c Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Tue, 26 Aug 2025 20:25:44 +0700 Subject: [PATCH 2/2] fix(docs): Remove CDDL from checks until we actually have it --- specs/Earthfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/Earthfile b/specs/Earthfile index 2ee110aa9c2..537a67e7c5c 100644 --- a/specs/Earthfile +++ b/specs/Earthfile @@ -65,8 +65,8 @@ regenerate-local: check: FROM +src RUN cue fmt --check -s --files ./definitions - RUN cd definitions; \ - cue vet ./cddl + # RUN cd definitions; \ + # cue vet ./cddl RUN cd definitions; \ cue vet ./signed_docs/docs:signed_docs ../signed_doc.json