Skip to content

feat(functions-tools): convert the identifier to snake case#848

Closed
peterpeterparker wants to merge 1 commit intomainfrom
feat/ignore-snake-case
Closed

feat(functions-tools): convert the identifier to snake case#848
peterpeterparker wants to merge 1 commit intomainfrom
feat/ignore-snake-case

Conversation

@peterpeterparker
Copy link
Copy Markdown
Contributor

Motivation

For some reason never used a camel case before so for simplicity - instead of updating tooling and macros - let's just stick to camel case. Discovered while testing: junobuild/juno#2634

   Compiling sputnik v0.3.1 (/Users/daviddalbusco/projects/juno/juno/src/sputnik)
warning: structure field `maxResponseBytes` should have a snake case name
   --> src/sputnik/src/generated.rs:401:9
    |
401 |     pub maxResponseBytes: Option<u64>,
    |         ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `max_response_bytes`
    |
    = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default

warning: structure field `isReplicated` should have a snake case name
   --> src/sputnik/src/generated.rs:403:9
    |
403 |     pub isReplicated: Option<bool>,
    |         ^^^^^^^^^^^^ help: convert the identifier to snake case: `is_replicated`

Coming from generated code

#[derive(CandidType, Serialize, Deserialize, Clone, JsonData)]
pub struct AppHttpRequestArgs {
    pub url: String,
    pub method: AppHttpRequestArgsMethod,
    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
Copy link
Copy Markdown
Contributor Author

Actually let's support rename in #849

@peterpeterparker peterpeterparker deleted the feat/ignore-snake-case branch March 29, 2026 11:02
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