Skip to content

skipParentCfg does not work when placed in a .cfg file #25235

@arnetheduck

Description

@arnetheduck

Nim Version

2.2.4

Description

Consider the directory structure:

aaa/
  bbbb/
    nim.cfg
    test.nim
  nim.cfg

If compiling test.nim and nim.cfg contains skipParentCfg, a/nim.cfg should not be loaded, but it is:

~/aaa/bbb$ nim c test
...
Hint: used config file '/tmp/aaa/nim.cfg' [Conf]
Hint: used config file '/tmp/aaa/bbb/nim.cfg' [Conf]

The broader problem with loading configurations from the parent folder is that there's no way to make it stop at a package boundary - ie imagine working on a nimble library that's nested inside another project as happens when working with git submodule.

Making skipParentCfg work from cfg files would allow for example nimble to add skipParentCfg to nimble.paths similar how it adds --noNimblePath to provide a "barrier" of configuration loading making each nimble package stand-alone from a directory hierarchy point of view.

Current Output


Expected Output


Known Workarounds

No response

Additional Information

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions