Skip to content

internal: structpath: accurate struct <-> string mapping - #3631

Closed
denik wants to merge 5 commits into
mainfrom
denik/accurate-structpath
Closed

internal: structpath: accurate struct <-> string mapping#3631
denik wants to merge 5 commits into
mainfrom
denik/accurate-structpath

Conversation

@denik

@denikdenik commented Sep 19, 2025

Copy link
Copy Markdown
Contributor

Changes

  • PathNode: Drop AnyKey/AnyIndex and use DotStar, BracketStar for accurate representation of path.
  • Add a standalone helper to convert PathNode to dyn.Path that uses Path information to disambiguate.

Why

Previously structpath could represent AnyKey and AnyIndex as struct but as string they were both represented as field[*].

On the other hand, there was no unambigous representation of x.*.

This commit fixes struct mapping to match string representation 1-1 so that Parse(x.String()) == x.

Tests

New unit tests.

Enabled testing reconstructed PathNode equality in structwalk tests.

Previously structpath could represent AnyKey and AnyIndex as struct
but as string they were both represented as field[*].
On the other hand, there was no unambigous representation of x.*.
This commit fixes struct mapping to match string representation 1-1 so
that Parse(x.String()) == x.
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Sep 19, 2025

Copy link
Copy Markdown
Collaborator

Run: 17855144343

Env✅​pass🔄​flaky🙈​skip
✅​aws linux311528
✅​aws windows312527
✅​aws-ucws linux423426
✅​aws-ucws windows424425
✅​azure linux311527
✅​azure windows312526
✅​azure-ucws linux423425
✅​azure-ucws windows424424
✅​gcp linux310529
🔄​gcp windows3101528
Test Namegcp windows
TestFetchRepositoryInfoAPI_FromRepo🔄​flaky

@denik
denik marked this pull request as ready for review September 19, 2025 09:41
@denik

Copy link
Copy Markdown
ContributorAuthor

Looking into making ConvertPathNodeToDynPath unnecessary

@denik

Copy link
Copy Markdown
ContributorAuthor

Superseded by #3640

@denikdenik closed this Sep 22, 2025
Sign up for freeto 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.

2 participants

@denik@eng-dev-ecosystem-bot