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

Resolver should use only the first matching extension mapper #751

Closed
jdavies-st opened this issue Feb 14, 2020 · 1 comment
Closed

Resolver should use only the first matching extension mapper #751

jdavies-st opened this issue Feb 14, 2020 · 1 comment
Labels

Comments

@jdavies-st
Copy link
Contributor

jdavies-st commented Feb 14, 2020

Currently a tag and/or URI in a schema gets mapped through the resolver of all extensions chained together, end to end before the resulting string (which should represent an on-file schema) gets opened.

It might be better to have this work more like a regex, where the resolvers are tried in a particular order, and once a particular resolver actually resolves the string (i.e changes it), it stops, and doesn't pass through the remaining ones.

Or it's possible that the resolver could return a True or False if the resolver produces a match?

The idea would be to try to prevent one installed extension from hosing other installed extensions. Currently there's not a robust way to prevent this. Not sure if this could prevent issues like astropy/specutils#465, but it is possible. Ordering would probably matter. More thought is needed.

ht: @eslavich

@eslavich
Copy link
Contributor

eslavich commented Dec 7, 2021

Closing this, since the new plugin for schemas works on the basis of matching exact URIs and thus avoids the problem.

@eslavich eslavich closed this as completed Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants