-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
content: replace deprecated CUE_MODCACHE with new CUE_CACHE_DIR env var #453
Closed
Conversation
This file contains 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
This adds a howto explaining the use of default values, and their behaviour across some non-standard scenarios. It also adds a glossary entry for default values. For: cue-lang/docs-and-content#104 Change-Id: Ib400a81e14753c48857b06a8f90d6c9633504650 Preview-Path: /docs/howto/specify-a-default-value-for-a-field/ Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1167624 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Also fix the duplicate entries for 'language', by replacing one with 'tooling' (which was most likely the original intention; even if not we need that tag). Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I9e50bd14d6f13682c57e04c82295dcc7b8d1b16a Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1169718 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
Commented CUE demonstrating enforcing that a string contain only representations of integers. It doesn't cover allowing SI/etc suffixes inside the int-as-string because I'm not sure how to achieve that, and strconv.Atoi() doesn't cater for any such suffixes. Closes cue-lang/docs-and-content#102 Change-Id: Id3b088425d2be9bce6ebc753b56fa0bf84c0a8b2 Preview-Path: /docs/howto/constrain-string-as-valid-integer/ Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1167749 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
This adds a page explaining How-to Guides, and their Commented CUE subset. Fixes: cue-lang/docs-and-content#114 For: cue-lang/docs-and-content#77 Preview-Path: /docs/howto/about-these-guides/ Change-Id: I231f0f6c0c5f3ebd7b24b103bba71e4662cb460f Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1168148 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
We should really default this value using CUE. For now set by hand when we forget to do it. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I8c8d47322335bb2e160d69b7d8353d7192f39da9 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1169723 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
It can happen that if we submit a change that branched at a point before a more recent preprocessor change, then the cache file will be stale. A submit queue would ultimately fix this, but for now we fix up by hand. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I811170ff50123687c129a33967add87678cb47e4 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1169725 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
Add a landing page for /tutorials (after a Netlify redirect). For: cue-lang/docs-and-content#77 Preview-Path: /docs/tutorial/about-these-tutorials/ Change-Id: Ifbb6149039dbf72af49f7bbd0b3277e400a3d546 Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1168944 Reviewed-by: Paul Jolly <paul@myitcv.io> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
A rushed previous change did not allow the #location tag to take precedence when it should have done. The earlier change was bad because we didn't include some basic tests in the interest's of time. Lesson learned, not that it needed to be emphasised! Actually add a test for the 3-file version in this CL to get some coverage. Again, only look at the Go code with your eyes shut. Signed-off-by: Paul Jolly <paul@myitcv.io> Preprocessor-No-Write-Cache: true Change-Id: I78d923a0d5fa7531af055bd29268be8eec64a62d Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1169726 Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Commented CUE demonstrating optional field constraints. For cue-lang/docs-and-content#99 Change-Id: Icbdb2f1702f502e59e1f570ecc2e113ab79a99ac Preview-Path: /docs/howto/mark-a-field-as-optional/ Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1167621 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Paul Jolly <paul@myitcv.io>
Following earlier Preprocessor-No-Write-Cache change. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I73d7aafea200e21d86ae511549f3c8cca827fa07 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1169727 Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Commented CUE demonstrating both byte- and rune-based examples of constraining a string's length. The South Korean Hangul characters are the word "Hangul", as copied from Wikipedia: https://en.wikipedia.org/wiki/Hangul. For cue-lang/docs-and-content#124 Preview-Path: /docs/howto/constrain-the-length-of-a-string/ Change-Id: If6a179f1d752fab15dd8e10b5e78ee1262f2fa80 Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1168891 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Paul Jolly <paul@myitcv.io>
Commented CUE demonstrating required field constraints. For cue-lang/docs-and-content#98. Change-Id: If100fe9f86228e1010b37a5a3df20f232c99c176 Preview-Path: /docs/howto/mark-a-field-as-required/ Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1167609 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Add a landing page for /concept (after a Netlify redirect). Change-Id: Iad5bc66353f3f929f96051cb3a3472d5ba6dc692 Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1168945 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Paul Jolly <paul@myitcv.io>
Content containing any such nesting currently gets passed through a markdown-to-HTML renderer twice, which looks bad. Tracked as https://linear.app/usmedia/issue/CUE-312 Change-Id: Idfd1245060481bcf684a2d4c21f237463c273b6c Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Preview-Path: /examples/shortcodes/tabs/ Preview-Path: /examples/shortcodes/code-tabs/ Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1167771 Reviewed-by: Paul Jolly <paul@myitcv.io> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Chief Cueckoo <chief.cueckoo@gmail.com>
This change unifies our handling of install-related URLs/docs, suitable for go-live, but allowing each affected URL to have unique content written for it as & when we choose. It does this by: - re-enabling Hugo's "aliases" (client-side redirects) - teaching /docs/introduction/installation that it has these aliases: - /docs/install - /download - /install - /dl - removing the Netlify-level redirection of /download to /docs/install (which was a 404 until this change) These aliases' redirections will get overwritten by any page content that's created for the above 4 URLs in the future, as per https://gohugo.io/content-management/urls/#how-aliases-work. So, *unlike* the Netlify redirect, future content authors won't have to figure out why content added at /download doesn't get served. There should be no SEO impact, as the client-side redirect provides a "canonical" link element alongside a meta robots element that should stop the alias getting indexed. The only consumer who will be affected by this change will be those using user-agents that don't follow or expose meta-based redirections (`http-equiv="refresh"`), such as Curl. Given the human-centric nature of this page's content, this doesn't seem onerous. For: cue-lang/docs-and-content#52 For: cue-lang/docs-and-content#63 Preview-Path: /docs/install Preview-Path: /download Preview-Path: /install Preview-Path: /dl Change-Id: I99a04f6a1520dd309f1cc00751ac00abc31e7b28 Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1168925 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Paul Jolly <paul@myitcv.io>
Commented CUE demonstrating how to constrain a numerical list's sum. For cue-lang/docs-and-content#105 Change-Id: Ie12f03b6ab1a069597f1a05c2e5e0c11a924b2a4 Preview-Path: /docs/howto/constrain-the-sum-of-a-list-of-numbers/ Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1167754 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Paul Jolly <paul@myitcv.io>
This sets toc_hide for some howto guides that are currently visible in the LH nav, but shouldn't be. Preview-Path: /docs/howto/ Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Change-Id: I1892a728f50db9f00841760ee20318d4009acd05 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1169733 Reviewed-by: Paul Jolly <paul@myitcv.io> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
We were using a matrix build with only a single entry, which made for rather a confusing setup. Switch to not use a matrix-based bulid, which means we only have a single "matrix" entry for trybots, and hence the concept of "isLatestLinux" disappears. We also remove references to latestStableGo; for the trybot workflow, because we are "publishing" the generated static site, we want reproducibility. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I91a851119c10f886f68634e1f0d832205ee5aaad Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1169845 Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
This invalidates the cache files because the Go major version is included as part of the "hash of self" calculation within the preprocessor, hence we trigger cache misses for each page, and gen_cache.cue files are updated in this CL too. Note however that there is no change in the hugo/content directory structure. Note we also update the Dockerfile to be consistent with the version of Go used in CI. In a later CL we will ensure consistency as required for the Go version, CUE version etc, but for now we just updated by hand. Note that because we are cache busting with this change to the effective hash of the preprocessor, all outstanding CLs/PRs that touch content will need to be rebased after this is merged. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I2bf48a741668742fc248b2efa2844ef59ec7314b Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1169843 Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Preprocessor-No-Write-Cache: true Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I9c7bc08c5e8997faee76c248b8287a8abe18e8af Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1170105 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
This allows us to maintain a clearer single config graph. Signed-off-by: Paul Jolly <paul@myitcv.io> Preprocessor-No-Write-Cache: true Change-Id: I0e2e5ae5a3fcbccd8e657bbdd046b97bc94b6e7e Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1170106 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
There can be multiple sidebyside nodes in a guide. When validating nodes in a guide, we validate them sequentially, but want to report all errors in the file rather than stopping at the first error in the first node (such behaviour would not be helpful to the author of a guide). As such, the signature of validatingNode.validate() was not helpful: validate() error This suggested that the callee should return an error, probably the first error, rather than recording errors against the implementer of validate(). errorContext exists for just this purpose: to allow the implementer to record multiple errors, and then have the caller check $implementer.isInError(). Make all nodes implement errorContext therefore, and update the validate signature to simply: validate() along with an appropriate comment, to make clear it is the implementer's job to record errors. This requires us to fix validate() implementations in a couple of places, recording errors instead of returning them, and making explicit where we return early in some situations (because later validation requires certain preconditions to hold). The one test change here is the addition of a log message, which confirms we do now report multiple errors in the same file (across multiple nodes). Signed-off-by: Paul Jolly <paul@myitcv.io> Preprocessor-No-Write-Cache: true Change-Id: Ifdbe91f6648a381cf263c3ececb7bc4a8c8f67c9 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1169948 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
This follows the previous change which wrote the cache values to a page configuration value placed under the top-level "content" field. Preprocessor-No-Write-Cache: true Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I568d6cab9e02ae481c7aa77df2a2ab5cf3c9c171 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1170107 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
Our "mode" of loading the configuration for the cuelang.org site involves globbing CUE files found at page roots and presenting all those files to cue/load.Instances. The issue tracking adding more standard modes to cue/load is https://cuelang.org/issue/2018. Our mode of loading also seeks to enforce that a page rooted at content/a/b only declares CUE values under that path: content: a: b: { // ... } This commit adds a --check flag to the execute command that enforces this. It also adds this check to CI to enforce it. Preprocessor-No-Write-Cache: true Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: Id963877e586b230f221b2e7843dc48471e86d1b7 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1170108 Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Following earlier Preprocessor-No-Write-Cache change. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: If49902fe89713d360f01313c2503e52bad41647b Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1170109 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
This got missed from https://cuelang.org/cl/1170108. As did the fact that --check should cause execute to return early, regardless of error state. If there is an error we should report it. If there is not an error we should _not_ proceed to execute the preprocessor. --check is like a vet check. Indeed it should probably live under a separate command, but that is for another day. Preprocessor-No-Write-Cache: true Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I41f0cd00201d3f0fef30db554ccdfda41db56e69 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1170149 Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Following earlier Preprocessor-No-Write-Cache change. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I2c81bbcf28f7c5e54478eafaea79011040046c4c Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1170150 Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
As a further experiment, switch to using writefs, which is copied by hand into this repo as an internal command. There is no speed advantage to using it, rather it is a usability and readability win. Kicking the tyres with it more in this repo will help to see whether the pattern works or not. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: Ia9203e2138ad74947ba49614df3298d84b7aa860 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1170145 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
In a later change we move logic for removal of target files (in hugo/content) to the preprocessor instead of a script. In preparation for that, move all golden files to a directory outside of hugo/content, but a directory structure that matches in shape for ease of visual scanning, organisation etc (rather than random files in a random location). Also establish hugo/.keep in txtar tests as a way of keep that directory "alive". Therefore ignore .keep files as well as .golden files in the "find" test command. As part of this change we can also remove the .golden extension, now that all golden files are in a golden directory. Don't stutter in that respect. This allows us to remove a special case in cmd-find which ignored golden files. Now the only files that are ignored are the .keep files mentioned above, which exist in order to "template" directories at the start of the test. We also make cmd-find more specific in only listing the contents of hugo and content directories, the two directories under the "control" of the preprocessor. We can ignore everything else. Preprocessor-No-Write-Cache: true Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I37f5d8ed336e277120be5ba851146380f7642c28 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1170169 Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
The logic to remove hugo/content and _public in _scripts/runPreprocessor.bash is too fragile. We have one exception rule already and in a later CL we would add another. This proves the logic does not belong here, and would actually be better placed (as coarse as it is) in the preprocessor itself. Make that change. Also turn off -x logging in _scripts/runPreprocessor.bash, and remove an old rm artefact from _scripts/build.bash. Note that we now fully rely on hugo removing _public, via the --cleanDestinationDir flag. This again seems like the right thing to do, rather than trying to code the logic (and timing) ourselves. Preprocessor-No-Write-Cache: true Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I602f422163192e97e5400c1326c2199ee2921c30 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1170170 Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Fix up build.bash to set --nocachevolume on Netlify. Indeed fix up the script to be easier to read, with sensible safe defaults (for Netlify), and comments for any adjustments. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: Ibadf30047fba2833791690c4428438b5fd6134fe Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177095 Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com> TryBot-Result: CUEcueckoo <cueckoo@gmail.com>
Policy mode is not yet finished. This change disables the mode until it's complete. Preview-Path: /play Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Change-Id: I91c251fedf0eab2aee1891c0196c3f520f5c328d Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177139 TryBot-Result: CUEcueckoo <cueckoo@gmail.com> Reviewed-by: Paul Jolly <paul@myitcv.io>
Verified the commit is complete locally with: go generate ./... ./_scripts/buildDockerImage.bash CUE_UPDATE=1 go test -run TestScripts/execute_multistagescript ./internal/cmd/preprocessor/cmd go test ./... ./_scripts/runPreprocessor.bash execute --update We set Preprocessor-No-Write-Cache in order that we don't lose real diffs in a sea of gen_cache.cue updates. Preprocessor-No-Write-Cache: true Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I1c74aba06cf5c779a8a3d019dbd7791f84cf6a37 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177160 Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com> TryBot-Result: CUEcueckoo <cueckoo@gmail.com>
Following earlier Preprocessor-No-Write-Cache changes. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I090265690fd3d41bff41a784ce8bdd78f7e5ecb9 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177162 Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com> TryBot-Result: CUEcueckoo <cueckoo@gmail.com>
Some organizations don't allow the use of docker. Closes cue-lang#452 as merged as of commit 18ad64a. Preview-Path: /docs/reference/modules Signed-off-by: David Gamba <davidgamba@gmail.com> Change-Id: I99dbba4f64deb74f3c5666775979fe4111fca8da Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177163 TryBot-Result: CUEcueckoo <cueckoo@gmail.com> Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
Now that we have an append-only version of cue mod registry, we should switch to recommending that as the default. Which has the added benefit of meaning that we can drop a pre-requisite. However for those more familiar/comfortable with existing container-based setups, we still recommend docker, and in the spirit of https://cuelang.org/cl/1177163, we add mention of podman. It might be that with time we push such "detail" to another document, but for now it's fine in the modules tutorial. Preview-Path: /docs/tutorial/working-with-a-custom-module-registry Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I04de4d35515fa7f4cced881cd70ebe065ffc7093 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177164 Reviewed-by: Roger Peppe <rogpeppe@gmail.com> TryBot-Result: CUEcueckoo <cueckoo@gmail.com>
This removes a noisy set-x that was mistakenly included in f982fd5. Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Change-Id: I181e67ccd176c1d2acc3cf3055ad4a238e54e2be Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177296 TryBot-Result: CUEcueckoo <cueckoo@gmail.com> Reviewed-by: Paul Jolly <paul@myitcv.io>
Remove Istio as they have moved away from using CUE. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: Ieb316205d2fe4aba1ed92c1d9d4a0dc493e5c364 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177438 Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com> TryBot-Result: CUEcueckoo <cueckoo@gmail.com>
In https://cuelang.org/cl/1177418 we fix up the site schema to make 'page' an optional field, which it should be. This allows us to enforce that a page root also properly defines some config at that path, by explicitly defining a 'page' field, rather than implicitly at a branch as currently happens by virtue of the current site schema where 'page' is a regular field and leaves below a branch in effect bring a 'page' field into existence without requiring one to be explicitly declared. Most of the changes in this CL are modifications to existing page.cue files, adding the 'page' field explicitly, and simplifying the path specification. The page.cue files that are added are for pages that would otherwise cause an error in the presence of the schema changes in https://cuelang.org/cl/1177418. i.e. they are situations where we are missing an explicit page configuration at the respective path. For cue-lang/cue#2871. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I2f1541a7dd47c0a9373dee2c5a6b5f16c95aae98 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177417 TryBot-Result: CUEcueckoo <cueckoo@gmail.com> Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
Per the explanation in https://cuelang.org/cl/1177417, this allows us to enforce that a page root must declare a 'page' field at the relevant path. Fixes cue-lang/cue#2871. Preprocessor-No-Write-Cache: true Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I09f6263e72fe5f17d36570f6e1bb68a04f64ef38 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177418 TryBot-Result: CUEcueckoo <cueckoo@gmail.com> Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
Following earlier Preprocessor-No-Write-Cache changes. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: Id78a6968f7bee4d29c2980d8db08cb07dd9af16d Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177419 TryBot-Result: CUEcueckoo <cueckoo@gmail.com> Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
This change removes any trailing spaces or newlines generated by the `linkto/related/*` shortcodes. This allows punctuation to be placed immediately after the shortcode, without including a space before the punctuation. Before this change, this source: {{< linkto/related/howto "bar" >}}. ... rendered as: How-to Guide: _bar_ . ... and now renders as: How-to Guide: _bar_. Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Change-Id: Ic66bb60e948d371ac04ab6c343a69d2041f98ee2 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177491 TryBot-Result: CUEcueckoo <cueckoo@gmail.com> Reviewed-by: Paul Jolly <paul@myitcv.io>
This adds a pair of concept guides that explain how CUE works with JSON and YAML. They adapt some content from docs/integration/{json,yaml}, which will be removed in a follow-up change when docs/integration is rewritten. Content from those pages is reworded and significantly expanded to focus the pages on being self-contained enough to accommodate readers who landed on them from links on the site's front page, and who might not have any wider experience of CUE. Preview-Path: /docs/concept/json/ Preview-Path: /docs/concept/yaml/ Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Change-Id: I39a4657fd7413329c2a287125aa8465c64b42f26 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177313 TryBot-Result: CUEcueckoo <cueckoo@gmail.com> Reviewed-by: Paul Jolly <paul@myitcv.io>
This page doesn't contain any useful information, and info about scripting won't live at this path as & when it's added. Alpha page for deletion review: https://alpha.cuelang.org/docs/concept/scripting-use-case/ Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Change-Id: Ic1400c2d7d2e3be55aab30a528200b14c9105f65 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177492 TryBot-Result: CUEcueckoo <cueckoo@gmail.com> Reviewed-by: Paul Jolly <paul@myitcv.io>
This change makes it clearer for non-hugo-aware developers which flags are in effect during local live-serving of the site. It also adds the visual sugar of a connective equals sign to the flag and its value-which-is-a-hugo-flag, making it clearer that the value-which-is-a-hugo-flag is a *value*, not merely an oddly-quoted flag used by the preprocessor. Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Change-Id: I6f58bfaef93d570357e38cce828b0c509882b1e7 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177554 Reviewed-by: Paul Jolly <paul@myitcv.io> TryBot-Result: CUEcueckoo <cueckoo@gmail.com>
This changes the local development live-serve mode so that Hugo's client-side page refresh logic automatically navigates to the page that was most recently updated. Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Change-Id: I3507e6cd987bb3f1d6545779d43a0c94362c8fe1 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177555 TryBot-Result: CUEcueckoo <cueckoo@gmail.com> Reviewed-by: Paul Jolly <paul@myitcv.io>
Verified the commit is complete locally with: go generate ./... ./_scripts/buildDockerImage.bash CUE_UPDATE=1 go test -run TestScripts/execute_multistagescript ./internal/cmd/preprocessor/cmd go test ./... ./_scripts/runPreprocessor.bash execute --update We set Preprocessor-No-Write-Cache in order that we don't lose real diffs in a sea of gen_cache.cue updates. Preprocessor-No-Write-Cache: true Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I28ae4ff559e4575b19b138fb06a16eff796de016 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177610 Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com> TryBot-Result: CUEcueckoo <cueckoo@gmail.com>
Following earlier Preprocessor-No-Write-Cache changes. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: Ic5fbfcc89950e6ef5769bc38a8296783595fb657 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177611 Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com> TryBot-Result: CUEcueckoo <cueckoo@gmail.com>
In https://cuelang.org/cl/1177417 we added an explicit page field in the config for each page root. In https://cuelang.org/cl/1177418 that followed, we enforced that the field exist. In making those changes, I failed to updated contentNewDocument.bash to teach it about this new requirement. This CL fixes that. Also added a comment in contentNewDocument.bash that says it should really be replaced by Go code where much of the lifting etc is already done (which will also make the command more maintainable). Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: Ia2e69a10b27e3113de5faaed6554b7f9213ceffb Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177613 TryBot-Result: CUEcueckoo <cueckoo@gmail.com> Reviewed-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
✅ Deploy Preview for cue ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Signed-off-by: kharf <kevinfritz210@gmail.com>
myitcv
approved these changes
Mar 2, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thank you!
I will import to GerritHub
cueckoo
pushed a commit
that referenced
this pull request
Mar 2, 2024
Closes #453 as merged as of commit cb9a1af. Fixes cue-lang/cue#2903. Signed-off-by: kharf <kevinfritz210@gmail.com> Change-Id: I34b1c30bb04fa6ab547ebbdaaea078b25118746b
cueckoo
pushed a commit
that referenced
this pull request
Mar 2, 2024
Closes #453 as merged as of commit cb9a1af. Fixes cue-lang/cue#2903. Signed-off-by: kharf <kevinfritz210@gmail.com> Change-Id: I34b1c30bb04fa6ab547ebbdaaea078b25118746b Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177672 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: CUEcueckoo <cueckoo@gmail.com>
@myitcv should I close the pr? |
This was addressed via cue-lang/cue#2903 (comment) |
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.
fixes: cue-lang/cue#2903