Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Tauri #1760

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Update Tauri #1760

merged 1 commit into from
Nov 26, 2024

Conversation

vlabo
Copy link
Member

@vlabo vlabo commented Nov 26, 2024

Summary by CodeRabbit

  • New Features

    • Enhanced installation process for different system architectures, including support for arm64.
    • Improved dialog handling with custom button labels for exit confirmation.
  • Bug Fixes

    • Adjusted installation paths for the main application binary to ensure correct packaging.
  • Chores

    • Updated dependencies to more stable versions for Tauri-related packages, improving overall application reliability.
    • Refined build processes for various programming environments, enhancing versioning and dependency management.

Copy link
Contributor

coderabbitai bot commented Nov 26, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes in this pull request involve updates to dependency versions in the package.json and Cargo.toml files for the portmaster project and its Tauri application. Several Tauri-related dependencies have been upgraded to more stable versions. Additionally, modifications have been made to the traymenu.rs file to streamline dialog button label handling. The main.wxs and main_original.wxs files have been altered to refine installation properties, support for additional architectures, and improve the application launch logic post-installation.

Changes

File Path Change Summary
desktop/angular/package.json Updated version constraints for several @tauri-apps dependencies to newer stable versions.
desktop/tauri/src-tauri/Cargo.toml Incremented versions for tauri, tauri-build, and various Tauri plugins to newer stable versions.
desktop/tauri/src-tauri/src/traymenu.rs Modified import statements and streamlined dialog button label handling in setup_tray_menu function.
desktop/tauri/src-tauri/templates/main.wxs Expanded support for arm64, updated File source attribute, and refined WebView2 installation logic.
desktop/tauri/src-tauri/templates/main_original.wxs Adjusted File source attribute and enhanced installation logic with new custom actions for application launch.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant TrayMenu

    User->>TrayMenu: Attempt to exit
    TrayMenu->>App: Show exit confirmation dialog
    App->>TrayMenu: Display custom buttons (Ok/Cancel)
    User->>App: Select button
    App->>TrayMenu: Handle user selection
    TrayMenu->>User: Exit application or stay
Loading

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vlabo vlabo requested a review from dhaavi November 26, 2024 11:57
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (3)
desktop/tauri/src-tauri/templates/main.wxs (1)

Line range hint 105-112: Change Root to HKCU for per-user installations

The comment suggests changing the Root to HKCU for per-user installations, but the Root of the registry keys for deep link protocols is still set to HKLM. To support per-user installations without requiring elevated privileges, consider changing Root to HKCU.

Apply this diff to update the registry root:

-        <RegistryKey Root="HKLM" Key="Software\Classes\\{{protocol}}">
+        <RegistryKey Root="HKCU" Key="Software\Classes\\{{protocol}}">
desktop/tauri/src-tauri/Cargo.toml (1)

15-29: Consider updating related development dependencies

The core Tauri dependencies have been updated, but there might be related development dependencies that should be updated as well.

Consider updating these additional dependencies if they're available:

  • tauri-build test dependencies
  • Development tools and CLI utilities

Also, since you're updating from RC versions to stable, make sure to check the Tauri migration guide for any breaking changes.

desktop/angular/package.json (1)

40-46: Standardize version constraint patterns

The Tauri dependencies are using mixed version constraints (>= and ^). While both work, using consistent patterns makes dependency management more predictable.

Consider standardizing to use ^ for all Tauri dependencies:

-    "@tauri-apps/api": ">=2.1.1",
-    "@tauri-apps/plugin-cli": ">=2.0.0",
-    "@tauri-apps/plugin-clipboard-manager": ">=2.0.0-rc.1",
-    "@tauri-apps/plugin-dialog": ">=2.0.0",
-    "@tauri-apps/plugin-notification": ">=2.0.0",
-    "@tauri-apps/plugin-os": ">=2.0.0",
+    "@tauri-apps/api": "^2.1.1",
+    "@tauri-apps/plugin-cli": "^2.0.0",
+    "@tauri-apps/plugin-clipboard-manager": "^2.0.0",
+    "@tauri-apps/plugin-dialog": "^2.0.0",
+    "@tauri-apps/plugin-notification": "^2.0.0",
+    "@tauri-apps/plugin-os": "^2.0.0",
     "@tauri-apps/plugin-shell": "^2.0.1",
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between fe070b4 and f29ec29.

