Skip to content

Conversation

@goderbauer
Copy link
Member

These files are re-generated on every flutter run, sometimes there are changes which cause annoying diffs on local machines.

These files are already gitignored in our repo [1] and I think we should just remove the files that were checked in before they were added to .gitignore.

[1] https://github.com/flutter/flutter/blob/master/.gitignore

@mit-mit
Copy link
Member

mit-mit commented Dec 12, 2017

@mravn-google can you think of any issues with removing these?

@mravn-google
Copy link
Contributor

Following this change, you cannot clone the Flutter repo and then launch these apps from Android Studio. You need to run flutter run first to have the GeneratedPluginRegistrant.java... well, generated. Similarly for direct Xcode launches on iOS.

It is also slightly controversial to have untracked source files like this in a source folder. In fact, I believe the intention from early Spring was to remove them from .gitignore instead, and have people check them in along with pubspec.yaml, pubspec.lock, and Podfile.lock, as these all tend to change together. Can't find the issue right now though.

@mravn-google
Copy link
Contributor

Alternatively, we should generate the plugin registrant files as part of flutter packages get which I guess people also need to run between cloning the repo and the first launch from an IDE.

@mit-mit
Copy link
Member

mit-mit commented Dec 12, 2017

I really like that idea. 'package get' is logically 'get dependencies' and the generated registration code is logically in that category.

@Hixie
Copy link
Contributor

Hixie commented Dec 12, 2017

We should either remove these files from the repo, or add a test that verifies that the files are up to date. We keep accidentally not updating them.

I don't understand why launching from an IDE can't also generate these files. It compiles the Dart code, right? Why can't it also do pub get and generate these files, just like flutter run?

@goderbauer
Copy link
Member Author

And if they need to be in the repo can we remove their entry from the .gitignore?

Hixie added a commit to Hixie/flutter that referenced this pull request Dec 14, 2017
Temporary fix while waiting for flutter#13500 to be resolved.
@goderbauer
Copy link
Member Author

Closing this because #13541 is submitted as a work-around.

Discussion can continue in #13554.

@goderbauer goderbauer closed this Dec 14, 2017
@goderbauer goderbauer deleted the gitignore branch December 14, 2017 01:55
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants