fix: fix path of the file output from the tool #1092
Closed
k-takeuchi220 wants to merge 1 commit intogo-gorm:masterfrom
Closed
fix: fix path of the file output from the tool #1092k-takeuchi220 wants to merge 1 commit intogo-gorm:masterfrom
k-takeuchi220 wants to merge 1 commit intogo-gorm:masterfrom
Conversation
Member
|
Thanks for the PR and the detailed write-up — the motivation makes sense. However, the current approach changes the semantics of existing options in a way that would be breaking for existing users:
Given the scope (public Workarounds without upstream changes:
If you’d like to revisit this, I think the safest direction would be keeping Happy to take another look if you can rebase onto latest master and propose a non-breaking, gentool-scoped change. |
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.
What did this pull request do?
Due to the following problems, we have changed the output destination of the files.
Problem 1
When specified as follows, the model file is created in ./src/model:
What I expect is for the model file to be created in ./src/domain/model:
Problem 2
Using the modelPkgName option also exhibits strange behavior when specifying a string containing a path separator.
In this case, since outPath is not specified, it is expected that the model files would be generated in dto/model/src/domain, but in reality, they are created in ./src/domain.
Current behavior
If modelPkgName does not contain a path separator, output the model files to outPath + modelPkgName.
If modelPkgName contains a path separator, output the model files to the path specified in modelPkgName.
Problem 3
The outputPath specifies the location of the query folder, and the location of the model file is determined accordingly.
However, from a naming perspective, I think this is confusing and not a suitable behavior.
User Case Description
Behavior after modification
I have added an option called queryPkgName. The destination for generating query files will be outPath + queryPkgName. This applies similarly if queryPkgName contains a path separator.
Likewise, the destination for generating model files will be outPath + modelPkgName. This also applies similarly if modelPkgName contains a path separator.
There is no change in default behavior if no output destination is specified. However, it is important to note that if the outPath option and modelPkgName option are specified and used, the generated results may differ.