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

Make source code buildable on macOS #342

Closed
wants to merge 2 commits into from

Conversation

honghaoz
Copy link
Contributor

This PR updates the package buildable on macOS, to address the SwiftUI preview issue on macOS, see #341

@NoemiRozpara
Copy link

@JulesMoorhouse @honghaoz hey! First of all, thanks for taking your time to fix this issue - it's been bugging me for a while and getting SwiftUI canvas back would be awesome ✨ Will you have some time soon to take a look at the failing action? I just added the forked version to my project and seems to be fine 🤞

@Archish27
Copy link

Hello @Zandor300 Can you please merge this PR?

@honghaoz
Copy link
Contributor Author

@Archish27 Hi I have just updated the PR. I hope we can merge this change sooner. 🙇

@honghaoz
Copy link
Contributor Author

@Zandor300 Thanks for triggering the build. However, it seems like danger action failed because it couldn't find commit 87f53f07, which is the commit from my forked repo:

bundler: failed to load command: danger (/Users/runner/work/DeviceKit/DeviceKit/vendor/bundle/ruby/2.6.0/bin/danger)
RuntimeError: Commit 87f53f07 doesn't exist. Are you running `danger local/pr` against the correct repository? Also this usually happens when you rebase/reset and force-pushed.

From the checkout action:

Fetching the repository
  /usr/local/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +028963b08f03943779[45](https://github.com/devicekit/DeviceKit/actions/runs/7345636611/job/20014482957#step:2:50)bba4b94f3c8df80a9585:refs/remotes/pull/342/merge
...
Checking out the ref
  /usr/local/bin/git checkout --progress --force refs/remotes/pull/342/merge
  HEAD is now at 028963b Merge 87f53f07e85393672c276411695faf25e40db13a into 43a9f9388636be506fed8b6b86f858d759a21178
/usr/local/bin/git log -1 --format='%H'
'028963b08f0394377945bba4b94f3c8df80a9585'

The head is 028963b, which is a new merge commit from my commit (87f53f07)

Looks like the checkout action only fetched the last commit (028963b) due to --depth=1, but danger action is trying to find the parent commit 87f53f07, which is not fetched.

Maybe we need to adjust the checkout action fetch more history? or maybe the danger action should smartly use the merging commit.

@Zandor300
Copy link
Member

@honghaoz @NoemiRozpara @Archish27
I've made another PR, that doesn't exclude the entire library when compiling. I'm unable to reproduce the actual issue you are having so could you try my PR or provide an example project where it is happening?

#376

@honghaoz
Copy link
Contributor Author

honghaoz commented Jan 15, 2024

@Zandor300 I just tried it out, unfortunately, both the master branch and feature/merge-prs are broken. It seems like you are still actively working on it?
For the current master branch, it won't compile for two issues:

  1. In Package.swift, it should bump up the spm tool version to 5.8 // swift-tools-version:5.8 to support the privacy manifest file
  2. Bunch of compiling issues, like:
CleanShot 2024-01-15 at 14 40 56@2x

@honghaoz honghaoz mentioned this pull request Jan 15, 2024
@honghaoz
Copy link
Contributor Author

honghaoz commented Jan 15, 2024

@Zandor300 Here is a followup PR (#379) based on the latest master branch.

@honghaoz
Copy link
Contributor Author

Closes this PR in favor of #379

@honghaoz honghaoz closed this Jan 15, 2024
@honghaoz
Copy link
Contributor Author

honghaoz commented Jan 15, 2024

I've made another PR, that doesn't exclude the entire library when compiling.

tbh, since the library doesn't support macOS, it seems unnecessary to include the code for macOS. unless we decided to include Macs.

@honghaoz
Copy link
Contributor Author

honghaoz commented Jan 15, 2024

I'm unable to reproduce the actual issue you are having so could you try my PR or provide an example project where it is happening?

@Zandor300 Here is an example project shows the issue: DeviceKit-Mac.zip. I tested on Xcode 15.2.

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.

5 participants