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

Unify configuration file formats #327

Open
chrispcampbell opened this issue Jun 16, 2023 · 0 comments
Open

Unify configuration file formats #327

chrispcampbell opened this issue Jun 16, 2023 · 0 comments
Assignees

Comments

@chrispcampbell
Copy link
Contributor

Originally there was only one "config" file format used by SDE, which was the JSON "spec" file (e.g. mymodel_spec.json). This file allows you to define which input and output variables are used in the generated C code, and supports a number of other things, like mappings/paths for DAT files, etc.

When I added support for the sde dev and sde bundle commands, I introduced a new "config" file format (sde.config.js) that provides a superset of the functionality of the original JSON "spec" files. It serves a similar purpose, but allows for defining plugins and other things that require running code at build time.

Before we get to 1.0, it would be nice to resolve the differences between the two and clarify when to use one format over the other. My thinking is that a JSON format is fine for simple use cases (using sde generate) where there is no need for plugins. And the JS format is good for any use case (either sde generate or sde {dev|bundle}).

It would be nice if there was a single naming convention (for example, sde.config.js[on]) , and a smooth migration path if you want to start with JSON and work up to using JS, similar to how many other tools work in the JS ecosystem (ESLint's config file formats are one example).

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