[BREAKING] Require --split or --no-split flag#87
Closed
liamnichols wants to merge 2 commits intomainCreateAPI/CreateAPI:mainfrom
Closed
[BREAKING] Require --split or --no-split flag#87liamnichols wants to merge 2 commits intomainCreateAPI/CreateAPI:mainfrom
--split or --no-split flag#87liamnichols wants to merge 2 commits intomainCreateAPI/CreateAPI:mainfrom
Conversation
Member
Author
|
Closing in favour of #95 |
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.
Background
--split(-s) the default behaviour #74To help guide people to generate efficient code, we want to make splitting source code into multiple files the default behaviour. This however would be a breaking change that would bring with it potential confusion if made on its own.
Instead, we should consider making the decision to split sources a conscious one during a transitional phase.
Changes
In this change, I update the
splitflag to remove the default value offalseand instead define an inversion that introduces the--no-splitflag.This means that when running
create-apiwithout specifying-s,--splitor--no-split, you will now get an error:If you already used
-sor--spliteverything is ok, but if you didn't, you will be forced to make a decision:--no-split--splitTo help guide users about this decision, I added some more discussion to the flag when using
--help:As a result in 0.1.0 you are forced to make a decision. In a future version however, we will relax this again by deprecating
--splitand--no-splitand replacing it with a more clearly named--merge-sourcesflag which defaults tofalse.Release Note
--splitor--no-splitflag when running the generator.--no-splitmatches the default behaviour prior to 0.1.0 but it is recommended to split your sources for improved build times of your generated code. For more information, see #74.