Skip to content
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

Single configuration file extensions #67

Closed
arcticicestudio opened this issue Jul 13, 2019 · 1 comment
Closed

Single configuration file extensions #67

arcticicestudio opened this issue Jul 13, 2019 · 1 comment

Comments

@arcticicestudio
Copy link
Owner

arcticicestudio commented Jul 13, 2019

Epic: #33

The application configuration file loader currently supports multiple file types with multiple file extensions, e.g. yml and yaml for YAML encoded data. This can lead to priority problems when merging multiple loaded configuration states when there are multiple YAML files with different supported file extension in the same directory. There are no rules how to decide which extension takes precedence over another extension causing unexpected merged configurations.

To prevent such problems each file type will only support a single official file extension. The currently supported encodings are JSON and YAML where the following file extension will only be supported:

  1. JSON
  • before: *.json
  • after: *.json
  1. YAML
  • before: *.yml, *.yaml
  • after: *.yml

Note that this won't affect the precedences of different file types!
YAML files will still take precedence over JSON files since YAML is a superset of JSON and JSON is also valid YAML.

@arcticicestudio arcticicestudio added this to the 0.4.0 milestone Jul 13, 2019
@arcticicestudio arcticicestudio self-assigned this Jul 13, 2019
arcticicestudio added a commit that referenced this issue Jul 13, 2019
The application configuration file loader supported multiple file types
with multiple file extensions, e.g. `yml` and `yaml` for YAML encoded
data. This could lead to priority problems when merging multiple loaded
configuration states when there are multiple YAML files with different
supported file extension in the same directory. There were no rules how
to decide which extension takes precedence over another extension
causing unexpected merged configurations.

To prevent such problems each file type now only supports a single
official file extension. The currently supported encodings are JSON (1)
and YAML (2) where the following file extension are only supported:

1. JSON
  - before: `*.json`
  - after: `*.json`
2. YAML
  - before: `*.yml, *.yaml`
  - after: `*.yml`

Note that this won't affect the precedences of different file types!
YAML files still take precedence over JSON files since YAML is a
superset of JSON and JSON is also valid YAML.

References:
  (1) https://www.json.org
  (2) https://yaml.org

Epic GH-33
Resolves GH-67
@arcticicestudio
Copy link
Owner Author

Resolved in 008edbc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant