SolaWing / xcode-build-server

a build server protocol implementation for integrate xcode with sourcekit-lsp
MIT License
371 stars 19 forks source link

[Proposal] Support for multiple schemes #62

Open ychie opened 1 month ago

ychie commented 1 month ago

Hi @SolaWing ,

Description: I'm working on a project with multiple schemes and noticed that autocompletion only works for the scheme set in buildServer.json. This makes it a bit challenging to work on multiple schemes at the same time.

Proposal: Would it be possible to add support for autocompletion across multiple schemes simultaneously? This would make it easier to work on projects with more than one active scheme without needing to switch settings constantly.

Questions: Do you think this would be a useful feature? Do you think it's technically possible to implement?

Offer to Help: If it's possible but not on your roadmap, I'd be happy to try implementing it myself. Let me know what you think!

SolaWing commented 1 month ago

Thank you for your advice. This seems to be a very useful ability. However, to support such capabilities, it is necessary to deal with the problem of flags conflicts between the same file and different schema. The optional strategy is to set the priority, which can be the last build time, or the user can specify it manually. I tend to automatic support all schemes, according to the last build time. this way just need to merge all build log, observe any scheme changes, and it will be ok.

PS: The current flags source itself supports merge. If you select a scheme first and then switch to another scheme after running, you will find that the files of both schemes are supported. The files unique to the previous scheme still retain the previous flags, but because it is not the current scheme, the update will not trigger the update.

PS2: Use the config command to change the buildServer configuration regenerated by the scheme, which takes effect in real time.