-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
JSONConfiguration in Poco::Util::Application #7
Conversation
sounds good to me -guenter Günter Obiltschnig Company Registration: FN 276491 f | Landesgericht Klagenfurt On 13.11.2012, at 22:46, syvex wrote:
|
it is a good idea;however, to build Util without JSON, the JSONConfiguration itself should be #idef'd as well. can you please do that as well? |
additionally, please fork code off the develop branch (not release) see this model, that's what we use: http://nvie.com/posts/a-successful-git-branching-model/ this page is also helpful to stay synced with what's going on with poco: |
And, when I look better, XML and INI configurations are not #ifdef'd as well. |
The reason why it's only stripped off Application and not the entire Util library is that when building for smaller embedded Linux systems, we generally link statically. Therefore, it does not hurt if XMLConfiguration gets compiled into the library. It only hurts if it's referenced by Application, because if so, as soon as Application or ServerApplication is used, the entire XML library gets pulled in. This allows us to keep final application binary size around 2MB (when combined with the other --poquito left outs). Back when I did this I did not care about shared libraries, or whether XMLConfiguration actually is in the library. It was just being referenced by Application that mattered. Günter Günter Obiltschnig Company Registration: FN 276491 f | Landesgericht Klagenfurt On 14.11.2012, at 00:55, Aleksandar Fabijanic wrote:
|
I understand. I still think it would be good to strip them all out. Quite often, I find the Util dependency on XML and JSON annoying. Any objections to that? |
No objections -guenter Günter Obiltschnig Company Registration: FN 276491 f | Landesgericht Klagenfurt On 14.11.2012, at 14:32, Aleksandar Fabijanic wrote:
|
I will see about putting a separate #ifdef around the XMLConfiguration and JSONConfiguration files then. This should help avoid some confusion on what gets linked in by the application. |
ok. I'll close this pull request. please fork off the develop branch and send pull request back. |
…stream:ms-develop to ms-develop * commit 'a76079bc7793d32f0943730ff6fb7aa4e028bb7a': Removed unused include
I have added JSONConfiguration to Poco::Util::Application::loadConfiguration. This seems to be a reasonable extension since JSONConfiguration was already implemented.
I also added a corresponding POCO_UTIL_NO_JSONCONFIGURATION macro along the lines of POCO_UTIL_NO_XMLCONFIGURATION and POCO_UTIL_NO_INIFILECONFIGURATION.
Please let me know if this is a good idea or not. Thanks!