Skip to content

fix(functions-tools): skip #[json_data(nested)] attribute for Vec of nested structs#847

Merged
peterpeterparker merged 1 commit intomainfrom
fix/nested
Mar 29, 2026
Merged

fix(functions-tools): skip #[json_data(nested)] attribute for Vec of nested structs#847
peterpeterparker merged 1 commit intomainfrom
fix/nested

Conversation

@peterpeterparker
Copy link
Copy Markdown
Contributor

@peterpeterparker peterpeterparker commented Mar 29, 2026

Found while testing junobuild/juno#2634

   Compiling junobuild-cdn v0.6.1 (/Users/daviddalbusco/projects/juno/juno/src/libs/cdn)
   Compiling sputnik v0.3.1 (/Users/daviddalbusco/projects/juno/juno/src/sputnik)
   Compiling junobuild-satellite v0.5.1 (/Users/daviddalbusco/projects/juno/juno/src/libs/satellite)
error[E0425]: cannot find type `VecJsonData` in this scope
   --> src/sputnik/src/generated.rs:400:18
    |
400 |     pub headers: Vec<AppHttpRequestArgsHeaders>,
    |                  ^^^ not found in this scope

error[E0425]: cannot find type `VecJsonData` in this scope
   --> src/sputnik/src/generated.rs:417:18
    |
417 |     pub headers: Vec<AppHttpRequestResultHeaders>,
    |                  ^^^ not found in this scope

For more information about this error, try `rustc --explain E0425`.
error: could not compile `sputnik` (lib) due to 2 previous errors

which originated from generated code

#[derive(CandidType, Serialize, Deserialize, Clone, JsonData)]
pub struct AppHttpRequestArgs {
    pub url: String,
    pub method: AppHttpRequestArgsMethod,
    #[json_data(nested)]
    pub headers: Vec<AppHttpRequestArgsHeaders>,
    pub body: Option<Vec<u8>>,
    pub maxResponseBytes: Option<u64>,
    pub transform: Option<String>,
    pub isReplicated: Option<bool>,
}

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
@junobuild/admin 6.24 KB (0%)
@junobuild/core 15.34 KB (0%)
@junobuild/core-worker 21.74 KB (0%)
@junobuild/core-standalone 69.64 KB (0%)
@junobuild/utils 335 B (0%)
@junobuild/errors 1014 B (0%)
@junobuild/functions 2.19 KB (0%)
@junobuild/analytics 12.3 KB (0%)
@junobuild/config 7.15 KB (0%)
@junobuild/auth/delegation 2.51 KB (0%)
@junobuild/auth/automation 761 B (0%)
@junobuild/cdn 971 B (0%)
@junobuild/storage 988 B (0%)
@junobuild/ic-client/actor 7.22 KB (0%)
@junobuild/ic-client/webauthn 1.96 KB (0%)
@junobuild/ic-client/utils 174 B (0%)
@junobuild/ic-client/index 62 B (0%)

@peterpeterparker peterpeterparker changed the title fix: skip #[json_data(nested)] attribute for Vec of nested structs fix(functions-tools): skip #[json_data(nested)] attribute for Vec of nested structs Mar 29, 2026
@peterpeterparker peterpeterparker merged commit b5220b7 into main Mar 29, 2026
11 of 13 checks passed
@peterpeterparker peterpeterparker deleted the fix/nested branch March 29, 2026 10:46
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