Description
Problem
score::StringLiteral was deprecated in score_baselibs with message:
"No longer supported. Use std::string, std::string_view, safecpp::zstring_view, or const char*"
applicationcontext.h still uses it in the constructor declaration (line 41):
ApplicationContext(const std::int32_t argc, const score::StringLiteral argv[]);
Since application.h #includes applicationcontext.h, any translation unit compiled
with -Werror,-Wdeprecated-declarations (COMPILER_WARNING_FEATURES) that transitively
includes application.h will fail with a build error.
Impact
20 targets in eclipse-score/config_management fail to build, including:
//score/config_management/config_daemon/code/app/details:app
//score/config_management/config_daemon/code/data_model:parameterset_collection
//score/config_management/config_daemon/code/factory:interface
//score/config_management/config_daemon/code/plugins:plugin
//score/config_management/config_daemon/code/json_helper:json_helper
(and 15 more targets)
Suggested Fix
Replace score::StringLiteral with const char* in applicationcontext.h ---this is a
fully compatible change since StringLiteral is an alias for const char*:
// Before
#include "score/memory/string_literal.h"
ApplicationContext(const std::int32_t argc, const score::StringLiteral argv[]);
// After
ApplicationContext(const std::int32_t argc, const char* const argv[]);
References:
https://github.com/eclipse-score/lifecycle/blob/main/src/lifecycle_client_lib/include/applicationcontext.h#L41
https://github.com/eclipse-score/baselibs/blob/main/score/memory/string_literal.h
Analysis results
No response
Solution
No response
Error Occurrence Rate
None
How to reproduce
No response
Supporting Information
No response
Classification
Minor
First Affected Release
not released (main)
Last Affected Release
not released (main)
Expected Fixed Release
before release (main)
Category
Description
Problem
"No longer supported. Use std::string, std::string_view, safecpp::zstring_view, or const char*"
applicationcontext.h still uses it in the constructor declaration (line 41):
Since application.h #includes applicationcontext.h, any translation unit compiled
with -Werror,-Wdeprecated-declarations (COMPILER_WARNING_FEATURES) that transitively
includes application.h will fail with a build error.
Impact
20 targets in eclipse-score/config_management fail to build, including:
//score/config_management/config_daemon/code/app/details:app
//score/config_management/config_daemon/code/data_model:parameterset_collection
//score/config_management/config_daemon/code/factory:interface
//score/config_management/config_daemon/code/plugins:plugin
//score/config_management/config_daemon/code/json_helper:json_helper
(and 15 more targets)
Suggested Fix
Replace score::StringLiteral with const char* in applicationcontext.h ---this is a
fully compatible change since StringLiteral is an alias for const char*:
References:
https://github.com/eclipse-score/lifecycle/blob/main/src/lifecycle_client_lib/include/applicationcontext.h#L41
https://github.com/eclipse-score/baselibs/blob/main/score/memory/string_literal.h
Analysis results
No response
Solution
No response
Error Occurrence Rate
None
How to reproduce
No response
Supporting Information
No response
Classification
Minor
First Affected Release
not released (main)
Last Affected Release
not released (main)
Expected Fixed Release
before release (main)
Category