- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2
 
Closed
Description
In the following JSON code both JSON files are imported properly:
"imports_dir" : "imports",
"dir_name_AA" : "AA",
"dir_name_BB" : "BB",
"[import]"    : "./imports/AA/imported.AA.jsonp",
"[import]"    : "./${imports_dir}/${dir_name_AA}/${dir_name_BB}/imported.${dir_name_BB}.jsonp"
The first import is fix, the second import is dynamic.
Result like expected:
{'AA': 1,
 'BB': 2,
 'dir_name_AA': 'AA',
 'dir_name_BB': 'BB',
 'imports_dir': 'imports'}
Now I extend the code by a third import, in which I import the first file again, but now dynamic:
"imports_dir" : "imports",
"dir_name_AA" : "AA",
"dir_name_BB" : "BB",
"[import]"    : "./imports/AA/imported.AA.jsonp",
"[import]"    : "./${imports_dir}/${dir_name_AA}/${dir_name_BB}/imported.${dir_name_BB}.jsonp",
"[import]"    : "./${imports_dir}/${dir_name_AA}/imported.${dir_name_AA}.jsonp"
Result:
{'AA': 1,
 'dir_name_AA': 'AA',
 'dir_name_BB': 'BB',
 'imports_dir': 'imports'}
The second import (of file 'imported.BB.jsonp') is not executed ('BB': 2 is missing in the results).
Cross check:
"imports_dir" : "imports",
"dir_name_AA" : "AA",
"dir_name_BB" : "BB",
"[import]"    : "./imports/AA/imported.AA.jsonp",
"[import]"    : "./${imports_dir}/${dir_name_AA}/${dir_name_BB}/imported.${dir_name_BB}.jsonp",
"[import]"    : "./imports/AA/imported.AA.jsonp"
The third import is a duplicate of the first import, but this does not harm the computation.
Results are like expected:
{'AA': 1,
 'BB': 2,
 'dir_name_AA': 'AA',
 'dir_name_BB': 'BB',
 'imports_dir': 'imports'}