-
-
Notifications
You must be signed in to change notification settings - Fork 624
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
Remove Sourcery version from header #1309
Remove Sourcery version from header #1309
Conversation
@dcacenabes Hello 👋🏻 Thank you very and very much for being initiative and creating this PR so quick! I wonder, can we have such a strategy to have a runtime flag, which would do what you did here? What do you think? |
Makes total sense! It will take me a little bit longer, since I am not familiar with the codebase and I need to understand it a little bit better. |
Just to make sure we're on the same page, you are suggesting to pass a command line option, something like force-parse or cacheBasePath ? Edit: More along the lines of logBenchmarks and parseDocumentation Sourcery/SourceryExecutable/main.swift Lines 97 to 98 in 7a12709
|
Yes, that would be perfect. |
I pushed some changes. |
Oh well, one can never be sure, there are 600 behavioural tests and one can only guess where to put the test. But once you write it, if it becomes too much of a hassle to put it into that specific Spec file, or everything around looks too "unrelated" - then you might want to consider other Spec files for its placement - my approach is like this to this day. |
I will merge this, and before the new release, will test with the automation if some regex needs to be adjusted in the scripting. Thank you very much 🤝 @dcacenabes and welcome to the Contributor club 🥳 🔥 |
commit 33be2ab Author: David Cacenabes <david.cacenabes@gmail.com> Date: Tue Mar 26 07:09:02 2024 +0100 Remove Sourcery version from header (#1309) * Remove version from headers * Remove from generated files * Revert "Remove from generated files" This reverts commit 9a8c14e. * Revert "Remove version from headers" This reverts commit 93ddd54. * Add support to hide header via config * Remove redundant self * Make non-lazy
* Update SwiftTemplate.swift Enables a single point of output into STDOUT during codegen from swifttemplate * Fixed failing tests * Squashed commit of the following: commit 33be2ab Author: David Cacenabes <david.cacenabes@gmail.com> Date: Tue Mar 26 07:09:02 2024 +0100 Remove Sourcery version from header (#1309) * Remove version from headers * Remove from generated files * Revert "Remove from generated files" This reverts commit 9a8c14e. * Revert "Remove version from headers" This reverts commit 93ddd54. * Add support to hide header via config * Remove redundant self * Make non-lazy
Very happy to be a contributor! 🎉 Thanks to you for your support and fast response! |
@dcacenabes I know this Pr is closed for some time now. But I am not able to figure it out how can I actually make use of this new flag
But it do not matter how many times I am trying to generate the file, the header comments including the version are in there. |
Hello @visma-ios-if , thank you very much for raising this! I've found out that this was not supported, and so I have added this feature in #1328. Please see PR's description for the format. |
Thanks for taking care of this! |
As discussed in issue #399 , including the Sourcery version in the generated files headers has side effects, like higher CI times due to unnecessary cache invalidation.
This PR removes any references to the version as part of the file headers