xtclang / xvm

Ecstasy and XVM
Other
195 stars 15 forks source link

Add an ability to declare injectable values by the "xec" command #199

Open ggleyzer opened 3 months ago

ggleyzer commented 3 months ago

Similarly to Java's -D option that allows declaring system properties from the command line, it would be quite useful to have a similar functionality by the xec command.

Suggested syntax is xec -I <name>=<value>[,<name>=<value>]* ...

This would allow the Ecstasy code (in the container zero) to inject the corresponding values:

@Inject String myName; // the value comes from the option "-I" on the command line

If the injection option is not specified, the value stays unassigned (the current behavior).