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
API documentation not generated in Xcode 8.1 #822
Comments
@dcilia Are you able to build your project via Xcode? Typically from my experience I have to build the project in Xcode before autocomplete of third-party packages shows up. |
@youming-lin yes, able to build, however, only |
@dcilia Confirmed. I am having the same issue with |
@dcilia @siavashalipour I am able to see function documentations of I am also able to CMD + Left Click on, say, the |
Same for me as above. I am running |
@youming-lin @dcilia |
Same issue here. Even when pulling from the |
Hm. Maybe there is a difference in the way the project was generated between XCode 8 and XCode 8.1? |
I believe so - I've noticed that 8.1 (SPM 3.0.1) has been generating Xcode projects with all dependencies + sources under the |
I just did a test, I took Kitura-Sample, built it fresh, ran I then installed XCode 8.1. First renamed the KituraSample.xcodeproj to KituraSample-1.xcodeproj and then ran Puzzling. |
I seem to have somehow messed up with that test. The simple statement above works quite well. |
@shmuelk did you test this in a file where Kitura is imported? I'm getting autocompletion in most places, but I lose it in files where I talk to Kitura. Especially in |
This is getting stranger. Auto-completion and API documentation works for LoggerAPI, HeliumLogger, Socket (BlueSocket), SwiftyJSON, and KituraTemplateEngine. It seems to fail for Kitura and KituraNet. |
@collinhundley The problem inside |
This is getting weirder by the minute. If I go inside Kitura.swift, suddenly auto-completion and displaying API documentation start working. The same is true, if I edit a file of KituraNet. |
This problem occurs in XCode 8.2 beta as well. |
I had assumed it was an incompatibility with the Kitura Not sure about you guys, but I've been getting a lot of hangs in Xcode between 8.0 and 8.1. |
That's hangs in XCode while editing or while running Kitura based stuff? |
While editing. I get beach balls every few mins and have to force quit the Xcode. I don't know if Kitura is source of the problem or if it's something else entirely. |
Thanks for all the feedback everyone - I still haven't gotten around the issue. |
I'm seeing the issue now, albeit inconsistently. Encountered this issue (unable to autocomplete |
@youming-lin it's possible that you've got old indexes of |
Same problem here for XCode 8.1. No autocompletion in Kitura framework... |
Just to throw my hat in, I'm seeing the same thing. Did the normal Tried Xcode 8, 8.1, 8.2b. Swift 3.0, 3.1 toolchain. All of these on Sierra fail to complete or see linked documentation on Router Handlers and much of the Kitura code base. |
We are stuck on this one... Does anyone have any idea how we can investigate further? |
@ianpartridge I don't have the full context of how the project is structured, but I would recreate a new a project with |
@ianpartridge I'm fairly certain that the autocomplete issues are a result of SPM changes, not necessarily Swift or Xcode changes. You might have noticed that I just pulled up a Kitura project that was generated pre-3.0.1, and the autocompletion works fine. Note that I'm opening it in Xcode 8.1, but the |
Confirmed that it might be an issue with Make sure you |
@dcilia using an existing project, I deleted the .xcodeproj and .build folder. Regenerated using Xcode 8 version of SPM. Did the normal derived data/clean build folders dance. Indexing is finished and it still chokes. Did I miss anything in my purge? |
@tomandersen it looks like they merged a fix - have you been able to test it with the latest snapshot/preview? |
I tried with a toolchain swift-DEVELOPMENT-SNAPSHOT-2016-11-12-a.xctoolchain Instructions from But got this error. Looks like |
I installed The project structure is fixed ( |
Continuing to dig deeper... I think I've determined that the root of the problem lies somewhere in I'm inclined to point fingers at the C libs, because I'm having a very similar issue with a personal project that uses |
Ok guys, I think I've figured it out. My hunch about the C libs was right, and the problem appears to be If you open up an Xcode project that imports To test it out, I removed the So, now we know what the problem is - but how do we fix it? I don't know why Xcode can't read the C lib but I've been having the same problem with @ianpartridge you recently made changes to |
We haven't touched CHTTPParser in quite a while. However, I'm in the process of making CHTTPParser a separate target within Kitura-net. I'm testing now what that does to the issues here. |
Doesn't seem to help any. |
@shmuelk what's different about CHTTPParser vs the other C libs? Like I mentioned before, I've found the same problem with LibXML2. |
I don't know. I also don't see the error about CHTTPParser once I click Build in XCode. I double checked XCode is taking the HTTPParser source from the correct place (from with KituraNet in my case). |
CHTTPParser isn't a "System Library" project as CCurl is for instance. |
I have a solution that works as a hack on the module.modulemap file in CHTTPParser I comment out the umbrella line, and add in hard wired header paths for the two headers... `
} This is done straight in Xcode 8.1, just change that file and hit run. Looks like it will need changing when you move the project, use github, or have lunch. So its a workaround, but it made us happy as we can now debug |
@shmuelk Oh yeah, I just realized CHTTPParser isn't using a module map. Since it isn't a compiled C lib and we're providing the source files directly, how is Swift handling it? I was under the impression that Swift couldn't compile C yet. @tomandersen are you using an older version of CHTTPParser? Ian Partridge removed the module map back in August. |
This is interesting. We don't have a modulemap file in CHTTPParser. Someone is generating it poorly. |
@tomandersen You are a genius. I have added a module.modulemap file and all is fixed. This will get fixed tomorrow morning Israel/European time as part of #843 |
@shmuelk so why did @ianpartridge take it out in the first place? Either way, glad it's finally figured out! |
I think the modulemap was incorrect it caused problems in XCode, if I remember correctly. Things were ok on XCode 8.0. It would seem that someone changed the way the generated modulemap was built. |
I'm an end user kind of coder, we are getting started on a new web app, have Xcode 8.1 installed and then git clone on Kitura-CredentialsSample and or the Kitura-Sample , then run, put break point at some route handler, and its broken until I do that hack above. |
We took it out because when it was there, users had to add @shmuelk with your latest fix, are we still able to run Kitura inside Xcode OK? |
Fixed in Kitura 1.2.0. Just released. |
Unsure if this is related, but it seems like the only related change I can see. I moved from 1.1.2 to 1.2.0 and the result is:
|
@siilime Can you share some details about your project setup? Have you tried clearing the |
@youming-lin Deleted the |
Hi all,
There seems to be an issue with
Kitura
andXcode 8.1
. Trying to access anyKitura
framework classes or functions has an Xcode act like the framework doesn't exist.Kitura
class to see the header instead goes nowhere (blank screen).Getting Started
code compiles fine.Kitura
related variables are not able to be inspected or anything.Steps to Reproduce:
Getting Started
guide.xcodeproj
by running$ swift package generate-xcodeproj
main.swift
and observeKitura
not able to be autocompleted and not able to view the headers in the framework.If someone can be so kind as to try and reproduce what I am seeing...
Cheers
The text was updated successfully, but these errors were encountered: