Refactor!/move code gen to separate package#201
Open
CrownedPhoenix wants to merge 3 commits intomaticzav:mainfrom
Open
Refactor!/move code gen to separate package#201CrownedPhoenix wants to merge 3 commits intomaticzav:mainfrom
CrownedPhoenix wants to merge 3 commits intomaticzav:mainfrom
Conversation
added 3 commits
March 7, 2024 22:57
This is primarily beneficial because it removes dev related dependencies from the Swift package. This will make it play nicer as an import because it won't force consumers to clone and build all the non-product dependencies.
This dependency was shared with some of the code that was migrated to another repo. The code was pretty simple so it made sense to duplicate it to eliminate the blocking dependency.
Collaborator
|
Current focus has been on v6 which resolves these and many other issues. The plan wasn't to make large scale changes to the existing library to minimise impact on those not ready to migrate when v6 releases. I'll take a deeper look at this when I have some time, but I'm hesitant at a glance, purely since it doesn't align with current planned work and we have extremely limited time as it is. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is primarily beneficial because it removes dev related dependencies from the Swift package. This will make it play nicer as an import because it won't force consumers to clone and build all the non-product dependencies.
This is also pretty important for getting the package to work on linux since by separating the dev/code-gen dependencies from the production code we free up the opportunity to use non-linux dev/code-gen tools/dependencies (which is fine in my use case) while still maintaining the production code's ability to compile on linux.
There's still some stuff I haven't totally grokked about your CI/dev setup to effectuate this change fully so this will probably need from edits from your side.
See https://github.com/CrownedPhoenix/swift-graphql-code-gen/tree/experiment/separate-code-gen-package for an example of the separate package in action. Obviously, you ought to make a new repo under your namespace and transfer the code and fix it up.