-
Notifications
You must be signed in to change notification settings - Fork 12
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
Curly braces in configuration options are a source for unintentional misconfiguration #32
Comments
I do not understand what this issue is about? Can you please elaborate what we should do or what your question is? |
I guess it could be doable to have support for parsing |
Hm. I would prefer to not treat From the point of view of the configuration system, |
Hmm so if I understand you correctly you say this should be implemented by the user of java-common-lib, e.g. in CPAchecker's configuration checks and not be part of java-common-lib itself. I could very much live with that. Should also be easy to add there. So we could add the warning there (maybe only temporarily?) and hint to the solution of #33 in case we have found one.
Do you have an example of this at hand? I cannot recall to ever have seen that feature in action. Maybe we should use it more often. |
No, I suggest to not add a central warning, neither in this project nor in any using project. This configuration system is highly decentralized on purpose, and no code except the class where an option is declared can know whether
Of course, in many cases you do not need it, because the option is declared to have a different type, not |
I see, thanks!
So there are also options that are lists of C function names, so there it would be nice to check for valid names I guess. But I guess that could/should then be done in the class that actually uses that option. |
Btw: Yet another way to restrict the set of allowed values, even dynamically, is to simply add a respective To use an own To me it seems there is no action item left in this issue so I would suggest to close it? |
Looks like it. Just to summarize:
For the first part, the conclusion is that tools can support this if they use a custom For the second part, we do not want to print such warnings in general (because we cannot even do this, because for some tools |
This came up here:
https://gitlab.com/sosy-lab/software/cpachecker/-/issues/578#note_412659072
Some users use
some.config.option={}
in their benchmark xml and config files. However it seems to be unclear whether this (while apparently working) is actually disallowed or not. According to @PhilippWendler this will be interpreted as the literal string{}
and not as an empty collection.I guess the problem comes probably from the fact that the documentation that is generated for the configuration options lists collection-type default values in curly braces, while users are actually never supposed to add those braces (?). I created issue #31 for this.
We should probably either support curly braces in config values or emit a warning in such circumstances.
The text was updated successfully, but these errors were encountered: