Skip to content

Fix missing installation_type field in ClaudeInstallation struct#374

Merged
123vivekr merged 1 commit intowinfunc:mainfrom
izzoa:fix/missing-installation-type-field
Oct 10, 2025
Merged

Fix missing installation_type field in ClaudeInstallation struct#374
123vivekr merged 1 commit intowinfunc:mainfrom
izzoa:fix/missing-installation-type-field

Conversation

@izzoa
Copy link
Copy Markdown
Contributor

@izzoa izzoa commented Sep 27, 2025

Description

This PR fixes a compilation error in the Rust code that was preventing successful builds of the Tauri application.

Problem

The build was failing with the following error:

error[E0063]: missing field `installation_type` in initializer of `ClaudeInstallation`
   --> src/claude_binary.rs:222:32
    |
222 |             installations.push(ClaudeInstallation {
    |                                ^^^^^^^^^^^^^^^^^^ missing `installation_type`

Root Cause

In the find_nvm_installations() function at line 222, one instance of ClaudeInstallation struct initialization was missing the required installation_type field. This field was added to the struct definition but this particular initialization was not updated.

Solution

  • Added the missing installation_type: InstallationType::System field to the ClaudeInstallation initialization
  • This matches the pattern used by other NVM installations in the same function and throughout the codebase
  • The fix ensures consistency with the struct definition and allows successful compilation

Testing

  • ✅ Build now completes successfully for aarch64-apple-darwin target
  • ✅ The fix maintains consistency with other ClaudeInstallation initializations in the codebase
  • ✅ No functional changes to the behavior, only structural compliance

Files Changed

  • src-tauri/src/claude_binary.rs - Added missing installation_type field

This is a minimal, targeted fix that resolves the immediate build issue while maintaining code consistency.

- Add missing installation_type field to ClaudeInstallation initialization in find_nvm_installations() function at line 222
- This field is required by the struct definition but was omitted from one instance in the NVM discovery code
- The missing field caused Rust compilation to fail with error E0063 during tauri build
- Set installation_type to InstallationType::System to match other NVM installations in the same function
- Fixes build failure for aarch64-apple-darwin target and other platforms
Copy link
Copy Markdown

@davutg davutg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have done the same and issue is fixed for me.

Copy link
Copy Markdown

@rluethy rluethy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proposed change fixed the build error.

@DBinK
Copy link
Copy Markdown

DBinK commented Oct 8, 2025

I did the same fix and successfully built the Windows executable

@123vivekr
Copy link
Copy Markdown
Member

Thanks! Merged 🙌

@123vivekr 123vivekr merged commit 821abad into winfunc:main Oct 10, 2025
@123vivekr
Copy link
Copy Markdown
Member

Hi @izzoa , I'm trying to understand how people use opcode and update our roadmap to make it better. If you have a few minutes, I'd love your input here: form link; this takes only 3 minutes.

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.

5 participants