Skip to content

global user config can override project specific config #9405

Closed
@timotheecour

Description

@timotheecour

currently, config files are processed in that order:
all nim.cfg files first
then all config.nims files

eg:

Hint: used config file '/Users/timothee/git_clone/nim/Nim/config/nim.cfg' [Conf]
Hint: used config file '/Users/timothee/.config/nim/nim.cfg' [Conf]
Hint: used config file '/Users/timothee/git_clone/nim/proj/nim.cfg' [Conf]
and THEN:
Hint: used config file '/Users/timothee/.config/nim/config.nims' [Conf]
/Users/timothee/git_clone/nim/proj/config.nims

this is odd, as it makes global/user configs (/Users/timothee/.config/nim/config.nims) override project-specific ones (eg /Users/timothee/git_clone/nim/proj/nim.cfg) (given that flags / options can be set in both)

proposal

process in lockstep instead, example:

global nim.cfg
global config.nims
user nim.cfg
user config.nims
proj nim.cfg
proj config.nims

etc

alternative: depreacte nim.cfg

we could think about whether we plan on deprecating nim.cfg, now that config.nims covers all use cases of nim.cfg (but with more features)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions