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

Switch Signals to a map structure #17

Open
sdboyer opened this issue Jun 18, 2021 · 0 comments
Open

Switch Signals to a map structure #17

sdboyer opened this issue Jun 18, 2021 · 0 comments
Assignees

Comments

@sdboyer
Copy link
Member

sdboyer commented Jun 18, 2021

Currently, signals are defined in PollyPackage as a list, for the reasons in the comment:

// NOTE This is a list instead of a struct so that we can allow duplication
// in the future. That would permit implementations of the "same" signal in
// different query languages. This would be somewhat analogous to
// function/method overloading - the consumer's value context can determine
// whether to use the e.g. promql or flux implementation (assuming both
// exist).
//
// TODO constrain name uniqueness within the list.
//
// @doc(metaschema)
signals?: [Signal, ...Signal]

Addressing list elements in CUE is just...super annoying. I already wrestled with it months ago with scuemata. It may get better, but i don't want to wait, and the justification in the comment is flimsy at best. So, better to use a map structure.

@sdboyer sdboyer self-assigned this Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant