-
Notifications
You must be signed in to change notification settings - Fork 967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternative command line friendly syntax for string list #69
Comments
Sorry to jump in. |
There are a few problems with having syntax within the string rather than having distinct strings:
We could also just support a JSON array syntax, but it would have a similar issue. |
OK, got it, thanks! |
Thanks for the comment though, I am not sure we have the perfect solution here yet, this is just the idea we have so far. |
Hi @havocp, have you thought any more about this? Is it possible to complete the remaining things and release a new minor version? |
I think the PR is ready, I could make a release on Monday. |
great, thanks |
1.0.1 should be available/working |
Thanks |
Is this somehow possible with environment variables as well? |
The lib only uses env variables if they are explicitly pulled in by the .conf file as a ${} reference. The only way I know to do a list as env vars is something like:
|
This feature doesn't appear to be documented anywhere except here and http://stackoverflow.com/questions/16202501/how-can-i-override-a-typesafe-config-list-value-on-the-command-line and https://github.com/typesafehub/config/blob/f6680a5dad51d992139d45a84fad734f1778bf50/NEWS.md#101-may-19-2013 -- have I missed something? I think it would be nice to add something to the docs about this. I'll see if I have time to make a PR in the coming weeks. |
HOCON.md has a section about it but it's probably hard to recognize as relevant if you're looking for the answer to "how do I put a list on the command line." Something more FAQ-like in the README might be nice. |
We have the need to override string lists from command line -D parameters. That is not possible at the moment.
Example:
akka.cluster.seed-nodes=["akka.tcp://TestApp@host1:2552", "akka.tcp://TestApp@host2:2552"]
That gives error: ConfigException$WrongType: system properties: akka.cluster.seed-nodes has type STRING rather than LIST
Some kind of alternative syntax would be nice.
As discussed the following syntax would be ok:
-Dakka.cluster.seed-nodes.0=akka.tcp://TestApp@host1:2552 -Dakka.cluster.seed-nodes.1=akka.tcp://TestApp@host2:2552
The text was updated successfully, but these errors were encountered: