Jens Geyer created THRIFT-6304:
----------------------------------
Summary: Delphi serializer test still references
cDebugProtoTest_Option_AnsiStr_Binary, which is no longer generated
Key: THRIFT-6304
URL: https://issues.apache.org/jira/browse/THRIFT-6304
Project: Thrift
Issue Type: Bug
Components: Delphi - Library
Affects Versions: 0.22.0, 0.24.0, 0.23.0, 0.21.0
Reporter: Jens Geyer
Fix For: 0.26.0
{{lib/delphi/test/serializer/TestSerializer.Data.pas}} still checks the
generator option constant {{cDebugProtoTest_Option_AnsiStr_Binary}} in two
places (lines 204 and 356):
{noformat}
{$IF cDebugProtoTest_Option_AnsiStr_Binary}
result.SetBase64('base64');
{$ELSEIF cDebugProtoTest_Option_COM_Types}
{noformat}
THRIFT-5750 (commit 2adfd14c0, first released in 0.21.0) removed the
{{ansistr_binary}} option. Since then the generator no longer emits this
constant. The option constants it emits today are {{Register_Types}},
{{ConstPrefix}}, {{Events}}, {{XmlDoc}}, {{Async}}, {{COM_types}},
{{Old_Names}} and {{RTTI}}. The test was not updated in that change.
Free Pascal rejects the directive ("Compile time expression: Wanted Boolean but
got AnsiString"). How Delphi treats the undeclared identifier in the {{$IF}}
directive has not been verified.
Suggested fix: remove the two {{AnsiStr_Binary}} branches, since the option no
longer exists.
_Drafted with AI assistance (Claude Opus 5); posted on behalf of Jens Geyer._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)