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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Replace symbol hacks with AssociatedTypeRequirementsVisitor hacks #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nerdsupremacist
Copy link

@nerdsupremacist nerdsupremacist commented Jul 15, 2020

I built a generic version of the hacks we went over for decomposition into actions.

This one does not use any of the symbol hacks from before, but instead is betting on the implementations on changing the default associated type of their parent protocol.
I want to be clear that this is almost the same hack. Just now you can't see it ;)

This means we can get rid of all the linux workarounds 馃帀

It's completely fine if you don't want the added dependency, I just wanted to give you the option ;)

PS I have not tested on Linux. So let's hope the tests pass 馃

I built a generic version of the hacks I debugged with @a2 for decomposition.

This one does not use any of the symbol hacks from before, but instead is betting on the implementations on changing the default associated type of their parent protocol.

This means we can get rid of all the linux workarounds 馃帀
@a2
Copy link
Owner

a2 commented Jul 15, 2020

I noticed that you use some C code to call assembly directly. Do you know if that would work in the Swift Playgrounds app (#2)?

@nerdsupremacist
Copy link
Author

Uhhh very good question. We can certainly try. We should try on both iPad and Mac.

How can I get a playground working with this?
And do you have an iPad? I don't 馃槶

@a2
Copy link
Owner

a2 commented Jul 15, 2020

You can generate a playground by running the following: ./Playground/GeneratePlayground.swift -version 1.0.0 -debug false

I can test it on iPad, but I think the Playgrounds app only runs Swift, hence @liamnichols's decision to remove the Linux hacks for Darwin targets?

@liamnichols
Copy link
Contributor

You can open it up in the Swift Playgrounds app downloaded from the Mac App Store as well for testing to at least see that it compiles.

But yeah, Swift Playgrounds only allow Swift source files so I had to conditionally opt out of using the Linux hacks and revert back to the prior work around

@nerdsupremacist
Copy link
Author

Hmmm... What if we compile it (once for Mac once for iOS) and try to include the .framework... Perhaps that would work?

I mean the Playgrounds App obviously can interact with already compiled frameworks, just no idea if we can add new ones

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