Skip to content

fix: report deprecated URI extension fields clearly - #99

Draft
wackywendell wants to merge 2 commits into
mainfrom
wendell/uri-bug
Draft

fix: report deprecated URI extension fields clearly#99
wackywendell wants to merge 2 commits into
mainfrom
wendell/uri-bug

Conversation

@wackywendell

@wackywendell wackywendell commented Apr 13, 2026

Copy link
Copy Markdown
Collaborator

Description

Closes #96 by replacing the misleading Missing URN anchor 0 failure mode for deprecated URI-based extension fields with explicit formatter diagnostics.

Older hard-coded Substrait JSON can still contain the deprecated extensionUris and extensionUriReference fields. This crate does not normalize those fields into the current URN-based model; instead, textification reports them through the existing formatting-issues channel so callers can fix the JSON input. Relation text still renders best-effort when possible.

This PR also avoids building a fake @0 extension mapping from URI-only declarations, so the old confusing error does not get emitted alongside the clearer deprecated-field diagnostics.

Testing

  • RUSTC_WRAPPER= cargo test deprecated_extension_uris -- --nocapture
  • RUSTC_WRAPPER= cargo test test_from_extensions_skips_deprecated_uri_only_mappings -- --nocapture
  • RUSTC_WRAPPER= just check
  • RUSTC_WRAPPER= cargo test --doc
  • RUSTC_WRAPPER= just test

Related Issues

Closes #96

@wackywendell wackywendell changed the title fix: fall back to deprecated extension_uri_reference field fix: report deprecated URI extension fields clearly May 1, 2026
@wackywendell
wackywendell marked this pull request as ready for review May 1, 2026 14:23
@wackywendell
wackywendell requested a review from a team as a code owner May 1, 2026 14:23

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d96893ac11

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/extensions/simple.rs
errors.push(e);
}
}
Some(ExtractedMapping::DeprecatedUriOnly) => {}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve URI-only mappings for function-name lookup

Dropping DeprecatedUriOnly declarations in from_extensions removes anchor-to-name entries entirely, so deprecated URI-based plans that actually call those functions now lose best-effort textification (NamedAnchor::lookup falls back to MissingAnchor, producing error tokens instead of function names). Before this change, add_extension still inserted the mapping even when it emitted MissingUrn, which preserved readable function names; this regression specifically affects older plans using extensionUriReference plus function calls.

Useful? React with 👍 / 👎.

@wackywendell
wackywendell marked this pull request as draft May 1, 2026 14:57
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.

extensionUriReference ignored when formatting extensions to text

1 participant