-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Improved URI Inference #6
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
Conversation
…ity-inference # Conflicts: # packages/core/src/utils/RegExpGroups.ts
pileks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we see any pitfalls with such a change? For now, this seems to simplify mainly HTTP/S URIs, as the rest is pretty simple as-is.
Examples:
ipfs/Qmhashis simpler thanipfs://Qmhash(old shorter than new)fs/path/to/fileis simpler thanfile://path/to/file(old shorter than new)- HTTP/S is obviously shorter in the new system, as it mimics the actual HTTP URI
Generally, I think people are used to "browser URIs", and that this change pushes towards that.
With that in mind, and me being in favor of simplification, this gets my approval as an experimental feature!
nerfZael
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
My only nit is that parsing seems overly complex right now. It could probably be simplified.
Working on fixing this now, we shouldn't need regex to parse the URI. |
Non-wrap URI schemes can now be used (ex:
https://domain.com/path). The non-wrap scheme will be used as the authority, and all other contents will be shifted into the path.https://domain.com/pathintowrap://https/domain.com/pathipfs://QmHASHintowrap://ipfs/QmHASH