Skip to content

Commit ba726cc

Browse files
jondotAnthonyMichaelTDMclaudedsgallupsGoCoder7
authored
Loco 1.1.0 (#1806)
Tera 2 for templates, valid-YAML configuration files, an open storage API, and an AWS Lambda deployment target. Full detail in CHANGELOG.md. Co-authored-by: Anthony Rubick <68485672+AnthonyMichaelTDM@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Daniel Gallups <dsgallups@protonmail.com> Co-authored-by: GoCoder7 <GoCoder7@users.noreply.github.com> Co-authored-by: Hasan mohamed <hasanmo3080vr@gmail.com> Co-authored-by: Jouke Waleson <jouke@waleson.com> Co-authored-by: Mathieu <mathieu.tanguay871@gmail.com> Co-authored-by: Nam Vũ <namthp99@gmail.com> Co-authored-by: NewtTheWolf <NewtTheWolf@users.noreply.github.com> Co-authored-by: SeaQL <hello@sea-ql.org> Co-authored-by: Thomas Brennetot <thomas@brennetot.com> Co-authored-by: WaterWhisperer <waterwhisperer@users.noreply.github.com> Co-authored-by: Xuanwo <github@xuanwo.io> Co-authored-by: YtimoDeng <tim30935@gmail.com> Co-authored-by: Zihan Jin <admin@zihanjin.com> Co-authored-by: alwayys-afk <alwayys-afk@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: elcoosp <37814441+elcoosp@users.noreply.github.com> Co-authored-by: jtwaleson <jtwaleson@users.noreply.github.com> Co-authored-by: latent-9 <296084221+latent-9@users.noreply.github.com> Co-authored-by: mccormickt <mccormickt@users.noreply.github.com> Co-authored-by: merely <git@merely.ca> Co-authored-by: rob <r@robazzopardi.com> Co-authored-by: zmilan <zmilan@users.noreply.github.com>
1 parent 4b9a943 commit ba726cc

268 files changed

Lines changed: 12147 additions & 6855 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ jobs:
2525
toolchain: ${{ env.RUST_TOOLCHAIN }}
2626
- name: Verify curated LLM docs (llms.txt / llms-full.txt) against docs tree
2727
run: cargo run -p xtask -- llms-check
28+
# Syntax, not types — a snippet truncated mid-expression or missing a
29+
# brace renders perfectly and is wrong. Blocks that are deliberately not
30+
# Rust opt out in the fence meta with a reason.
31+
- name: Check that every Rust doc example parses
32+
run: cargo run -p xtask -- docs-syntax
2833
- name: Compile the docs example app (verified-docs spine)
2934
run: cargo build --manifest-path examples/demo/Cargo.toml
3035
- name: Install zola
@@ -35,8 +40,16 @@ jobs:
3540
run: zola build
3641
working-directory: docs-site
3742
- run: cargo install snipdoc --features exec
43+
# Verifies that every `<snip id=...>` block across the READMEs and the
44+
# docs tree still matches its source in `snipdoc.yml`. `snipdoc check`
45+
# exits 1 on drift, so this is a real gate — it was `continue-on-error`
46+
# for a while, during which it was reporting drift in `README.es.md`
47+
# that nothing acted on.
48+
#
49+
# `SNIPDOC_SKIP_EXEC_COMMANDS` still skips the handful of snippets whose
50+
# source is a shelled-out command (`cargo loco --help`); those need a
51+
# built binary, which this job does not produce.
3852
- run: snipdoc check
39-
continue-on-error: true
4053
env:
4154
SNIPDOC_SKIP_EXEC_COMMANDS: true
4255

@@ -51,13 +64,13 @@ jobs:
5164
- name: Checkout the code
5265
uses: actions/checkout@v7
5366
- name: Install pnpm
54-
uses: pnpm/action-setup@v4
67+
uses: pnpm/action-setup@v5
5568
with:
5669
# The site lives in website/; read its packageManager pin, since
5770
# there is no root package.json.
5871
package_json_file: website/package.json
5972
- name: Install Node
60-
uses: actions/setup-node@v4
73+
uses: actions/setup-node@v7
6174
with:
6275
node-version: 22
6376
cache: pnpm
@@ -68,6 +81,15 @@ jobs:
6881
- name: Unit tests (migration / link-rewrite scripts)
6982
run: pnpm test
7083
working-directory: website
84+
# `astro check` type-checks the .astro files and every `astro:content`
85+
# call against the generated collection types. It was never wired up, and
86+
# by the time it was it had 36 errors: `tsconfig.json` listed `.astro` in
87+
# `include`, but TypeScript skips dot-directories when expanding a
88+
# directory into a glob, so the generated content types were never loaded
89+
# and every `getCollection` silently resolved to `any`.
90+
- name: Type-check the site
91+
run: pnpm check
92+
working-directory: website
7193
- name: Build the Astro site (fails on broken links)
7294
run: pnpm build
7395
working-directory: website

.github/workflows/loco-gen-ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,18 @@ on:
66
- master
77
paths:
88
- "loco-gen/**"
9+
# the anchor invariants read the app trees that ship in this repo
10+
- "examples/*/migration/src/lib.rs"
11+
- "examples/*/frontend/src/routes.tsx"
12+
- "loco-new/base_template/migration/src/lib.rs.t"
13+
- "loco-new/base_template/frontend/src/routes.tsx"
914
pull_request:
1015
paths:
1116
- "loco-gen/**"
17+
- "examples/*/migration/src/lib.rs"
18+
- "examples/*/frontend/src/routes.tsx"
19+
- "loco-new/base_template/migration/src/lib.rs.t"
20+
- "loco-new/base_template/frontend/src/routes.tsx"
1221

1322
env:
1423
RUST_TOOLCHAIN: stable

.github/workflows/loco-new.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
6666
6767
- name: Run sccache-cache
68-
uses: mozilla-actions/sccache-action@v0.0.10
68+
uses: mozilla-actions/sccache-action@v0.0.11
6969

7070
- name: Install seaorm cli
7171
run: cargo install sea-orm-cli

.github/workflows/loco-rs-ci.yml

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ jobs:
3030
run: cargo fmt --all -- --check
3131
- name: Run cargo clippy
3232
run: cargo clippy --all-features -- -D warnings -W clippy::pedantic -W clippy::nursery -W rust-2018-idioms
33+
# A `[Type]` that no longer resolves is a dead link on docs.rs, and
34+
# nothing was checking: twelve had accumulated from renames.
35+
- name: Run cargo doc
36+
run: cargo doc --no-deps --all-features --workspace
37+
env:
38+
RUSTDOCFLAGS: >-
39+
-D rustdoc::broken_intra_doc_links
40+
-D rustdoc::invalid_html_tags
41+
-D rustdoc::bare_urls
3342
3443
check:
3544
needs: [style]
@@ -87,3 +96,145 @@ jobs:
8796

8897
- name: Run cargo test
8998
run: cargo test --all-features --workspace --exclude loco-gen --exclude loco
99+
100+
# `--all-features` turns `embedded_assets` ON, which `#[cfg]`s out
101+
# `controller/views/engine.rs` in favour of `engine_embedded.rs`. That file's
102+
# test module — the on-disk Tera engine, hot reloading, autoescaping,
103+
# template inheritance — was therefore compiled by no job at all: `cargo hack
104+
# check --each-feature` above passes no `--tests`, and the job above enables
105+
# the feature that hides it. This runs everything except that one feature.
106+
test-without-embedded-assets:
107+
needs: [check, style]
108+
runs-on: ubuntu-latest
109+
110+
permissions:
111+
contents: read
112+
113+
steps:
114+
- name: Checkout the code
115+
uses: actions/checkout@v7
116+
- uses: dtolnay/rust-toolchain@stable
117+
with:
118+
toolchain: ${{ env.RUST_TOOLCHAIN }}
119+
- name: Setup Rust cache
120+
uses: Swatinem/rust-cache@v2
121+
122+
- name: Run cargo test (on-disk view engine)
123+
run: >-
124+
cargo test --lib --no-default-features
125+
--features auth,cli,with-db,testing,all_storage,cache_inmem,cache_redis,worker,worker_redis
126+
127+
# Vulnerabilities, unmaintained crates, licenses and registry sources — see
128+
# `deny.toml`, which carries a written reason for every exemption.
129+
#
130+
# Note this job can go red without anyone changing the code: a new advisory
131+
# against an existing dependency lands in the RustSec database and the next
132+
# PR fails. That is the intended behaviour — the alternative is finding out
133+
# from a user.
134+
supply-chain:
135+
needs: [style]
136+
runs-on: ubuntu-latest
137+
138+
permissions:
139+
contents: read
140+
141+
steps:
142+
- name: Checkout the code
143+
uses: actions/checkout@v7
144+
- uses: dtolnay/rust-toolchain@stable
145+
with:
146+
toolchain: ${{ env.RUST_TOOLCHAIN }}
147+
- uses: taiki-e/install-action@v2
148+
with:
149+
tool: cargo-deny
150+
- run: cargo deny check
151+
152+
# `examples` is `exclude`d from the workspace, so `cargo test --workspace`
153+
# never reaches `examples/*/tests` — model, request, task and worker suites
154+
# that exercise the framework the way an app actually uses it, through a
155+
# booted `AppContext` and a real router. Nothing ran them: `docs.yml` only
156+
# `cargo build`s demo, to check the docs still compile.
157+
#
158+
# Both examples default to SQLite in `config/test.yaml`, so this needs no
159+
# services. `reference_spa` is a clientside app whose `static` middleware is
160+
# `must_exist: true` over `frontend/dist`, so it must be built before the app
161+
# will boot — exactly what the CI a generated clientside app ships does.
162+
test-examples:
163+
needs: [check, style]
164+
runs-on: ubuntu-latest
165+
166+
permissions:
167+
contents: read
168+
169+
strategy:
170+
fail-fast: false
171+
matrix:
172+
example: [demo, reference_spa]
173+
174+
steps:
175+
- name: Checkout the code
176+
uses: actions/checkout@v7
177+
- uses: dtolnay/rust-toolchain@stable
178+
with:
179+
toolchain: ${{ env.RUST_TOOLCHAIN }}
180+
- name: Setup Rust cache
181+
uses: Swatinem/rust-cache@v2
182+
with:
183+
workspaces: examples/${{ matrix.example }}
184+
185+
# pnpm, not npm: the manifest declares `packageManager: pnpm` and carries
186+
# `pnpm.overrides`, which npm ignores — it then fails to resolve vite at
187+
# all.
188+
- name: Setup node
189+
if: matrix.example == 'reference_spa'
190+
uses: actions/setup-node@v4
191+
with:
192+
node-version: 22
193+
- name: Setup pnpm
194+
if: matrix.example == 'reference_spa'
195+
uses: pnpm/action-setup@v5
196+
with:
197+
# Read the frontend's own packageManager pin; there is no root
198+
# package.json for the action to fall back on.
199+
package_json_file: examples/reference_spa/frontend/package.json
200+
- name: Build frontend
201+
if: matrix.example == 'reference_spa'
202+
run: pnpm install --frozen-lockfile && pnpm run build
203+
working-directory: ./examples/reference_spa/frontend
204+
205+
- name: Run cargo test
206+
run: cargo test --manifest-path examples/${{ matrix.example }}/Cargo.toml
207+
208+
# `rust-version` in Cargo.toml is a promise to anyone running an older
209+
# toolchain, and until this job existed nothing checked it: every other job
210+
# here builds on `stable`. The toolchain is read out of Cargo.toml rather
211+
# than pinned here, so raising the floor in one place moves the gate with it.
212+
#
213+
# `loco-new` is its own workspace, so it needs its own invocation — the root
214+
# `--workspace` does not reach it.
215+
msrv:
216+
needs: [check, style]
217+
runs-on: ubuntu-latest
218+
219+
permissions:
220+
contents: read
221+
222+
steps:
223+
- name: Checkout the code
224+
uses: actions/checkout@v7
225+
- name: Read the declared MSRV
226+
id: msrv
227+
run: |
228+
msrv=$(grep -m1 '^rust-version' Cargo.toml | sed 's/.*"\(.*\)".*/\1/')
229+
echo "Declared MSRV: $msrv"
230+
echo "version=$msrv" >> "$GITHUB_OUTPUT"
231+
- uses: dtolnay/rust-toolchain@stable
232+
with:
233+
toolchain: ${{ steps.msrv.outputs.version }}
234+
- name: Setup Rust cache
235+
uses: Swatinem/rust-cache@v2
236+
237+
- name: Check the workspace on the MSRV
238+
run: cargo check --all-features --workspace
239+
- name: Check the `loco` CLI on the MSRV
240+
run: cargo check --all-features --manifest-path loco-new/Cargo.toml

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ example
7272
.superpowers/
7373
docs/superpowers/
7474

75-
# internal release-management working docs — never ship
76-
/RELEASE-1.0.0*.md
75+
# internal release-management working docs — never ship.
76+
# Version-generic: the 1.0.0-specific pattern this replaced stopped matching
77+
# the moment the next release was prepared, which would have shipped the
78+
# playbook in the crate.
79+
/RELEASE-*.md
7780
/REMAINING-WORK.md

0 commit comments

Comments
 (0)