Closed lickel closed 6 months ago
Possibly related: if I use a DeclaredTypeName
only in an extension, it doesn't implicitly import the module, which is kind of unexpected.
Related: https://github.com/square/wire/pull/2455/files#r1188014149
@lickel Can you provide a repro case?
Certainly not all inclusive, but you'll notice the type public enum CodingKeys : Swift.String, Swift.CodingKey
Sorry if that gradle config is not portable.
The output file is:
SwiftPoet-Sample/app/SwiftPoet-Sample.swift
I think this is caused by this https://github.com/outfoxx/swiftpoet/pull/55 change.
I think this is actually resolved with https://github.com/outfoxx/swiftpoet/pull/90
@dnkoutso Can you confirm this is fixed?
I believe it is. Will close for now.
Updating Square/Wire from v1.3.1 => v1.5, I saw a regression where declared type names are regularly being expressed with their fully qualified name.
We're semi-frequently doing something to the effect of
io.outfoxx.swiftpoet.STRING.makeOptional().makeNotOptional()
; however, we're also directlyDeclaredTypeName.typeName("Wire.ProtoWriter")
in an extension, which similarly loses the understanding of Wire being imported.It looks like only types used within an
extension
have this limitation?https://github.com/square/wire/pull/2454