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
Modules from .swift
files in the same target aren't recognized.
#35
Comments
I assume you're referring to the syntastic checker here. The checker just runs |
Yes, that's correct. Let me see if I can get it working and I'll submit a pull request if I succeed. |
Awesome thanks! |
Did any of you figure this out? I know I have to add Cheers |
Based on this post |
With a lot of files, wouldn't the command line be too long? I wonder how swift deals with that when you have let's say 100 swift files. |
Interesting. Not sure. Keith Smiley
|
Instead of using |
I feel like you'd still end up with the same problems we've mentioned. |
The |
I did spend some time on this, but got distracted before I gave up. I think there are good clues to be had by looking at the build logs from Xcode itself. It does appear to passing all required files as arguments on the command line to
|
Updated my branch with commit at malkomalko@9abee95 fun! SwiftFiles()
let files=glob('**/*.swift', 1, 1)
let files=filter(files, 'v:val !~ "Tests/"')
let files=filter(files, 'v:val !~ "' . @% . '"')
let g:syntastic_swift_swift_post_args=join(files, ' ')
endfun
au BufWritePost *.swift call SwiftFiles() In action: http://malkocasts.com/2T1f2R0w1I2u As per @bpeabody's suggestion, I think you could easily do something where you parse the xcodeproj file to pull out a smarter list of swift source files, but this is good enough for me right now. |
I only see the 1 commit which doesn't include any other files besides the current one? |
I didn't know if you wanted to include the swift files function in the plugin so I just updated the checker. Thoughts? |
Definitely. Opened an issue with the features I think are the MVP for this: #38 I could definitely be convinced otherwise though. |
I apologize in advance if I'm missing something obvious, but I've been unable to figure this out on my own. If, for example, I have:
and
where
foo.swift
andbar.swift
are in the same target, it complains that it doesn't recognizeFoo
whenFoo
is used inbar.swift
. How do I configure this plugin to see other modules in the same target?The text was updated successfully, but these errors were encountered: