Skip to content

Conversation

@asyncmeow
Copy link

Flutter projects on MacOS previously could not build when using Flutter provided by a Nix environment, as the nix store is read-only, and permissions are preserved when copying the FlutterMacOS.framework directory from the Flutter installation. This causes issues because XCode/xcbuild expect the framework directory to be writable after it is copied.

This pull request changes the rsync command used to copy the FlutterMacOS.framework directory to include `--chmod=755" (user can read/write/execute, group can read/execute, which seems to match the permissions expected here) to ensure the permissions are correctly set..

This issue fixes #147142

Pre-launch Checklist

(re: adding new tests - not sure if i need to add tests for this, or how I would even add tests?)

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

Flutter projects on MacOS previously could not build when using Flutter provided by a Nix environment, as the nix store is read-only, and permissions are preserved when copying the FlutterMacOS.framework directory from the Flutter installation. This causes issues because XCode/xcbuild expect the framework directory to be writable after it is copied.
@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.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Apr 21, 2024
@andrewkolos
Copy link
Contributor

Thanks for contributing. This PR appears to be failing tests. Also, per the bot comment above, the change in this PR is not under test. Please address this if you would like this PR to be reviewed.

@nilsreichardt
Copy link
Contributor

nilsreichardt commented May 19, 2024

Thanks for your PR! It seems that #148580 is also trying to fix this problem.

@jmagman
Copy link
Member

jmagman commented May 20, 2024

--chmod=755 doesn't work

rsync: Invalid argument passed to --chmod (755)

#148580 is similar, but works and has tests, and will close this PR.

@LouiseHsu LouiseHsu closed this in 185f526 May 20, 2024
flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request May 20, 2024
…erMacOS.framework (flutter#148580)

Fixes flutter#148354

Fixes flutter#147142
Closes flutter#147144

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building Flutter projects on MacOS fails if FlutterMacOS.framwork is read-only (ie. in a Nix environment)

5 participants