I also didn't and still don't understand why it was such a big deal with source sharing when it actually allows use the same helpers in both modules, and avoids having to move code at all. Moving functions from one module to another can be done entirely through the spec file entry mapping: stateless functions can safely be exported from both modules at any time, and cfgmgr32 can import stateful functions from setupapi until we move them all at once by swapping the spec forwards around.
Sure, but note that it would be fine for setupapi to already forward to cfgmgr32 for any function that's properly implemented there, we don't have to do it all at once at the end. Sharing the source works of course, but it's cleaner to stick to the exported API when possible, since it guarantees we are not sharing internal helpers that would have to be removed later. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10078#note_129605