Xcode won't autocomplete file names in #import statements

Originator:guillaume.algis
Number:rdar://45588002 Date Originated:26-Oct-2018 05:20 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 10
Classification:Other Bug Reproducible:Sometimes
 
Summary:
On Xcode 10, when autocompleting a file name inside a `#import "…"` statement, Xcode will only propose files in the same directory as the file currently being edited.

Note that it does not appear to be the case when creating a new project, but the bug is quite consistently reproducible in my pre-Xcode10 project.

My project is mainly in Objective-C, with some mix of C++, and some Swift for UI tests.
I'm using Clang modules, Cocoapods

Steps to Reproduce:
- Open a file in a directory
- Add an `#import ""` statement
- Position the cursor inside the quote
- Press Ctrl + Space to open the autocomplete menu

Expected Results:
Xcode proposes to autocomplete to all files (or at least headers) in the project.

Actual Results:
Xcode proposes only files in the same directory as the current file.

Version:
Xcode 10

Notes:
Reproduced on Xcode 10 GM and 10.1 beta 3 (10O45e).

I unfortunately cannot share the project I'm reproducing this on, but I attached a short video demonstrating the issue.

Please don't hesitate if you need more info, I'd be happy to help resolve :)

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!