Thrift-Swift icon indicating copy to clipboard operation
Thrift-Swift copied to clipboard

Invalid redeclaration of 'description' / tag 1.0.7

Open ghost opened this issue 7 years ago • 2 comments

Hello! Faced with issue (tag 1.0.7): Invalid redeclaration of 'description' appears in all classes where description property exists

Up to tag 1.0.6 there was no issue.

My struct in .thrift file:

struct TCountryInfo {
	1: ID id,
	2: string title,
	3: string subtitle,
	4: string description,
	5: string image,
	6: ID countryId,
	7: Attributes attributes
}

Thrift generated code for this struct: class-property

class-extension

ghost avatar Jun 27 '17 08:06 ghost

Hello,

Have you tried using the debug_descriptions flag for the swift generator? This will conform to CustomDebugStringConvertible instead, which adds the debugDescription var in the extension.

thrift --gen swift:async_clients,debug_descriptions my_interface.thrift

wyland avatar Aug 15 '17 19:08 wyland

@wyland I am using latest tag. Generating code with parameter debug_descriptions causes error: debugdescription

Can be easily fixed manually but seems code generator works incorrect with debug_descriptions parameter.

ghost avatar Aug 16 '17 11:08 ghost