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

Scratter file loading causes bad output with deeper structure #18

Closed
jscotka opened this issue Apr 18, 2018 · 3 comments
Closed

Scratter file loading causes bad output with deeper structure #18

jscotka opened this issue Apr 18, 2018 · 3 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@jscotka
Copy link
Collaborator

jscotka commented Apr 18, 2018

This example is very tricky and not sure if this way is good to show, because parental inheritance is easy to understand, but this defines same level in more files, and not easy to understand what happen and output is strange.

It is very hard to understand what happen there and why there are these values and priority of loadind these files is bad.

Example data structure

09:22 $ tree .
.
├── a
│   ├── b
│   │   ├── c
│   │   │   └── main.fmf
│   │   └── main.fmf
│   └── main.fmf
└── main.fmf

3 directories, 4 files
09:23 $ cat main.fmf 
/a/b/c:
   x: 1
   first: True
09:23 $ cat a/main.fmf 
/b/c:
   x: 2
   second: True
09:23 $ cat a/b/main.fmf 
/c:
   x: 3
   third: True
09:23 $ cat a/b/c/main.fmf 
x: 4
fourth: True

Actual output

09:23 $ fmf
xxx/a/b/c
fmf_config: ./a/main.fmf
second: True
x: 2
xxx/a/b/c
fmf_config: ./a/b/c/main.fmf
fourth: True
third: True
x: 4
xxx/a/b/c
first: True
fmf_config: ./main.fmf
x: 1
09:24 $ fmf --whole
xxx
fmf_config: ./main.fmf
xxx/a
fmf_config: ./a/main.fmf
xxx/a/b/c
fmf_config: ./a/main.fmf
second: True
x: 2
xxx/a/b
fmf_config: ./a/b/main.fmf
xxx/a/b/c
fmf_config: ./a/b/c/main.fmf
fourth: True
third: True
x: 4
xxx/a/b/c
first: True
fmf_config: ./main.fmf
x: 1

Expected output

$ fmf
xxx/a/b/c
fmf_config: ./a/b/c/main.fmf
first: True
second: True
third: True
fourth: True
x: 4
@jkrysl
Copy link
Contributor

jkrysl commented Apr 18, 2018

I think this is already reported and requested to fix in issue #17 , yet here is deeper example of the behaviour, but in #17 is a possible reason for this behaviour. Please check, thanks.

@jscotka
Copy link
Collaborator Author

jscotka commented Apr 18, 2018

@jkrysl yes #17 is same issue.

I've created this issue, based on #15 done 6 days ago. I've just removed it from description there and moved to separated issue, to be clear, so that I've missed that you've created this already.

@psss
Copy link
Collaborator

psss commented Apr 23, 2018

This should now be fixed by 70b6207.

@psss psss closed this as completed Apr 23, 2018
@psss psss self-assigned this Apr 23, 2018
@psss psss added the duplicate This issue or pull request already exists label Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants