Skip to content

Adding multiple tag version support in extension registration#224

Open
embray wants to merge 8 commits into
asdf-format:mainfrom
embray:issue-42
Open

Adding multiple tag version support in extension registration#224
embray wants to merge 8 commits into
asdf-format:mainfrom
embray:issue-42

Conversation

@embray

@embray embray commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Description

Implements #42 with one caveat: I decided to omit support for wildcards for now. This actually turns out to be even more of a can of worms than I thought, and the discussion in asdf-format/asdf#1048 provides a good rationale against them, and is the reason Python asdf also dropped support for this in its Converters for now. I think there might still be a way to support this sensibly but it requires more careful consideration.

Also adds #155 which I almost forgot there was an issue for. Since this overcomes the small existing hurdle to reading some of the older reference files, I wanted to add such a test as a smoke test for what other tag versions might need to be added (not many it turns out, at least for the existing supported core tags).

AI Disclosure

No AI tools used.

embray added 4 commits July 9, 2026 20:43
This changes ASDF_REGISTER_EXTENSION in two ways.  One or more tags
can be passed in, now as its trailing arguments with varargs support.

Another significant change to help support this is that
`asdf_extension_t` is refactored to move all extension methods into a
separate `asdf_extension_vtab_t` to which `asdf_extension_t` holds a
pointer.  This will make it easier to extend `asdf_extension_vtab_t` in
the future without major ABI breakage, and it also simplifies the call
signature for `ASDF_REGISTER_EXTENSION` (a similar change earlier was to
remove the individual `asdf_software_t` fields from
`ASDF_REGISTER_EXTENSION`'s call signature).

The decision was made for not *not* to support tag wildcards in the
extension registry; this is in line with the reasoning behind
asdf-format/asdf#1049 ;

This might be worth revisiting to make extensions more flexible to
support wider ranges of tag versions without requiring a software
update, but I think that will first take some more careful formalization
of how tag versions are actually used by ASDF...
The main difference in 1.1.0 is addition of the float16 type (now
supported since asdf-formatgh-14), so in order to try out doing something
interesting with different tag versions, parse the ndarray tag version
to check for float16 support.  For now opted to keep things flexible and
allow it even if the ndarray is tagged 1.0.0, but log a warning.

refactor: add ARRAY_SIZE macro

asdf-formatgh-42
(The sense of these ifdef blocks was inversed)
and multiple tag handling explained.  Add changelog entry.
@embray embray added enhancement New feature or request refactoring Changes to code structure or APIs labels Jul 9, 2026
embray added 3 commits July 10, 2026 00:24
With asdf-formatgh-42 basically done it made sense finally to add this and see how
far we could get ( this was originally asdf-formatgh-155 ).  To my amazement every
file works except a couple expected exceptions; only needed to add the
asdf-1.0.0 tag.
The author and homepage properties are optional; it's fine if they're
missing--the warning log only applies if it's the wrong type (not a
string)
@embray embray marked this pull request as ready for review July 9, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request refactoring Changes to code structure or APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant