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

fix!(slice): array type def #1246

Merged
merged 2 commits into from
Feb 5, 2025
Merged

fix!(slice): array type def #1246

merged 2 commits into from
Feb 5, 2025

Conversation

pront
Copy link
Member

@pront pront commented Jan 31, 2025

Summary

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

How did you test this PR?

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on
    our guidelines.
  • No. A maintainer will apply the "no-changelog" label to this PR.

Checklist

  • Our CONTRIBUTING.md is a good starting place.
  • If this PR introduces changes to LICENSE-3rdparty.csv, please
    run dd-rust-license-tool write and commit the changes. More details here.
  • For new VRL functions, please also create a sibling PR in Vector to document the new function.

References

@pront pront force-pushed the pront/fix-slice-array-typedef branch from bf63c1f to 9fc52a0 Compare January 31, 2025 20:16
@pront pront force-pushed the pront/fix-slice-array-typedef branch from 9fc52a0 to 6f34875 Compare January 31, 2025 20:16
@pront pront marked this pull request as ready for review January 31, 2025 20:16
@pront pront requested review from bfung and jszwedko February 5, 2025 18:17
@@ -1,5 +1,4 @@
# result: { "array": { }, "array_unknown_infinite": { "object": { "foo": { "object": { "a": { "bytes": true, "integer": true } } } }, "undefined": true } }

# result: { "array": { "0": { "object": { "foo": { "object": { "a": { "integer": true } } } } }, "1": { "object": { "foo": { "object": { "a": { "bytes": true } } } } } } }
Copy link
Member

Choose a reason for hiding this comment

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

Is this right? Why is there a 1 index too?

Copy link
Member Author

Choose a reason for hiding this comment

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

If you expand the whole file:

a = []
a[0] = {"foo": {"a": 1}}
a[1] = {"foo": {"a": "bytes"}}

PS Just noticed the _x which looks like a no-op.

Copy link
Member

Choose a reason for hiding this comment

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

Doh, I missed that there was more to this file 🤦

@@ -1,5 +1,4 @@
# result: { "array": { }, "array_unknown_infinite": { "object": { "foo": { "object": { "a": { "bytes": true, "integer": true } } } }, "undefined": true } }

# result: { "array": { "0": { "object": { "foo": { "object": { "a": { "integer": true } } } } }, "1": { "object": { "foo": { "object": { "a": { "bytes": true } } } } } } }
Copy link
Member

Choose a reason for hiding this comment

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

Doh, I missed that there was more to this file 🤦

@pront pront added this pull request to the merge queue Feb 5, 2025
Merged via the queue into main with commit 7612a8b Feb 5, 2025
16 checks passed
@pront pront deleted the pront/fix-slice-array-typedef branch February 5, 2025 19:13
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.

slice causes loss of type information
2 participants