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

thema: Fix Translate() to same version #141

Closed
wants to merge 1 commit into from

Conversation

joanlopez
Copy link
Contributor

It fixes the Translate() operation when from and to versions are the same, because the current implementation produces an error in such case:

_objold.steps: conflicting values [...#TranslatedInstance] and {} (mismatched types list and struct):
    ./testdata/internal/schmoo.cue:55:10
    ./translate.cue:37:10
    ./translate.cue:45:10
    ./translate.cue:128:16

It depends on #139

Some open questions inline.

@joanlopez joanlopez added the bug Something isn't working label May 10, 2023
@joanlopez joanlopez requested a review from sdboyer May 10, 2023 10:20
@joanlopez joanlopez self-assigned this May 10, 2023
for sch := lin.First(); sch != nil; sch = sch.Successor() {
for name, ex := range sch.Examples() {
for sch := lin.First(); sch != nil; sch = sch.Successor() {
// TODO: Validate lacunas
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any thought? Maybe I can just serialize them and write them to the file for the sake of regression.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, i think that's good

@joanlopez joanlopez changed the base branch from main to schema-examples May 10, 2023 10:34
@joanlopez joanlopez deleted the branch schema-examples May 10, 2023 22:37
@joanlopez joanlopez closed this May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants