Skip to content
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

Update .gitignore for Swift Package Manager #6705

Merged
merged 1 commit into from
May 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@

pubspec.lock

# iOS and macOS dependencies
Copy link
Member

@jmagman jmagman May 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In flutter/flutter#148018 you mention you're going to update the app template, you could alternatively make the change in each respective .gitignores so when you migrate the example project it matches? That's a lot more work though, up to you.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a lot more work though

FWIW, my understanding of why we have this root .gitignore is exactly that: that it was a pain to update every single package every time something got added to the gitignore upstream in the templates.

I don't love its existence, but since we already have it for this very scenario there's no real harm in expanding it to a new file. If I ever decide I dislike it enough to mass-update all the packages, it'll be the same amount of work regardless of the scope of the file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel strongly one way or another, I'm happy to do whatever folks think is the best practice here.

It does look like plugins' .gitignore files have diverged though. For example:

  1. https://github.com/flutter/packages/blob/main/packages/ios_platform_images/.gitignore
  2. https://github.com/flutter/packages/blob/main/packages/file_selector/file_selector_ios/.gitignore

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, not every plugin even has a .gitignore (ex. https://github.com/flutter/packages/tree/main/packages/video_player/video_player_avfoundation) . I would probably just do the root .gitignore

.build/
Podfile.lock
Pods/
.swiftpm/
.symlinks/

*instrumentscli*.trace
Expand Down