Skip to content

fix(api): enable utoipa-swagger-ui reqwest feature for Windows cross-compile - #13

Open
jacquesh82 wants to merge 5 commits into
mainfrom
fix/utoipa-swagger-ui-windows-cross
Open

fix(api): enable utoipa-swagger-ui reqwest feature for Windows cross-compile#13
jacquesh82 wants to merge 5 commits into
mainfrom
fix/utoipa-swagger-ui-windows-cross

Conversation

@jacquesh82

Copy link
Copy Markdown
Owner

Summary

The release pipeline failed on x86_64-pc-windows-gnu because utoipa-swagger-ui 7.1.0's build.rs has a host-vs-target cfg mismatch when cross-compiling.

Symptom: thread 'main' panicked at .../utoipa-swagger-ui-7.1.0/build.rs:183:81: called Result::unwrap() on an Err value: Os { code: 2, kind: NotFound, message: "No such file or directory" }

Root cause: The build.rs has:
```rust
if reqwest_feature.is_ok() || CARGO_CFG_TARGET_OS == "windows" {
#[cfg(any(feature = "reqwest", target_os = "windows"))]
{ download_file_reqwest(...) }
Ok(())
} else { /* curl */ }
```
When cross-compiling from Linux to Windows, the runtime branch picks the windows path, but the inner #[cfg(target_os = "windows")] is evaluated against the host (Linux) at build-script compile time, so the inner block is excluded. The function returns Ok(()) without downloading, then later File::open panics.

Fix: Enable the reqwest feature on utoipa-swagger-ui. This makes the inner #[cfg(feature = "reqwest")] true regardless of host, so the download code is always compiled in.

Test plan

  • After merge, re-tag (or move) v0.1.0-rc1 to re-trigger the release pipeline.
  • Verify Windows native build succeeds and produces jot-windows-x86_64.exe, jot-server-windows-x86_64.exe, jot-mcp-windows-x86_64.exe.
  • Linux/macOS builds should keep working unchanged.

🤖 Generated with Claude Code

jacquesh82 and others added 5 commits May 20, 2026 19:53
…compile

utoipa-swagger-ui 7.1.0 build.rs has a host-vs-target cfg mismatch:
when cross-compiling from Linux to Windows, the runtime branch picks
the (target_os=windows) download path, but the inner cfg-gated block
is evaluated on the host, so it's excluded — Ok(()) returns without
downloading, then the later File::open panics with NotFound.

Enabling the reqwest feature forces the host-side cfg to include the
download code regardless of target. Native Linux/macOS builds keep
working as before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Restructure jot.mindlog.today routing:
  - /        → marketing landing (clients/website)
  - /demo/   → Preact SPA (clients/web, base=/demo/)
  - /status  → live health page (client-side pings /health, /, /mcp, /install.sh)
  - /oauth/callback → routed to SPA index so OAuth Code+PKCE lands in-app

Bundles the str01 deploy tree (compose, nginx, build scripts) that was
previously untracked.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- README: document OAuth 2.1 + PKCE + DCR flow, jot-mcp stdio bridge,
  Android beta, and the legacy device-token deprecation flag
- install.sh / install.ps1: align with the new --component cli|server|mcp|all
  surface published from jot.mindlog.today/downloads
- clients/website src + dist: refreshed main.js / style.css and the rebuilt
  Vite output that pairs with the /demo SPA routing and /status page
- .gitignore: exclude clients/website/{public,dist}/downloads and dist.zip —
  pre-built release binaries are too large for git (the Android APK alone
  exceeds GitHub's 100 MB limit) and are regenerated locally

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
scripts/dev.sh lance en parallèle API+MCP (cargo watch), SPA vite,
website vite, et un reverse proxy node sans dépendances qui route
tout via http://localhost:3000 :

  /            → website (Vite HMR, interne 5174)
  /demo[/]     → SPA     (Vite HMR, interne 5173, 308 si sans slash)
  /api routes  → jot-server (interne 3001)

dev-proxy.mjs gère les upgrades WebSocket pour HMR en routant par
chemin (/demo → SPA, sinon website). Les vite.config.ts activent
server/hmr seulement si DEV_BEHIND_PROXY=1, sans impact prod.

SPA: devToolsEnabled:false pour contourner l'incompat preset-vite
@2.10.5 ↔ zimmerframe@1.1.4 (exports CJS retirés).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
New /oauth/signup endpoint creates an identity and immediately issues
an OAuth access + refresh token bound to a DCR-registered client.
Replaces the SPA's legacy POST /register → device JWT path, which is
incompatible with --legacy-device-tokens=off.

CLI and other surfaces that still need a device JWT keep using
/register.

Also: docker-compose passes --open-registration on str01.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant