wickwirew / Runtime

A Swift Runtime library for viewing type info, and the dynamic getting and setting of properties.
MIT License
1.08k stars 94 forks source link

Framework/Test Targets for macOS #4

Closed helje5 closed 6 years ago

helje5 commented 6 years ago

I hope those do not confuse the Cocoapod.

This stuff makes it build as a Cocoa framework. Building things works fine, but the tests actually crash on macOS (same w/ spm test btw).

wickwirew commented 6 years ago

What test fails? Is it the create class in the issue you made?

helje5 commented 6 years ago

Check issue #5. This is not related to Linux, it is just the same tests you run on iOS, fail on macOS. Seems to be an RC issue.

This PR is just adding a target to the Xcode project to build a macOS framework & tests. It should be fine to merge, unless they break the pods, don't know how that works.

wickwirew commented 6 years ago

I think I may be reverting the SPM stuff so I'm going to hold off. Not a big fan of the massive restructure. When I first looked over the PR it didn't show all the the moved files and only showed about 400 line changes but once merged I saw the full extent of the changes. My mind was also clouded by excitement of my first contributor lol. I think all of the changes minus the file restructure are good and we need them in but I would like to keep the project structure the same. In swift 4 they did a full redesign of the SPM and I believe now you don't have to have all of the /Sources folder. Take a look at ReSwift and they support SPM but have a normal more traditional fire structure.

helje5 commented 6 years ago

Hey, no problem, it's your very own project! ;-) I'm not entirely sure where you see a "massive restructure", the files just got moved into Sources/Tests, thats it, but sure, if you don't like it, there is no obligation to accept PRs :-)

wickwirew commented 6 years ago

I made a new develop and added the Package.swift and it builds fine for a test project as a dependency. So if you want to start fresh and branch off, so the git history isnt insane, that and copy some of the changes for linux/test over that would be good. I can do it if you really don't want too. Sorry again lol.

helje5 commented 6 years ago

BTW: This PR #4 is completely unrelated to SPM or Linux. It is about adding a regular macOS Target to the regular Xcode project you have. Do you want this? I think it would be good to get it working on macOS first, and then checkout Linux. I think it would be good to have at least a cannotCreateInstanceOnThisPlatform error.

(also: I'm personally fine w/ not having instance construction, I'm mostly interested in property write access, which does seem to work fine across platforms).

helje5 commented 6 years ago

Anyways, if you reverted the directory structure, this would need an update, so do not commit merge yet ;-)

helje5 commented 6 years ago

Actually, let me close this, I'm going to create a new PR.