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

Move CaSILE runtime configuration from makefile to YAML #57

Open
alerque opened this issue Apr 24, 2020 · 4 comments
Open

Move CaSILE runtime configuration from makefile to YAML #57

alerque opened this issue Apr 24, 2020 · 4 comments

Comments

@alerque
Copy link
Member

alerque commented Apr 24, 2020

Many projects make not need a project specific Makefile at all. Given the option to invoke CaSILE as a CLI tool instead of as a submodule or other fixed path relative to the project, it seem like some options will be better set a different way.

I'm thinking specifically of the language, layout, and output location options. We already have a project wide meta data YAML option, extending that to cover some basic settings seems to make sense to me.

This will require the rules file parsing the YAML (we already depend on yq so that should be easy), and also probably a Rust crate so the CLI can do it directly. Alternatively the Rust CLI can just read it and output the relevant values in Makefile format to be sourced before the CaSILE rules file.

@alerque
Copy link
Member Author

alerque commented May 6, 2020

Or TOML? Because Rust loves it...

@alerque
Copy link
Member Author

alerque commented May 8, 2020

As of #63 the CLI can read configuration at runtime from the ENV vars. It should be pretty easy to merge in values from a file, See config::File. TOML or YAML or JSON or whatever ... it shouldn't matter that much programmatically. I tend to gravitate towards YAML, but it might make sense to go with TOML to make it easier to differentiate between project meta data and CaSILE runtime configuration (which to this point have been kind of conflated anyway).

@alerque
Copy link
Member Author

alerque commented Jan 26, 2021

This is needed to resolve the conundrum in #90.

@alerque
Copy link
Member Author

alerque commented Feb 4, 2021

Done. Works for basic flags and strings, doesn't work yet for arrays.

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