Code completion for stdlib modules


The TensorFlow module located in swift/stdlib/public/ is not getting code-completed. Is there a hard-coded list somewhere in the compiler for code-completing stdlib modules?


1 Like

I believe code completion for imports is handled directly by Xcode, yes.

Is the part that handles code completion open-source? If not, can it be generalized to be part of the compiler?

Jordan was incorrect: completion of module names is implemented in SourceKit, not Xcode. The reason it isn't working is that we are only completing Clang modules, and don't yet support pure Swift modules.

If you were interested in implementing completion of Swift module names, be aware that we would want to cache the results at least for system search paths so we don't have to walk the filesystem on every import completion.

1 Like