tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
82.05k stars 2.47k forks source link

[bug] OS specific config files not merged unless default config file is updated #10963

Open bicarlsen opened 1 week ago

bicarlsen commented 1 week ago

Describe the bug

When an OS-specific config is present, the changes are not merged or updated.

When an OS-specific config file is removed, the changes persist until the default config file is updated.

Reproduction

Within a Tauri app:

  1. Create an OS-specific config file.
  2. Run the app with cargo Tauri dev, any initial will not be incorporated.
  3. Update the OS-specific config file.
  4. Rerun the app, new changes will not be incorporated
  5. Update the default config file tauri.config.json
  6. Rerun the app, now the changes from the OS-specific config will be incorporated

Expected behavior

Changes in OS-specific config files should be incorporated immediately, without having to modify the default configuration file.

Full tauri info output

[✔] Environment
    - OS: Windows 10.0.22631 x86_64 (X64)
    ✔ WebView2: 128.0.2739.67
    ✔ MSVC: Visual Studio Build Tools 2022
    ✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
    ✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (environment override by RUSTUP_TOOLCHAIN)
    - node: 18.17.1
    - pnpm: 8.7.0
    - npm: 10.8.3

[-] Packages
    - tauri 🦀: 2.0.0-rc.10
    - tauri-build 🦀: 2.0.0-rc.9
    - wry 🦀: 0.43.1
    - tao 🦀: 0.30.0
    - tauri-cli 🦀: 2.0.0-rc.8

[-] Plugins
    - tauri-plugin-shell 🦀: 2.0.0-rc.3

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/

Stack trace

No response

Additional context

No response

amrbashir commented 1 day ago

I can't reproduce at all, which options did you change?

bicarlsen commented 1 day ago

On Windows, in tauri.windows.conf.json, changing properties in app > windows, e.g. title and width, would not be reflected until I changed a property in the default config file.

bicarlsen commented 1 day ago

I've also confirmed this issue for v1 on Windows.