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

Fix compiling for iOS #46

Closed
wants to merge 6 commits into from
Closed

Fix compiling for iOS #46

wants to merge 6 commits into from

Conversation

ryanmcgrath
Copy link
Owner

Block off the animator proxy pieces for appkit/macos to fix iOS compiling. Animation support was exploratory to begin with, and the iOS APIs are different enough that they'd need some thinking through anyway.

@ryanmcgrath
Copy link
Owner Author

@madsmtm Curious if you have any idea offhand why cargo fmt would be giving inconsistent results - i.e, on my local machine it has no changes, yet CI here is complaining.

(The sheer number of files changed is also, admittedly, concerning, lol)

@madsmtm
Copy link
Contributor

madsmtm commented Aug 18, 2022

Nightly vs. stable rustfmt ;)

@simlay
Copy link
Contributor

simlay commented Aug 18, 2022

Nightly vs. stable rustfmt ;)

Huh. I am surprised by how much difference there is. Also, I like the rustfmt from stable more but I think that's because of the trailing commas on the last items in a struct/list/etc.

@@ -7,7 +7,7 @@ Since this needs to run in an iOS simulator or on a device, you can't run it lik
- Start a simulator (Simulator.app).
- `cargo install cargo-bundle`
- `cargo bundle --example ios-beta --no-default-features --features uikit,autolayout --target x86_64-apple-ios`
Copy link
Contributor

@simlay simlay Aug 18, 2022

Choose a reason for hiding this comment

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

Shall we add this to CI in a new github job?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Probably makes sense to do so, yeah - that way we'll know if I break it again ;)

@madsmtm
Copy link
Contributor

madsmtm commented Aug 18, 2022

Huh. I am surprised by how much difference there is. Also, I like the rustfmt from stable more but I think that's because of the trailing commas on the last items in a struct/list/etc.

Did this in #29 (comment) because it matched the previous output better (~= smaller diff). See rustfmt.toml for the nightly features.

@ryanmcgrath
Copy link
Owner Author

Hmmm, amusingly enough I've never considered how linking something iOS-specific on a GitHub action would work. If anyone's got ideas or done it before I'm all ears, otherwise I'll have to take a look this weekend - made two basic attempts but I'm probably missing something hella obvious.

@simlay
Copy link
Contributor

simlay commented Aug 19, 2022

Hmmm, amusingly enough I've never considered how linking something iOS-specific on a GitHub action would work. If anyone's got ideas or done it before I'm all ears, otherwise I'll have to take a look this weekend - made two basic attempts but I'm probably missing something hella obvious.

= note: ld: framework not found UIKit
[123](https://github.com/ryanmcgrath/cacao/runs/7912338422?check_suite_focus=true#step:5:124)
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

This is a new CI error for me. I've not used the action-rs/cargo action for iOS targets but I have done stuff with cargo-bundle and some annoying environment variables in a Makefile.

Comment on lines +68 to +72
- uses: actions-rs/cargo@v1
with:
command: build
target: x86_64-apple-ios
args: --example ios-beta --no-default-features --features uikit,autolayout
Copy link
Contributor

@simlay simlay Aug 21, 2022

Choose a reason for hiding this comment

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

From what I can tell, the build error you got in CI is the same as what I got when I ran cargo build --example ios-beta --no-default-features --features uikit,autolayout (notice the lack of --target x86_64-apple-ios). I think it needs to be done in the args section similar to how the use-cross section of the actions-rs/cargo` references.

@ryanmcgrath
Copy link
Owner Author

Closing since this was addressed/rolled in #48.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants