Opening a Swift script (per the run line) should provide code completion and everything

Originator:jediknil
Number:rdar://FB8734022 Date Originated:2020-09-23
Status:Open Resolved:
Product:Xcode Product Version:11.5 (11E608c)
Classification:Suggestion Reproducible:
 
SwiftPM support in Xcode is amazing, but sometimes I just have a single-file script that I don’t want to turn into a package. It would be nice™ if Xcode could implicitly treat those /like/ a package with minimal configuration though, in order to allow code completion and such when editing those scripts. You could detect any combination of #! lines:

#!/usr/bin/swift
#!/usr/bin/env swift
#!/usr/bin/xcrun swift

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!