-
-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve scaffold feature's default parameter type for stencil file #5845
Conversation
ec9afdd
to
7b1d617
Compare
c519413
to
fd657ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this PR π
Might be also worth updating one of the scaffold acceptance tests to test this end-to-end.
The test failure looks unrelated and should be fixed by updating the branch.
@danyf90 @fortmarek While writing additional tests, a critical issue was discovered. Unlike One idea that comes to mind is to provide users with an explicit interface. We can define possible types as an enum and use associated values to store the desired values. For example, In the same context, various types such as bool, integer, dictionary, etc., are also possible. |
If the interface changes, it could be a breaking change. |
I think we need something like PList.Value:
|
@danyf90 |
f5d92cc
to
5f3243b
Compare
4547082
to
a454d52
Compare
@haeseoklee do you mind rebasing from the latest changes in |
@pepicrft Thank you, I will try to do the rebase |
a454d52
to
a441161
Compare
...s/ios_app_with_templates/Tuist/Templates/custom_using_attribute/custom_using_attribute.swift
Outdated
Show resolved
Hide resolved
Head branch was pushed to by a user without write access
201475c
to
40f2706
Compare
This reverts commit e4e69d0.
Thank you, please avoid force pushing on the branch. We squash-commit anyway so it just makes review harder π |
The failing tests are unrelated to your changes and have already been fixed in |
@danyf90 |
No worries! Thanks a lot for your contribution π₯ |
Resolves #5462
Short description π
The scaffold template's optional parameter is improved to support a variety of types (including Dictionary, Int..) for stencil file. The expected effect is that stencil's
renderTemplate
method will be able to receive a custom context.Additionally, after being able to pass various types of parameters in the source code, users can construct a more expressive template file.
After
How to test the changes locally π§
Contributor checklist β
mise run lint:fix
Reviewer checklist β
changelog:added
,changelog:fixed
, orchangelog:changed
, and the title is usable as a changelog entry