Skip to content

cue.Dereference(Value) behaviour change between v2 and v3 #3825

@cuematthew

Description

@cuematthew

As of master, 93e732116445d396c70d6d20e33fbafb835e4646

In the encoding/openapi/testdata, remove the #skip-v3 comments from oneof-resolve.txtar, and/or embed-norefs.txtar and run go test from the encoding/openapi directory.

The tests fail with

--- FAIL: TestGenerateOpenAPI/v3/TestGenerateOpenAPI-v3/oneof-resolve (0.01s)
            openapi_test.go:113: unexpected error: #Embed.d: openapi: #Embed.d: undefined field: #T
--- FAIL: TestGenerateOpenAPI/v3/TestGenerateOpenAPI-v3/embed-norefs (0.00s)
            openapi_test.go:113: unexpected error: #LoadBalancerSettings.consistentHash: openapi: #LoadBalancerSettings.consistentHash: undefined field: #ConsistentHashLB

As far as I've been able to work out, this is because the behaviour of cue.Dereference(Value) is different between evalv2 and evalv3. However, despite sinking many hours into this, I've not been able to get to the bottom of this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions