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

Remove support for struct-based enums #14

Closed
sdboyer opened this issue Aug 17, 2021 · 3 comments · Fixed by #17
Closed

Remove support for struct-based enums #14

sdboyer opened this issue Aug 17, 2021 · 3 comments · Fixed by #17

Comments

@sdboyer
Copy link
Contributor

sdboyer commented Aug 17, 2021

Per #7 (comment), it makes no sense to support deriving structs from enums. Let's yank all the code that does it.

@ryantxu
Copy link
Member

ryantxu commented Aug 17, 2021

IIUC, this would mean use something like:

AType: "foo" | "bar" | *"baz" @cuetsy(targetType="enum")

Any ideas how/where we should add the comments/docs on what each element means?

@sdboyer
Copy link
Contributor Author

sdboyer commented Aug 17, 2021

#12 shows has examples of how i imagine this working instead.

Hmm...comments. Yeah. All i can immediately think of is creating a convention whereby the comment on the CUE type can be prefixed with the member name, and we have to just parse it all out. Not great, but passable, i think.

@sdboyer
Copy link
Contributor Author

sdboyer commented Aug 17, 2021

Updated the sample in #14 to indicate how i think comments could work

@ying-jeanne ying-jeanne self-assigned this Aug 25, 2021
@ying-jeanne ying-jeanne linked a pull request Aug 25, 2021 that will close this issue
@ying-jeanne ying-jeanne added this to To do in Grafana Backend (DO NOT USE!) via automation Aug 30, 2021
@ying-jeanne ying-jeanne added this to the 8.2.0 milestone Aug 30, 2021
@ying-jeanne ying-jeanne moved this from To do to Done in Grafana Backend (DO NOT USE!) Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants