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

Make the configuration for an artifact a struct (using a well defined validating function) #53

Open
cgruber opened this issue Feb 25, 2019 · 0 comments
Labels
Priority-2 Useful feature, and should be on the roadmap Type-enhancement New feature or request

Comments

@cgruber
Copy link
Collaborator

cgruber commented Feb 25, 2019

Right now, the config is an arbitrary dictionary. Making it a struct (or built through a function with well defined parameters) can allow it to be a bit safer. Instead of:

"foo.bar:baz:1.0": {
    "sha256": "abcdef...",
    "build_snippet": SOME_SNIPPET,
}

You'd do

"foo.bar:baz:1.0": config(
    sha256 = "abcdef...",
    build_snippet = SOME_SNIPPET,
),

Using this would allow us to change the underlying mechanism for holding the data and communicating it, immunizing the user from those changes, as well as having more obvious errors earlier (can't call that function with an unknown param, for instance).

@cgruber cgruber added Type-enhancement New feature or request Priority-2 Useful feature, and should be on the roadmap labels Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority-2 Useful feature, and should be on the roadmap Type-enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant