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

classpath is not respected in parsing #44

Open
ddebrecenijr opened this issue Sep 6, 2023 · 0 comments
Open

classpath is not respected in parsing #44

ddebrecenijr opened this issue Sep 6, 2023 · 0 comments

Comments

@ddebrecenijr
Copy link

Consider the example:

myconf.conf

simple-test {
  description = "Will not have value from common2.conf"
  include classpath("lib/common.conf")
}

lib/common.conf

common-value = 42
include classpath("lib/common2.conf")

lib/common2.conf

other-common-value = 3.14

Doing a hocon.ParseResource("myconf.conf") results in an output of so:

{
  simple-test: {
    description: Will not have value from common2.conf, 
    common-value: 42
  }
}

It does not include lib/common2.conf, however if I have a lib/lib/common2.conf then it will work.
It seems that the parser is just eating the keyword within this if statement.

hocon/parser.go

Line 463 in 49329f9

if token == "file" || token == "classpath" {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant