Skip to content

Scheme host: (cadr string) TypeError during Step 1 JSON decode of kernel modules #452

@joshsh

Description

@joshsh

After landing the validation/environment loader fixes in commit 52f9cd55c3 (which resolved the "Unbound variable: make-hydra_validation_validation_profile" error tracked in #17), the scheme host now reaches Step 1: Loading main modules from JSON but crashes on the second module after hydra.adapt:

Step 1: Loading main modules from JSON...
  Loaded: hydra.adapt
[various WARNINGs about (scheme base) overrides]
Backtrace:
  10 (primitive-load "...")
   8 (map1 ("hydra.adapt" "hydra.analysis" "hydra.annotat…" …))
   ...
   1 (_ #(#(#<directory (guile-user)>) string))
   0 (cadr string)

ERROR: In procedure cadr:
In procedure cadr: Wrong type (expecting pair): string

The error happens inside load-modules-from-json (heads/lisp/scheme/src/main/scheme/hydra/bootstrap.scm:416) mapping over the namespace list. After successfully loading the first module (hydra.adapt), the subsequent module's load triggers a cadr on a bare string. Likely a case-style branch on JSON value tag (:STRING, :OBJECT, :ARRAY, etc.) that's missing or malformed for the string case.

Reproduction:

bin/run-bootstrapping-demo.sh --hosts scheme --targets haskell

Fails at ~7m with the stack trace above.

Reproduces in all scheme→* cells, not target-specific (confirmed scheme→scheme also fails identically).

Discovered while: investigating partial fixes for #17 during the #409 v7 sweep. The original #17 was about loader order; this is a downstream bug exposed once the loader works.

Likely fix location: the JSON decoder in heads/lisp/scheme/src/main/scheme/hydra/json-reader.scm or the scheme-to-hydra-json adapter / hydra_json_decode_from_json path in bootstrap.scm:390-405.

For #17 follow-up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions