Skip to content

Proposal: Set Ice.Program fallback value during Communicator initialization. #4565

@externl

Description

@externl

Ice::initialize should give Ice.ProgramName a fallback value (in case it's not set by the user).

Currently, if not set by the user we set Ice.Program name during the construction of Properties, but only in one of the constructors, and only in some languages.

What is the current behavior:

  • C++: We set from args argument in the Properties-with-args constructor. Users need to be careful not to pass a random list.
  • C#: We get it from AppDomain.CurrentDomain.FriendlyName
  • Java: Nothing. Maybe I just don't see it?
  • Ruby: We docallRuby(rb_gv_get, "$0");(We actually do this in two places: properties construction and communicator initialization.
  • Python: Nothing. We rely on C++ args behavior.
  • MATLAB: We set to "matlab-client"
  • PHP: Nothing. We rely on C++ args behavior. this only works if calling php script.php, if you're calling from something like php-fpm this will not bet set I think.
  • JS: Nothing.
  • Swift: Nothing. We rely on C++ args behavior.

Proposal

  • Stop setting Ice.Program name in Properties-with-args in C++.
  • In general, Properties creation doesn't set a default ProgramName.
  • In all language, Ice::initialize (Communicator constructor) gives Ice.ProgramName a fallback value.
  • C++ Ice::initialize(argc, argv) would set Ice.Program name if not set in properties and argc is not empty.
  • All C++ wrapped languages should set Ice.ProgrameName before calling C++ Ice::initialize.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions