-
-
Notifications
You must be signed in to change notification settings - Fork 344
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 file should have the extension .json #39
Comments
Started noodling on this last night. Did you have any particular approach you wanted to see? |
Nope :) Did you have any specific thoughts about how to approach it? |
I was just going to put a layer of indirection in-between the identification and reading of an existing config file that migrates the file first. After looking through the source though it looked like implementation would be a lot simpler (would require least rework) if it was just a method that was called outside of (ahead of) that workflow that doesn't even care that it's a config file. Just, "if we have this file, move it". |
Yeah, that second approach sounds way easier. |
I was thinking about what we need to consider when it comes to renaming the file.
I was also thinking about a use supplied configuration file. If the user passes in a file like |
yeah, this would need to apply only to the default config, not the user-passed config. I was thinking of always doing a check before any operation that reads from the config: normalizeConfig(), this would rename it to .json if it is .go, and just ignore if it's all ok. Once the API and functionality has settled, then we can remove deprecated functionality. |
I think it's safe to close this now. |
Good catch. Thanks! |
The file is a .json file, not a .go file.
To fix this we'll need a workaround that moves an
.exercism.go
file before any command that requires it for the lifetime of the 1.x version of the library.Originally reported in tandem with another issue in #24
The text was updated successfully, but these errors were encountered: