-
Notifications
You must be signed in to change notification settings - Fork 58
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
the include command causes an error #98
Comments
That's strange, what does your I think there are some pretty strict limitations on it right now, but I've definitely used it for something like Actually, I take that back... not sure I've used those examples with this hocon parser. |
I think you are hitting #94 |
BTW, as I see some people commenting, is this project maintained? I sent a PR for fixing another bug with included files (#95) without any reaction for more than 3 months. @dvhwgumby , sorry for the noise, |
Hmm. The lightbend parser says it wants ```include “foo”``` — and it can be used inside an object (though that’s way more sophisticated than we need)!
I tried your suggested syntax and our java code (using the lightbend parser) rejected it. We verified this in the head of the GitHub config repo
So, support for ```include “foo”``` would help a lot.
As far as directories: I’m perfectly happy to change directories in my code to manage them. That is painless now I know it’s the mechanism.
Thanks for building this package btw — it has already saved my bacon. Took me less than a day to integrate (using factor and pxp as examples as well as the source) — and most of that time was figuring out the include issue.
…Sent from my iPhone
On Jan 16, 2018, at 13:35, Michael Smith ***@***.***> wrote:
That's strange, what does your include directive look like?
I think there are some pretty strict limitations on it right now, but I've definitely used it for something like include file("/absolute/path").
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
FWIW, the "spec" for HOCON ([https://github.com/lightbend/config/blob/master/HOCON.md#includes]) considers the syntax our team used to be legit. |
Understood. This is currently an incomplete implementation of the spec. It would be nice to improve it, but I'm not personally spending a ton of time on it. I'm surprised the lightbend parser rejected |
I ran into a similar situation.
when I run code in directory "ProjectDir/bin/", I always get an error: I wonder how I can fix that. |
I can give some suggestions of where to look to start a fix. Our code mirrors the lightbend/config implementation fairly closely, so you can use that to compare where we might be missing some implementation. The parser is in src/config_document_parser.cc. If |
In my case, I fix it by changing some code. And my change exists here . For now, it works fine for me. I want you guys review my code and find out where bugs may lay. |
Thanks for providing that! Not sure when someone might get to looking at it. If anyone's interested in turning that into a PR, I can try to help review it. |
I believe this is fixed by #115. Please re-open the issue if I'm mistaken. |
Hi folks,
If I try to parse a .conf file with an include directive I get the error
Error: reader() should not be called on resources
I am calling
hocon::program_options::parse_file(filename, reasoner_options, true);
I'm running on MacOS.
Also I'm not sure how to specify the search directories for "include" though at the moment we have a single flat directory so this doesn't matter.
The text was updated successfully, but these errors were encountered: