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

Type decorator dropped after type-maintaining value change #5527

Open
philrz opened this issue Dec 11, 2024 · 0 comments
Open

Type decorator dropped after type-maintaining value change #5527

philrz opened this issue Dec 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@philrz
Copy link
Contributor

philrz commented Dec 11, 2024

tl;dr

The loss of the type decorator =foo after this query was unexpected.

$ echo '{MyStr:"hello",MyNum:1}(=foo)' | super -c 'MyNum:=2' -
{MyStr:"hello",MyNum:2}

Details

Repro is with super commit 6e7d041.

Let's say I start with a JSUP value that has a decorator for a named record type:

$ super -version
Version: v1.18.0-189-g6e7d041f

$ echo '{MyStr:"hello",MyNum:1}(=foo)' | super -
{MyStr:"hello",MyNum:1}(=foo)

I run a query that changes a primitive value in the record without disturbing the type of that primitive value.

$ echo '{MyStr:"hello",MyNum:1}(=foo)' | super -c 'MyNum:=2' -
{MyStr:"hello",MyNum:2}

The type decorator was no longer present on the output, but I expected it would be there.

In seeking a preliminary reaction on what I observed here, @nwt agreed that the named type should probably be preserved, hence the issue.

@philrz philrz added the bug Something isn't working label Dec 11, 2024
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

No branches or pull requests

1 participant