⛔ Files ignored due to path filters (6)
  • desktop/angular/package-lock.json is excluded by !**/package-lock.json
  • desktop/tauri/src-tauri/Cargo.lock is excluded by !**/*.lock
  • desktop/tauri/src-tauri/gen/schemas/acl-manifests.json is excluded by !**/gen/**
  • desktop/tauri/src-tauri/gen/schemas/desktop-schema.json is excluded by !**/gen/**
  • desktop/tauri/src-tauri/gen/schemas/linux-schema.json is excluded by !**/gen/**
  • desktop/tauri/src-tauri/gen/schemas/windows-schema.json is excluded by !**/gen/**
📒 Files selected for processing (5)
  • desktop/angular/package.json (1 hunks)
  • desktop/tauri/src-tauri/Cargo.toml (1 hunks)
  • desktop/tauri/src-tauri/src/traymenu.rs (2 hunks)
  • desktop/tauri/src-tauri/templates/main.wxs (1 hunks)
  • desktop/tauri/src-tauri/templates/main_original.wxs (1 hunks)
🔇 Additional comments (10)
desktop/tauri/src-tauri/templates/main_original.wxs (1)

142-142: Update Source attribute to {{main_binary_path}} is appropriate

The change from {{app_exe_source}} to {{main_binary_path}} in the Source attribute aligns with the updated paths and ensures that the installer references the correct executable during installation.

desktop/tauri/src-tauri/templates/main.wxs (2)

Line range hint 1-9: Support for 'arm64' platform added

The inclusion of definitions for the arm64 architecture is appropriate. Setting Win64 to "yes" and PlatformProgramFilesFolder to ProgramFiles64Folder aligns with configurations for 64-bit ARM platforms.


142-142: Update Source attribute to {{main_binary_path}}

Updating the Source attribute in the <File> element from {{app_exe_source}} to {{main_binary_path}} ensures consistency with the new build output path. Confirm that {{main_binary_path}} correctly points to the main executable so that the installer includes the correct binary.

desktop/tauri/src-tauri/Cargo.toml (4)

15-29: LGTM! Upgrading from RC to stable versions is a positive change

The updates from release candidate versions to stable releases is a good improvement for stability. The version updates are consistent across all Tauri-related dependencies. Please ensure thorough testing of the application after these dependency updates, particularly focusing on:

  • Tray icon functionality
  • Dialog operations
  • Clipboard operations
  • OS-specific features
  • Window state persistence
  • Notification system

19-19: Verify Tauri core features compatibility

The update to Tauri 2.1.1 looks good, but let's verify that all required features are properly configured.

✅ Verification successful

All Tauri features are properly configured

The verification shows that the codebase only uses standard Tauri functionality that doesn't require additional feature flags. The detected usages are for core Tauri features like:

  • Async runtime
  • Window management
  • Tray functionality (covered by "tray-icon" feature)
  • Command system
  • App building and configuration

All feature-gated functionality being used is already properly declared in the Cargo.toml configuration.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if any Tauri features are used in the code but not declared in Cargo.toml
rg -g '*.rs' 'tauri::(\w+)' | grep -v 'tray-icon\|image-png\|config-json5\|devtools' || echo "No undeclared features found"

Length of output: 3148


20-27: Verify plugin version compatibility with Tauri core

The plugins are being updated from RC to stable versions, which is good. However, we should ensure all plugin versions are compatible with Tauri 2.1.1.

✅ Verification successful

Let me gather more information about the Tauri core version and plugin compatibility.


Plugin versions are compatible with Tauri core 2.1.1

All the Tauri plugins being used (2.0.x versions) are compatible with Tauri core 2.1.1. This is because:

  • The plugins follow semantic versioning where 2.0.x versions are compatible with Tauri 2.x
  • No compatibility issues were found in the official plugins repository
  • The plugin versions being used are stable releases, not release candidates
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are any compatibility notices or issues reported
gh api graphql -f query='
{
  repository(owner: "tauri-apps", name: "plugins-workspace") {
    issues(first: 5, labels: ["compatibility"], states: OPEN) {
      nodes {
        title
        body
        labels(first: 5) {
          nodes {
            name
          }
        }
      }
    }
  }
}'

Length of output: 350


Script:

#!/bin/bash
# Check Tauri core version and plugin dependencies
cat desktop/tauri/src-tauri/Cargo.toml | grep -A 20 "^\[dependencies\]"

# Check if there are any version conflicts or warnings in the Cargo.lock
cat desktop/tauri/src-tauri/Cargo.lock | grep -A 1 "tauri.*2\.0"

Length of output: 740


15-15: Verify security advisories for updated dependencies

Let's check for any known security advisories for the updated versions.

Also applies to: 19-27, 29-29

✅ Verification successful

Let me generate one more verification script to check the exact version of tauri being used in the project, as we found some security advisories for specific versions.


Security advisory check completed - No issues found

Based on the security advisory check and version analysis:

  • The project uses Tauri v2.1.1 and related plugins, which are not affected by any known vulnerabilities
  • The most recent security advisory affects versions < 2.0.0-beta.20, while we're using a stable 2.1.1
  • All Tauri plugins being used are on their latest 2.x versions with no reported vulnerabilities
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for security advisories for Tauri and its plugins
for package in tauri tauri-build tauri-plugin-shell tauri-plugin-dialog tauri-plugin-clipboard-manager tauri-plugin-os tauri-plugin-single-instance tauri-plugin-notification tauri-plugin-log tauri-plugin-window-state
do
  echo "Checking $package..."
  gh api graphql -f query="
  {
    securityVulnerabilities(first: 5, ecosystem: RUST, package: \"$package\") {
      nodes {
        advisory {
          summary
          severity
          publishedAt
        }
        vulnerableVersionRange
        firstPatchedVersion {
          identifier
        }
      }
    }
  }"
done

Length of output: 7971


Script:

#!/bin/bash
# Check the exact version of tauri being used
cat desktop/tauri/src-tauri/Cargo.toml | grep -A 1 '\[dependencies\]' | grep 'tauri'

Length of output: 84


Script:

#!/bin/bash
# Check the exact version of tauri being used - trying with a different approach
cat desktop/tauri/src-tauri/Cargo.toml | grep -A 20 'dependencies' | grep 'tauri.*='

Length of output: 551

desktop/angular/package.json (1)

40-46: Verify compatibility between Tauri versions

Let's verify that these versions are compatible with each other and check for any known issues.

✅ Verification successful

Let me gather more information about the Tauri core version being used in the project.

The previous output shows that all plugins are using compatible 2.x versions, but we need to verify if they match with the core Tauri version being used in the project.


Let me try a different approach to find the Tauri configuration files.


Let me check the Cargo.toml file in the correct location.


All Tauri dependencies are compatible

The package versions in package.json are compatible with the core Tauri dependencies found in Cargo.toml. All dependencies are using the 2.x version series:

  • Core Tauri version is 2.1.1 (in Cargo.toml)
  • All plugins in package.json use >=2.0.0 or ^2.0.1, which ensures compatibility with Tauri 2.x
  • The actual plugin versions used in Cargo.toml (2.0.x) are also compatible with the core Tauri version
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for compatibility issues between Tauri packages

# Get the latest versions and compatibility information from npm
echo "Checking latest versions and peer dependencies..."
for pkg in @tauri-apps/api @tauri-apps/plugin-cli @tauri-apps/plugin-clipboard-manager @tauri-apps/plugin-dialog @tauri-apps/plugin-notification @tauri-apps/plugin-os @tauri-apps/plugin-shell; do
  echo "Package: $pkg"
  npm view $pkg version peerDependencies
done

Length of output: 2492


Script:

#!/bin/bash
# Check Tauri core version and dependencies
echo "Checking Tauri core version..."
cat desktop/tauri.conf.json | jq '.tauri.bundle.identifier, .package.version'

# Check cargo dependencies for Tauri version
echo -e "\nChecking Cargo.toml for Tauri dependencies..."
cat desktop/src-tauri/Cargo.toml | grep -A 5 "tauri"

Length of output: 427


Script:

#!/bin/bash
# Find Tauri related configuration files
echo "Looking for Tauri configuration files..."
fd -t f -e json -e toml . | grep -i "tauri"

# Also check package.json for any Tauri core dependency
echo -e "\nChecking package.json for Tauri core dependency..."
cat desktop/angular/package.json | grep -A 1 "\"tauri\""

Length of output: 760


Script:

#!/bin/bash
# Check Tauri dependencies in the correct Cargo.toml location
echo "Checking Cargo.toml for Tauri dependencies..."
cat desktop/tauri/src-tauri/Cargo.toml | grep -A 10 "\[dependencies\]"

# Also check if there's a tauri.conf.json in the tauri directory
echo -e "\nChecking for tauri.conf.json..."
cat desktop/tauri/src-tauri/tauri.conf.json 2>/dev/null || echo "No tauri.conf.json found"

Length of output: 741

desktop/tauri/src-tauri/src/traymenu.rs (2)

32-32: LGTM: Import addition aligns with Tauri API updates

The addition of MessageDialogButtons import is appropriate for the new dialog button handling approach.


202-205: LGTM: Improved dialog button handling

The changes improve both the code and user experience:

  1. Uses the new Tauri API correctly with MessageDialogButtons::OkCancelCustom
  2. More descriptive button labels that clearly indicate the action
  3. More concise implementation compared to the previous approach

"@tauri-apps/api": ">=2.0.0-rc.1",
"@tauri-apps/plugin-cli": ">=2.0.0-rc.1",
"@tauri-apps/api": ">=2.1.1",
"@tauri-apps/plugin-cli": ">=2.0.0",
"@tauri-apps/plugin-clipboard-manager": ">=2.0.0-rc.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Update clipboard-manager to stable version

The @tauri-apps/plugin-clipboard-manager is still using a release candidate version while other Tauri packages have been updated to stable versions. This inconsistency could lead to compatibility issues.

Consider updating to the stable version:

-    "@tauri-apps/plugin-clipboard-manager": ">=2.0.0-rc.1",
+    "@tauri-apps/plugin-clipboard-manager": ">=2.0.0",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@tauri-apps/plugin-clipboard-manager": ">=2.0.0-rc.1",
"@tauri-apps/plugin-clipboard-manager": ">=2.0.0",

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
Earthfile (1)

423-423: Update the comment to reflect the current version.

The comment "For now we need tauri-cli 2.0.0 for bulding" is outdated and should be updated to reflect the current version requirement.

-    # For now we need tauri-cli 2.0.0 for bulding
+    # Install tauri-cli 2.1.0 for building
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between f29ec29 and d0ccd61.

⛔ Files ignored due to path filters (6)
  • desktop/angular/package-lock.json is excluded by !**/package-lock.json
  • desktop/tauri/src-tauri/Cargo.lock is excluded by !**/*.lock
  • desktop/tauri/src-tauri/gen/schemas/acl-manifests.json is excluded by !**/gen/**
  • desktop/tauri/src-tauri/gen/schemas/desktop-schema.json is excluded by !**/gen/**
  • desktop/tauri/src-tauri/gen/schemas/linux-schema.json is excluded by !**/gen/**
  • desktop/tauri/src-tauri/gen/schemas/windows-schema.json is excluded by !**/gen/**
📒 Files selected for processing (6)
  • Earthfile (1 hunks)
  • desktop/angular/package.json (1 hunks)
  • desktop/tauri/src-tauri/Cargo.toml (1 hunks)
  • desktop/tauri/src-tauri/src/traymenu.rs (2 hunks)
  • desktop/tauri/src-tauri/templates/main.wxs (1 hunks)
  • desktop/tauri/src-tauri/templates/main_original.wxs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • desktop/angular/package.json
  • desktop/tauri/src-tauri/Cargo.toml
  • desktop/tauri/src-tauri/src/traymenu.rs
  • desktop/tauri/src-tauri/templates/main_original.wxs
🔇 Additional comments (4)
desktop/tauri/src-tauri/templates/main.wxs (3)

Line range hint 391-393: Verify service management implementation

The service management CustomActions are referenced but not defined in this file. Please ensure:

  1. The service management actions are properly defined elsewhere
  2. Error handling is implemented for service operations
  3. The service operations are properly sequenced with other installation actions

Let's check for the service management implementations:

Also applies to: 397-399

✅ Verification successful

The search results show that the service management actions are properly defined in desktop/tauri/src-tauri/templates/service.wxs. Let me verify the implementation details:


Service management implementation is properly configured

The service management actions are well-defined in service.wxs with appropriate:

  • Error handling through Return attributes (check for installation, ignore for cleanup)
  • Proper sequencing in InstallExecuteSequence with correct conditions
  • Elevated privileges via Impersonate="no"
  • Clear command execution paths using Windows service control (sc.exe) and the application's service installer
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Look for service management implementations

# Search for service management action definitions
rg -g '*.{wxs,wxi}' 'InstallPortmasterService|StopPortmasterService|DeletePortmasterService'

# Search for service-related code in the codebase
rg -g '*.{rs,ts,js}' -B 2 -A 2 'portmaster.*service'

Length of output: 4944


Script:

#!/bin/bash
# Check the service.wxs implementation details
cat desktop/tauri/src-tauri/templates/service.wxs

Length of output: 1338


Line range hint 1-12: LGTM: Architecture support properly configured

The addition of arm64 architecture support is well-implemented, correctly mirroring x64 settings for program files location and Win64 flag.

Let's verify the architecture support in related build configurations:

✅ Verification successful

Let me analyze the architecture support configuration in the build files based on the search results:

  1. The Cargo.toml shows Windows and Linux target configurations
  2. Cross.toml has explicit aarch64 (arm64) Linux build support
  3. The WiX installer template properly handles x86, x64 and arm64 architectures

Let me verify one more thing about the build configuration:


Let me try a different approach to find the Tauri configuration:


Let me check the Cargo.toml for target configurations:


Based on the comprehensive review of:

  1. The WiX installer template properly handling x86, x64, and arm64 architectures
  2. Cross.toml showing explicit aarch64 (arm64) Linux build support
  3. Cargo.toml with proper target-specific dependencies for both Windows and Linux

Architecture support is correctly configured across build system

The WiX installer template's architecture handling aligns with the build system configuration. The arm64 support is properly integrated with:

  • Correct Win64 flag setting for arm64 (same as x64)
  • Proper program files location configuration
  • Matching build system support in Cross.toml and Cargo.toml
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for architecture-specific configurations in build files

# Search for architecture-related settings in build configs
rg -g '*.{json,toml,yml,yaml}' -i '(arch|target|platform|x64|arm64)'

Length of output: 101517


Script:

#!/bin/bash
# Check tauri config for architecture settings
cat desktop/tauri/src-tauri/tauri.conf.json

Length of output: 117


Script:

#!/bin/bash
# Find and check Tauri configuration files
fd -e json -e toml . desktop/tauri/src-tauri/

Length of output: 442


Script:

#!/bin/bash
# Check Cargo.toml for target configurations
cat desktop/tauri/src-tauri/Cargo.toml

Length of output: 2421


142-142: LGTM: Binary path template properly updated

The main binary path template variable has been standardized and includes proper checksum verification.

Let's verify the template variable usage:

✅ Verification successful

Let me try a different search strategy to verify the template variable usage.


Let me check the content of the WXS templates to understand how the variable is used.


Let me check for the build configuration that might be handling this template variable.


Let me try one final search to check for any build scripts that might handle the binary path.


Based on the verification results, I can now provide a final response:

LGTM: Binary path template variable correctly configured

The {{main_binary_path}} template variable in the WXS file is properly configured and follows the standard Tauri Windows installer template pattern. The template is used in both the original and updated WXS files, and includes the necessary checksum verification attribute for file integrity.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for main_binary_path template variable usage

# Search for main_binary_path usage in build scripts
rg -g '*.{rs,ts,js}' 'main_binary_path'

# Search for related path configurations
rg -g '*.{json,toml}' '(binary|exe|executable).*path'

Length of output: 364


Script:

#!/bin/bash
# Search for main_binary_path in all files, including wxs templates
rg -l --type-add 'wxs:*.wxs' -t wxs 'main_binary_path'

# Search for template variable definitions or assignments
rg -g '*.{rs,ts,js,toml}' -B 2 -A 2 'template.*path|binary.*path'

# Check tauri config for binary path settings
fd -e toml tauri.conf

Length of output: 241


Script:

#!/bin/bash
# Check the content of both WXS files to compare usage
cat desktop/tauri/src-tauri/templates/main.wxs
cat desktop/tauri/src-tauri/templates/main_original.wxs

# Look for any Rust code that might be handling these templates
rg -g '*.rs' -B 3 -A 3 'templates/main'

Length of output: 32779


Script:

#!/bin/bash
# Look for build configuration files
fd -e toml -e json . desktop/tauri/src-tauri/ -x cat {}

# Search for any build-related code that might handle binary paths
rg -g '*.{rs,ts,js}' -B 2 -A 2 'binary.*path|exe.*path'

Length of output: 144873


Script:

#!/bin/bash
# Look for build scripts and configuration files
fd -e js -e ts -e rs build desktop/tauri/src-tauri/ -x cat {}

# Search for any path-related code in the build process
rg -g '*.{rs,ts,js}' -B 2 -A 2 'path.*binary|binary.*path|exe.*path'

Length of output: 5100

Earthfile (1)

423-423: Verify build compatibility with Tauri 2.1.0.

The update to Tauri CLI 2.1.0 is a significant change from the beta version. Please ensure that all build targets (especially tauri-build and tauri-build-windows-bundle) are compatible with this version.

✅ Verification successful

Let me analyze the Tauri configuration and API usage to verify compatibility with version 2.1.0.


Based on the output, I can now generate the final response as we have sufficient information about the Tauri dependencies and their compatibility.

Tauri CLI 2.1.0 is compatible with the current setup

The codebase is already configured to work with Tauri 2.x:

  • Core dependencies are aligned: tauri = "2.1.1"
  • All plugins are using 2.x versions
  • Frontend dependencies specify compatible versions: "@tauri-apps/api": ">=2.1.1"

The update to Tauri CLI 2.1.0 is safe as all components are already using compatible 2.x versions.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify Tauri CLI version compatibility by checking for any version-specific configurations or features in the build targets.

# Check for any Tauri-specific configuration files
echo "Checking Tauri configuration files..."
fd -e json -e toml . -x grep -l "tauri"

# Look for any version-specific Tauri features or APIs
echo "Checking for Tauri API usage..."
rg "tauri::" -A 3

Length of output: 13543


Script:

#!/bin/bash
# Check Cargo.toml for Tauri dependencies and their versions
echo "Checking Tauri dependencies in Cargo.toml..."
cat desktop/tauri/src-tauri/Cargo.toml | grep -A 5 "tauri"

# Check package.json for Tauri-related dependencies
echo -e "\nChecking Tauri dependencies in package.json..."
cat desktop/angular/package.json | grep -A 5 "@tauri"

# Check tauri.conf.json for configuration
echo -e "\nChecking Tauri configuration..."
cat desktop/tauri/src-tauri/tauri.conf.json

Length of output: 1822

@vlabo vlabo merged commit ca88c6d into develop Nov 26, 2024
7 checks passed
vlabo added a commit that referenced this pull request Nov 28, 2024
@vlabo vlabo deleted the fix/update-tauri branch December 2, 2024 08:42
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.

2 participants