Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

rules not read in a stable order #274

Closed
baodrate opened this issue Nov 30, 2020 · 0 comments · Fixed by #276
Closed

rules not read in a stable order #274

baodrate opened this issue Nov 30, 2020 · 0 comments · Fixed by #276

Comments

@baodrate
Copy link
Contributor

baodrate commented Nov 30, 2020

Given that the included rules are stored in a directory named 00-default, I assumed that ananicy would use the file names to order the rule files. I had my overriden rules in a directory named 10-overrides. This worked for a while but I didn't realize it ananicy just parses the files in the order the filesystem returns them. So currently, there doesn't seem to be a stable way to override the supplied rules for any given application (#265) since you can't be sure that the provided rules won't be loaded last.

Would a PR to walk the config directory in lexical order by welcome?

edit: actually, now that I'm actually reading through the code I think this is a 1-line change. sorting entries in find_files should do the trick, I think

baodrate added a commit to baodrate/Ananicy that referenced this issue Dec 2, 2020
This provides a stable rule parsing order. e.g.
A directoory named `10-overrides` will always be accessed after
`00-default`, rather than in the order the filesystem returns.

Closes nefelim4ag#274
nefelim4ag pushed a commit that referenced this issue Dec 4, 2020
This provides a stable rule parsing order. e.g.
A directoory named `10-overrides` will always be accessed after
`00-default`, rather than in the order the filesystem returns.

Closes #274
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant