Removing generated files #18
Closed
MillerAdulu
started this conversation in
General
Replies: 1 comment 1 reply
-
Resolved in #19 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I propose for us to consider not committing generated files:
The proposed reason for this is that as many people begin to work on the app and where there might be slight changes in the generated files, it usually becomes chaotic to merge. The easiest way to merge is usually to delete the conflicting files and regenerate them since it's not recommended to edit them by hand.
For purposes of online builds, what can happen is that we can introduce a GitHub action to generate those files when the APK is being built. To add the gen command after the
Get dependencies
step. This way, we keep the codebase light and only files that require actual changing by hand. It can be argued that committing them prevents unnecessary build times on the CI/CD pipeline, but the effort to merge when a conflict arises is more trouble than building them on the CI/CD pipeline.For next steps, I recommend creating an issue that will open a PR to delete those files and in addition, update the docs to reflect this change and show how to go about the build. Many open-source projects have
Makefile
s which normally have already defined commands that can be run quickly or copied on the terminal and then referenced in the docs. It's not standard Flutter practice to have a script section like composer.json (PHP) and package.json (JS) so a Makefile is the best possible solution.Here's a small sample from a Makefile I use for a couple of projects.
Beta Was this translation helpful? Give feedback.
All reactions