Open chrisglein opened 8 months ago
At this point I'd expect a non-UI community module to always produce a TurboModule, and be completely compatible with Fabric and Paper. -- Maybe the problem is that the template / props files have no way of being configured in a way that doesn't also add dependencies to WinUI - which might be useful for modules that want to provide calls into WinUI - but is overkill for ones that have no-UI at all.
We also need to work out how to correctly configure community modules to depend on the correct WinUI for paper vs fabric.
Tried enabling react-native-device-info
and doing the same in a Fabric app and ran into the same error:
Error MDM2009 Duplicate type Microsoft.UI.Xaml.Automation.Peers.AnimatedVisualPlayerAutomationPeer found processing metadata file C:\Users\yajurgrover.nuget\packages\microsoft.ui.xaml\2.8.0\lib\uap10.0\Microsoft.UI.Xaml.winmd, type already exists in file C:\Users\yajurgrover.nuget\packages\microsoft.windowsappsdk\1.4.240211001\lib\uap10.0\Microsoft.UI.Xaml.winmd. RNDeviceInfoCPP C:\Users\yajurgrover\new-account-repos\MyApp\node_modules\react-native-device-info\windows\RNDeviceInfoCPP\MDMERGE 1
@Yajur-Grover is this unblocked now with dependent changes merged? Is it safe to try async-storage again?
This change will be unblocked once https://github.com/react-native-async-storage/async-storage/pull/1147 is merged in. Once it's merged, we can try async-storage again, and then apply the same steps to clipboard.
Problem Description
I decided to try to push the Fabric chat app to the next level of legitimacy, by enabling some non-UI modules. async-storage, specifically: async-storage/packages/default-storage/windows. So I restored the dependency in my package.json:
"@react-native-async-storage/async-storage": "^1.17.11",
And it fails to build because...
Duplicate types.
Looking at the updated
package.lock.json
... it's pulling in Microsoft.UI.Xaml 2.8.0 (and WebView2). Which... async storage shouldn't need. It's just a code module, no UI. See this commitI'd guess this something with the RNW props pulled in its vcxproj that it'll need different for Paper UWP vs. Fabric Win32?
Steps To Reproduce
"@react-native-async-storage/async-storage": "^1.17.11",
Expected Results
Builds
CLI version
13.0.0
Environment
Target Platform Version
None
Target Device(s)
No response
Visual Studio Version
Visual Studio 2022
Build Configuration
Debug
Snack, code example, screenshot, or link to a repository
https://github.com/chrisglein/artificial-chat/tree/fabric_addModules
https://github.com/chrisglein/artificial-chat/commit/7c4e02df82e379e879745bf3ef8580991a0cdcdf