trurl icon indicating copy to clipboard operation
trurl copied to clipboard

trurl works on urls ... what about URIs ?

Open JimFuller-RedHat opened this issue 1 year ago • 4 comments

not trolling - just curious about opinions on this.

JimFuller-RedHat avatar Sep 19 '24 08:09 JimFuller-RedHat

How do you define the difference?

bagder avatar Sep 19 '24 08:09 bagder

to take a more concrete use case, consider pURL (https://github.com/package-url/purl-spec)

> trurl pkg:bitbucket/birkenfeld/pygments-main@244fd47e07d1014f0aed9c

gives us

trurl note: Port number was not a decimal number between 0 and 65535 [pkg:bitbucket/birkenfeld/pygments-main@244fd47e07d1014f0aed9c]

JimFuller-RedHat avatar Sep 19 '24 08:09 JimFuller-RedHat

URL/URI schemes that do not use :// are not supported by trurl because the libcurl URL API does not support those.

I don't think it is completely unthinkable that non-hierarchical schemes could be supported as well in a future, but doing that also opens up a can of worms do deal with.

bagder avatar Sep 19 '24 09:09 bagder

I don't think it is completely unthinkable that non-hierarchical schemes could be supported as well in a future, but doing that also opens up a can of worms do deal with.

This reminds me of a previous conversation had on a pr (#278) where pulling out the url API into its own library was suggested. That PR was focused around security and sandboxing, but I think this is a another potential use case.

jacobmealey avatar Sep 19 '24 12:09 jacobmealey

A challenge with other URI schemes than :// based ones is also the naming of the URL components, which then also might need some reconsideration. If someone is eager to work on this, I think it would be a good idea to start in that end and write up a kind of "specification" for this first.

I am personally not too eager on working on this.

bagder avatar Oct 21 '24 07:10 bagder