Skip to content

Conversation

charandas
Copy link
Contributor

@charandas charandas commented Nov 13, 2024

Here is a first take at generating equivalent code to how playlist currently looks in grafana.

Next up, I need to make the playlist watcher like generation also happen over here under the same target.

Removing codegenPath from this Jenny

I am not sure of how codegenPath could be useful for how Grafana's repo is currently setup. codegenPath is . as I see it, whether I invoke the sdk from within apps/playlist or I sit at the apps directory and do:

 grafana-app-sdk project component add --cuepath ./playlist/kinds --path ./playlist grafanaApp
 
 # alterntively, invoke it from within apps/playlist dir
 grafana-app-sdk project component add grafanaApp

Having a . codegenPath is unnecessarily complex for the template when pkgs are imported.

Removing kindsAreGrouped from this Jenny

Is there a real use case in Grafana for that or can we safely assume that they won't be? Not having this boolean makes the template so much easier on the eyes.

Example output

The outputted app.go looks like this gist with some commentary on the extra curly braces that I don't like.

@charandas charandas self-assigned this Nov 13, 2024
@charandas charandas requested a review from toddtreece November 13, 2024 04:18
@charandas charandas force-pushed the charandas/grafana-specific-codegen branch from 80d3937 to ea4f48e Compare January 8, 2025 21:27
@charandas charandas force-pushed the charandas/grafana-specific-codegen branch from ea4f48e to a2eb732 Compare January 8, 2025 21:34
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

Successfully merging this pull request may close these issues.

1 participant