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

gen: Introduce generic import mapping #85

Merged
merged 11 commits into from
Apr 26, 2023
Merged

gen: Introduce generic import mapping #85

merged 11 commits into from
Apr 26, 2023

Conversation

sdboyer
Copy link
Contributor

@sdboyer sdboyer commented Mar 14, 2023

This introduces actual support for doing import mapping natively in cuetsy.

It's a little awkward and definitely needs some tests, but the new cue.Value.Buildinstance() method introduced in a recent release of CUE makes all the difference here. Knowing that there is hugely helpful.

This will end up allowing us to have imports with core kinds - which i'd swear we had an issue for, but i can't find it now.

@sdboyer sdboyer requested a review from spinillos March 14, 2023 04:00
@sdboyer
Copy link
Contributor Author

sdboyer commented Mar 14, 2023

@spinillos this should be quite useful, and is in support of a larger goal scenes folks have for schemas

@spinillos
Copy link
Member

We can put all of this logic inside a new import_mapper.go file and we can start to split a few things.

@sdboyer
Copy link
Contributor Author

sdboyer commented Mar 14, 2023

not sure what this failure with max.MaxInt is about, but haven't investigated deeply

@sdboyer
Copy link
Contributor Author

sdboyer commented Mar 14, 2023

glad we're passing, but definitely need some tests on this first.

there are weird cases to be checked here depending on whether/how the input is unified, and properties of the root instance being looked up

@spinillos spinillos self-assigned this Apr 20, 2023
@sdboyer sdboyer merged commit 7576a48 into main Apr 26, 2023
@sdboyer sdboyer deleted the generate-imports branch April 26, 2023 11:45
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.

None yet

2 participants