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

Does not work with playgrounds. #15

Open
AtomicCat opened this issue Nov 27, 2017 · 3 comments
Open

Does not work with playgrounds. #15

AtomicCat opened this issue Nov 27, 2017 · 3 comments

Comments

@AtomicCat
Copy link

When run from a playground, I get the error Generate_Swift_Initializer.SIGError error 0. I assume this is SIGError.notSwiftLanguage. Maybe there is something special about the main source file in a playground...

Seems to work great in regular projects.

@Bouke
Copy link
Owner

Bouke commented Dec 13, 2017

In the SIGError enum the first case is notSwiftLanguage, which would probably be the 0 that you get. However in SourceEditorCommand.swift playgrounds are also valid: "com.apple.dt.playground". So your source type must be even something different. Can you step through the code and see what the value of invocation.buffer.contentUTI is?

@karlpuusepp
Copy link
Contributor

@Bouke The contentUTI is "com.apple.dt.playgroundpage". This is not checked in SourceEditorCommand.swift.

@Bouke
Copy link
Owner

Bouke commented Dec 20, 2017

Ah, you're working with multiple pages, it seems? Can you create a PR to resolve this?

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

No branches or pull requests

3 participants