Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix inconsistently suffixed macOS flavored bundle directory #127997

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

Merged
merged 2 commits into from
Jun 14, 2023

Conversation

arnemolland
Copy link
Contributor

@arnemolland arnemolland commented May 31, 2023

The current implementation of macOS flavor support (#119564) assumes a bundle directory that differs from both the iOS implementation and the official documentation. The documentation instructs developers to suffix their Xcode build configurations with -<flavor>, but the implementation assumes a space:

String bundleDirectory(BuildInfo buildInfo) {
return sentenceCase(buildInfo.mode.cliName) + (buildInfo.flavor != null
? ' ${sentenceCase(buildInfo.flavor!)}'
: '');
}

Whereas the iOS implementation, which is the reference for the docs, assumes a -<flavor> suffix:

static String expectedBuildConfigurationFor(BuildInfo buildInfo, String scheme) {
final String baseConfiguration = _baseConfigurationFor(buildInfo);
if (buildInfo.flavor == null) {
return baseConfiguration;
}
return '$baseConfiguration-$scheme';
}

This change replaces the empty space with the - character which is in line with the documentation and iOS implementation, as well as removing the sentence-casing applied to the flavor name; every bundle built with a flavor keeps the original flavor name in its filename.

List which issues are fixed by this PR. You must list at least one issue.
#122684.

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

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

@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 Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on 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.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 31, 2023
@github-actions github-actions bot removed the tool Affects the "flutter" command-line tool. See also t: labels. label May 31, 2023
@arnemolland arnemolland force-pushed the macos-flavor-bundle-path branch 2 times, most recently from 21143ee to 4f8a23f Compare May 31, 2023 22:58
@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 31, 2023
@arnemolland arnemolland force-pushed the macos-flavor-bundle-path branch from 4f8a23f to 234cc12 Compare May 31, 2023 23:00
@github-actions github-actions bot removed the tool Affects the "flutter" command-line tool. See also t: labels. label May 31, 2023
@arnemolland arnemolland force-pushed the macos-flavor-bundle-path branch from 234cc12 to 2f5bb33 Compare June 1, 2023 10:39
@goderbauer goderbauer added the tool Affects the "flutter" command-line tool. See also t: labels. label Jun 1, 2023
@arnemolland arnemolland force-pushed the macos-flavor-bundle-path branch from 2f5bb33 to 058d385 Compare June 2, 2023 07:53
@JasCodes
Copy link

JasCodes commented Jun 3, 2023

@goderbauer looks like pretty straight forward, any plans to review merge this?

@JasCodes
Copy link

JasCodes commented Jun 9, 2023

Any update please?

@arnemolland arnemolland force-pushed the macos-flavor-bundle-path branch from 058d385 to 6ffde8a Compare June 10, 2023 20:56
@arnemolland arnemolland force-pushed the macos-flavor-bundle-path branch from 6ffde8a to abe4777 Compare June 14, 2023 06:47
@ryanduffyne
Copy link

Has there been any movement on this change. It seems pretty simple and would be a huge quality of life upgrade for developers. Currently the only way I can run the macos version of the app is through xcode and that is annoying. I don't like to have to document this for other developers as an exception to the rule for how to run the app during development.

@arnemolland
Copy link
Contributor Author

Has there been any movement on this change. It seems pretty simple and would be a huge quality of life upgrade for developers. Currently the only way I can run the macos version of the app is through xcode and that is annoying. I don't like to have to document this for other developers as an exception to the rule for how to run the app during development.

Hoping to get a review on this shortly, but it doesn’t look like a team member has particular ownership looking at the issue yet.

cc @goderbauer, @christopherfujino

@christopherfujino
Copy link
Contributor

Has there been any movement on this change. It seems pretty simple and would be a huge quality of life upgrade for developers. Currently the only way I can run the macos version of the app is through xcode and that is annoying. I don't like to have to document this for other developers as an exception to the rule for how to run the app during development.

Hoping to get a review on this shortly, but it doesn’t look like a team member has particular ownership looking at the issue yet.

Whoops, missed this in tool PR review last week. Looking now.

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

This looks good to me. However, I wonder if this would be a breaking change. @cbracken WDYT?

@ryanduffyne
Copy link

ryanduffyne commented Jun 14, 2023 via email

@cbracken
Copy link
Member

Yep this will be a breaking change, but given that we haven't officially announced flavours support (the device lab test was broken and was reverted while still in bringup mode), I think that's fine.

Thanks for CCing me. Taking a look.

I wonder if there's a way to get auto cc'ed on macOS-specific tool changes. There's an email-based patch monitoring tool I use; will see if that allows path-based filters. Will also see if there's a reasonable set of paths we can use for the GitHub bot to auto-tag these with the platform where relevant, if it's not too fragile.

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

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

LGTM stamp from a Japanese personal seal

@christopherfujino
Copy link
Contributor

Will also see if there's a reasonable set of paths we can use for the GitHub bot to auto-tag these with the platform where relevant, if it's not too fragile.

@cbracken If you decide on the paths you're interested in, adding entries to https://github.com/flutter/flutter/blob/master/.github/labeler.yml will enable auto-labeling.

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

LGTM

@christopherfujino christopherfujino added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 14, 2023
@auto-submit auto-submit bot merged commit 6d2b5ea into flutter:master Jun 14, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 15, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 15, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jun 15, 2023
flutter/flutter@95be76a...b0188cd

2023-06-15 [email protected] [web] Pass creation params to the platform view factory (flutter/flutter#128146)
2023-06-15 [email protected] [flutter_tools] cache flutter sdk version to disk (flutter/flutter#124558)
2023-06-14 [email protected] Fix inconsistently suffixed macOS flavored bundle directory (flutter/flutter#127997)
2023-06-14 [email protected] Update golden tests for material (flutter/flutter#128839)
2023-06-14 [email protected] Update getChildrenSummaryTree to handle Diagnosticable as input. (flutter/flutter#128833)
2023-06-14 [email protected] Improve the error message for non-normalized constraints (flutter/flutter#127906)
2023-06-14 [email protected] ContextAction.isEnabled needs a context (flutter/flutter#127721)
2023-06-14 [email protected] Remove temporary default case for PointerSignalKind (flutter/flutter#128900)
2023-06-14 [email protected] Respect allowlisted count of leaks. (flutter/flutter#128823)
2023-06-14 [email protected] Unpin flutter_plugin_android_lifecycle (flutter/flutter#128898)

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
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
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 tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants