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

Add support for generating refs over imports #33

Merged
merged 9 commits into from
Sep 27, 2021
Merged

Conversation

sdboyer
Copy link
Contributor

@sdboyer sdboyer commented Sep 27, 2021

This actually does a lot, lot more than just importing refs. It's actually a moderately-sized overall refactor, including test structures, introducing a new testing framework, fleshing out the debug code, and more.

But beyond those things, it does what's necessary to actually get ref importing working as expected. And that's the thing that's absolutely necessary for forward progress with Grafana's schemas. In going through and doing this, i also came to some firm answers on tricky questions like "how far do we want to dereference?" - no implementation yet, but i'm pretty sure i know the path now.

Also, it's getting pretty painful to do all this with strings, rather than an AST. Writing a super-dumb Typescript AST, just for the things we need, is going to be a step we need to take soon.

Note - i don't think we're really going to need the ImportMapper, or at least not soon. We'll see.

Fixes #24

@sdboyer sdboyer added the kind/feature New feature or request label Sep 27, 2021
@sdboyer sdboyer merged commit 3d2b4da into main Sep 27, 2021
@sdboyer sdboyer deleted the sdboyer/imports-refs branch September 27, 2021 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert cue import into typescript
1 participant