Remove auto import or make a setting to be available to disable it.

Originator:yoiiiuk
Number:rdar://FB9816645 Date Originated:21.12.2021
Status:opened Resolved:-
Product:Xcode Product Version:13.1
Classification: Reproducible:true
 
Xcode 13 introduced automatic imports. It works really bad. Want to have a setting to disable it.

https://stackoverflow.com/questions/69839535/xcode-13-turn-off-auto-import-feature/69917221

Comments

Hours Wasted

Had a big update in hindsight should have made it a couple PRs but I am still mad because auto import caused all my misery. Buried In this giant commit was an import of XCTest into a non testable file it was a perfect storm with a new package that also replaced an old package and a clang linker error coming down to that package... I spent hours messing with the package manager and looking for issues related to the package versions and it all came down to an auto imported XCTest. I want to disable this now.

Also every so often during a code review I will notice that some random resource is being imported and I just hope everyone is catching them all.

By sterling.lutes at May 5, 2022, 5:38 p.m. (reply...)

A nightmare with SPM

Caused random compilation fail on our CI because auto-import doesn't check if the module is actually in SPM dependencies ...

Same for us We would love the ability to turn off this feature please.

By jason.akakpo at March 4, 2022, 7:06 a.m. (reply...)

It works badly with spm

We got couple circular dependencies in our SPM graphs because of this feature. Please allow devs to disable it

By LeonidSilver at Feb. 8, 2022, 11:39 a.m. (reply...)

well intended but causes more harm than it helps

+100, it's been causing a couple of failures for us as well. Combined with the build system, which often does not actually complain when the app is compiled for tests in our pre-push hooks, this creates long delays in our pipeline.

+100 | Causing build issues for my team

This has resulted in several build issues for my team because XCode assumed a certain dependency which was not even linked to the project. An option to disable this would allow us to not have to double check commits for randomly placed imports.

Thank you.

By Wellington.Moreno at Dec. 30, 2021, 5:54 p.m. (reply...)

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!