Skip to content
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

Hocon include support #1169

Merged
merged 1 commit into from
Jul 19, 2015
Merged

Hocon include support #1169

merged 1 commit into from
Jul 19, 2015

Conversation

rogeralsing
Copy link
Contributor

Related to #1164

  • Added Hocon Include support
  • Added Hocon include resolver support
  • Added Hocon Include substitution support
  • Added more Hocon tests
  • Added HoconObject.Merge support
  • Added Config from Object support (.NET object to Hocon Config)

This allows us to use Hocon includes:

a {
   include "some resource"
}

The 'some resource' can then be resolved by an optional resolver callback. so the resource could be a file on disk, an url, or whatever you want that could result in a new hocon sub config.

see inline comments for explanations of the code to help the review

@rogeralsing
Copy link
Contributor Author

ohh, shiny "needs review" auto label :)

{
var json = JsonConvert.SerializeObject(source);
var config = ParseString(json);
return config;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lets us create Hocon Configs from typed objects.

a convenience method only, but opens up for using objects as includes, or creating typed configuration support.

@rogeralsing rogeralsing changed the title Hocon Hocon include support Jul 18, 2015
@rogeralsing
Copy link
Contributor Author

the failing test "ConfigurationSpec.CanCreateConfigFromSourceObject" is fixed by my other PR.

@rogeralsing
Copy link
Contributor Author

If the tests are re-run, does it run on top of newly merged PR's ?

@Aaronontheweb
Copy link
Member

@rogeralsing it runs exactly the code that you have in your PR - so anything that's in dev but not in your PR won't be included in the test run.

Added Hocon Include support
Added Hocon Include substitution support
Added more Hocon tests

Changed includes from single quote to double quotes.
(spec says single quote in the spec text, but all examples and code on JVM uses double quotes)
@rogeralsing
Copy link
Contributor Author

I updated my branch to include the racy Json config fix merged yesterday. everything pass now.

Aaronontheweb added a commit that referenced this pull request Jul 19, 2015
@Aaronontheweb Aaronontheweb merged commit 5699658 into akkadotnet:dev Jul 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants