Skip to content

fix: emscripten manifest parse fails when versions are top-level keys #111

Closed

Description

@zackees

Bug

fastled --just-compile fails on the very first run with:

fastled: emscripten toolchain install failed: parse manifest JSON from https://raw.githubusercontent.com/zackees/clang-tool-chain-bins/main/assets/emscripten/win/x86_64/manifest.json: missing field `versions` at line 7 column 1

Cause

The published manifest at assets/emscripten/<plat>/<arch>/manifest.json looks like:

{
  "latest": "4.0.19",
  "4.0.19": {
    "href": "...",
    "sha256": "..."
  }
}

But crates/fastled-cli/src/install.rs defines PlatformManifest with a required versions: BTreeMap<String, VersionInfo> field, so deserialization fails.

The doc-comment on that struct already calls this out: 'older ctcb-manifest releases expected version keys at the top level' — but the struct does not currently accept that older shape.

Repro

cargo build -p fastled-cli --release
target/release/fastled --init wasm --no-interactive
target/release/fastled --just-compile --quick --no-interactive ./fastled/wasm

Fails on the second command before any compilation happens.

Fix sketch

Accept either layout: parse to a serde_json::Value first; if a top-level versions key is missing, collect every non-latest key into the versions map.

Activity

  1. zackees commented on Jun 2, 2026

    @zackees
    MemberAuthor

    Resolved by merged PR #118 (e008ca3e). Current origin/main implements parse_platform_manifest, accepting both nested versions manifests and legacy top-level version-key manifests, with regression tests for legacy top-level manifests and invalid latest/no-version cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions