So for my app I have different features activated depending on whether the app is being built on Windows or Linux/MacOS. The problem is that Tauri really doesn't like me doing this.
It's quite a simple use case that worked fine around Tauri 1.2 but no longer - I want the reqwest-native-tls-vendored on Linux/MacOS only and the updater features on Windows only.
To set this, I have the configs in the image attached as well as this:
[target.'cfg(not(any(windows, target_os = "macos")))'.dependencies.tauri]
version = "1.5.0"
features = ["devtools", "dialog", "reqwest-client", "shell-open", "reqwest-native-tls-vendored"]
[target.'cfg(any(windows, target_os = "macos"))'.dependencies.tauri]
version = "1.5.0"
features = ["devtools", "dialog", "reqwest-client", "shell-open", "updater"]
But the problem is that I only specify updater as being active in tauri.windows.conf.json - because that's the only time I want it. But Tauri doesn't like that.
I get the error message The ``tauri`` dependency features on the ``Cargo.toml`` file does not match the allowlist defined under ``tauri.conf.json``. and it REFUSES to build.
When I DO run cargo tauri dev like it tells me to, it adds the reqwest-native-tls-vendored to Windows and removes the updater feature from Windows.
What changed in Tauri? Why can't I specify different features for different platforms anymore? It's annoying, I can't update to new versions of Tauri.