-
Notifications
You must be signed in to change notification settings - Fork 37
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
config blocks are not generated in order #8
Comments
Hi @farzadanooshah could you provide a small code sample which results in an invalid config when run repeatedly? |
Hi @epeay, Sorry for the late reply. Here is a sample code which shows how orders can be mixed and may end up in invalid format:
which results in following invalid config, test with
but if you just skip adding This should be due to use of dictionary in which order is not preserved and so number of directives/child blocks affects the iteration. I didn't quite get why directives are stored in a dictionary instead of a list :-? |
Hi,
I came across this library a couple of days ago and it's really helpful. However, I've got into an issue with the library not maintaining the order of config blocks. Some nginx configs are sensitive to their position in file. for e.g. 'log_format' that I use should be defined before it's used in access_log.
Any suggestion how to approach such issue?
Thanks
The text was updated successfully, but these errors were encountered: