Skip to content

feat(extensions): resolve UDT URNs while parsing - #253

Draft
benbellick wants to merge 4 commits into
mainfrom
feat/resolve-udt-urns
Draft

feat(extensions): resolve UDT URNs while parsing#253
benbellick wants to merge 4 commits into
mainfrom
feat/resolve-udt-urns

Conversation

@benbellick

Copy link
Copy Markdown
Member

Draft alternative to the stacked dependency/UDT validation work.

This explores resolving user-defined type references while parsing extension YAML type expressions instead of constructing unresolved u!name nodes and inferring their URN later from the function variant.

Key changes:

  • adds parser options with a UserDefinedTypeResolver
  • stores the resolved URN on types.ParameterizedUserDefinedType
  • parses extension YAML function signatures with resolver context from the current file's urn and types: declarations
  • rejects undeclared local UDT references during extension YAML parsing
  • uses the resolved UDT URN when assigning type anchors

This intentionally starts with local UDT resolution. Dependency-qualified references can build on the same resolver shape by resolving aliases to dependency URNs.

Tests:

  • go test ./...

Note: This PR was developed with AI assistance. All changes have been reviewed, and I take full responsibility for this contribution.

@codecov

codecov Bot commented May 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.65957% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.02%. Comparing base (5a03350) to head (88f5cc0).

Files with missing lines Patch % Lines
extensions/simple_extension.go 83.58% 6 Missing and 5 partials ⚠️
types/parser/visitor.go 25.00% 4 Missing and 2 partials ⚠️
extensions/variants.go 57.14% 3 Missing ⚠️
types/parser/parse.go 91.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #253      +/-   ##
==========================================
+ Coverage   68.95%   69.02%   +0.07%     
==========================================
  Files          47       47              
  Lines       10935    10984      +49     
==========================================
+ Hits         7540     7582      +42     
- Misses       3034     3039       +5     
- Partials      361      363       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant