Jump to definition doesn't work with precompiled Swift frameworks and relative FRAMEWORK_SEARCH_PATHS

Originator:keithbsmiley
Number:rdar://42088037 Date Originated:11-Jul-2018 02:00 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 9.4.1 (9F2000)
Classification:UI/Usability Reproducible:Always
 
Summary:
Currently if you have a project that links a pre-compiled Swift module (a static framework in the attached example project), that you use a relative FRAMEWORK_SEARCH_PATH for, when you try and jump to definition, Xcode fails and shows the question mark pop-up.

Steps to Reproduce:
1. Pre-compile a Swift static framework in a project
2. Create a new project, copy the pre-compiled framework into the root of the new project
3. Add `.` to `FRAMEWORK_SEARCH_PATHS`
4. Add `-framework MODULE` to `OTHER_LDFLAGS`
5. Import the pre-compiled framework in your project, and reference a symbol
6. Build (this should be successful)
7. Jump to definition on either the symbol or the import

Expected Results:
You see the generated interface of the Swift module

Actual Results:
Xcode shows the question mark modal

Version:
Xcode 9.4.1 (9F2000)

Notes:
- You can work around this by using an absolute path in `FRAMEWORK_SEARCH_PATHS`, in the sample project change this to `$(SRCROOT)` to see jump to definition work
- You also don't have syntax highlighting of the referenced symbols in this case, and when you try to jump to definition it shows "No such module 'MODULE'"
- In Xcode 10 beta 3 syntax highlighting is correct, but regardless of relative or absolute path, there is an error, see rdar://42087654 for a repro case, so I cannot tell if this is fixed or not
- The attached project's binary was built with Xcode 9.4.1, so you'll need to use the same version of Xcode

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!