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

Conversation

loic-sharma
Copy link
Member

@loic-sharma loic-sharma commented May 9, 2024

The following directories were created when I added SPM support to the ios_platform_images plugin:

packages/ios_platform_images/ios/ios_platform_images/.build/
packages/ios_platform_images/ios/ios_platform_images/.swiftpm/

These shouldn't be checked-in to the packages repository.

Part of flutter/flutter#148018

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@loic-sharma loic-sharma marked this pull request as ready for review May 9, 2024 20:15
@@ -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

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@stuartmorgan
Copy link
Contributor

test-exempt: configuration change

Copy link
Contributor

@vashworth vashworth left a comment

Choose a reason for hiding this comment

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

LGTM

@loic-sharma loic-sharma added the autosubmit Merge PR when tree becomes green via auto submit App label May 9, 2024
@auto-submit auto-submit bot merged commit a8e9147 into flutter:main May 10, 2024
78 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 13, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 13, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 13, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 13, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request May 13, 2024
flutter/packages@6c4482a...1412041

2024-05-13 stuartmorgan@google.com [in_app_purchase] Update country code Android example (flutter/packages#6722)
2024-05-13 engine-flutter-autoroll@skia.org Roll Flutter from 1dfb46e to 1255435 (6 revisions) (flutter/packages#6723)
2024-05-13 43054281+camsim99@users.noreply.github.com [camera] Change default Android implementation from `camera_android` to `camera_android_camerax` (flutter/packages#6629)
2024-05-13 15619084+vashworth@users.noreply.github.com [image_picker_ios] Make all headers public for SwiftPM to keep inline with CocoaPods (flutter/packages#6707)
2024-05-12 engine-flutter-autoroll@skia.org Roll Flutter from 2aa05c1 to 1dfb46e (3 revisions) (flutter/packages#6715)
2024-05-11 engine-flutter-autoroll@skia.org Roll Flutter from 2bfb1b0 to 2aa05c1 (26 revisions) (flutter/packages#6713)
2024-05-10 stuartmorgan@google.com [quick_actions] Add Swift Package Manager support (flutter/packages#6682)
2024-05-10 stuartmorgan@google.com [url_launcher] Add Swift Package Manager support (flutter/packages#6677)
2024-05-10 43054281+camsim99@users.noreply.github.com [Android][webview_flutter] Run integration tests on emulators running Android 34 (flutter/packages#6499)
2024-05-10 50643541+Mairramer@users.noreply.github.com [image_picker_android] - will fix crash on Android 12+ devices (flutter/packages#6691)
2024-05-10 43054281+camsim99@users.noreply.github.com [camerax] Make fixes required to swap camera_android_camerax for camera_android (flutter/packages#6697)
2024-05-10 737941+loic-sharma@users.noreply.github.com Update .gitignore for Swift Package Manager (flutter/packages#6705)
2024-05-10 34871572+gmackall@users.noreply.github.com [quick_actions_android] Switch to `Compat` version of `ShortcutManager` to support Google surfaces (flutter/packages#6638)
2024-05-10 737941+loic-sharma@users.noreply.github.com [local_auth_darwin] Adds Swift Package Manager compatibility (flutter/packages#6708)
2024-05-10 engine-flutter-autoroll@skia.org Roll Flutter from 00f4066 to 2bfb1b0 (9 revisions) (flutter/packages#6706)
2024-05-09 38299943+VictorOhashi@users.noreply.github.com [go_router] Feat add route redirect shellroutes (#114559) (flutter/packages#6432)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this pull request May 22, 2024
The following directories were created when I added SPM support to the `ios_platform_images` plugin:

```
packages/ios_platform_images/ios/ios_platform_images/.build/
packages/ios_platform_images/ios/ios_platform_images/.swiftpm/
```

These shouldn't be checked-in to the packages repository.

Part of flutter/flutter#148018
arc-yong pushed a commit to Arctuition/packages-arc that referenced this pull request Jun 14, 2024
The following directories were created when I added SPM support to the `ios_platform_images` plugin:

```
packages/ios_platform_images/ios/ios_platform_images/.build/
packages/ios_platform_images/ios/ios_platform_images/.swiftpm/
```

These shouldn't be checked-in to the packages repository.

Part of flutter/flutter#148018
tsinis added a commit to tsinis/website that referenced this pull request Dec 14, 2024
sfshaza2 pushed a commit to flutter/website that referenced this pull request Dec 16, 2024
_Description of what this PR is changing or adding, and why:_

This PR adds notes about new `.gitignore` entries for those who want to
migrate their old packages to SPM.

_Issues fixed by this PR (if any):_

Without this step - the guide suggests _"Commit your plugin's changes to
your version control system"_ with those `.build/` and `.swiftpm/`
directories newly created in previous steps.

_PRs or commits this PR depends on (if any):_

flutter/packages#6705

## Presubmit checklist

- [x] This PR is marked as draft with an explanation if not meant to
land until a future stable release.
- [x] This PR doesn’t contain automatically generated corrections
(Grammarly or similar).
- [x] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).
- [x] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants