Skip to content

Conversation

izzoa
Copy link
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

@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

@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

DBinK commented Oct 8, 2025

I did the same fix and successfully built the Windows executable

@123vivekr
Copy link
Member

Thanks! Merged 🙌

@123vivekr 123vivekr merged commit 821abad into winfunc:main Oct 10, 2025
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