Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Relative URL parsing #71

Closed
c42f opened this issue Oct 7, 2020 · 10 comments
Closed

Relative URL parsing #71

c42f opened this issue Oct 7, 2020 · 10 comments

Comments

@c42f
Copy link
Contributor

c42f commented Oct 7, 2020

Should this package recognize "relative URLs" as described in https://www.ietf.org/rfc/rfc1808.txt?

Python's urllib.parse seems to do this — see https://docs.python.org/3/library/urllib.parse.html

@quinnj
Copy link
Member

quinnj commented Oct 8, 2020

This repo hasn't been actively maintained for a while and should be archived; best off to file an issue at HTTP.jl where we have the URIs.jl module that has a bunch of update from this original code.

@quinnj quinnj closed this as completed Oct 8, 2020
@c42f
Copy link
Contributor Author

c42f commented Oct 9, 2020

Excellent, it seems HTTP.URIs can already parse relative URIs.

Ideally I'd not have to depend on all of HTTP.jl just for some light URI parsing but for now it seems fine.

@quinnj
Copy link
Member

quinnj commented Oct 9, 2020

There are plans to register URIs.jl module as its own package; I just haven't gotten around to it yet

@c42f
Copy link
Contributor Author

c42f commented Oct 9, 2020

Ah now I understand. I thought there were plans for this (based on some slack discussion a while back?) and I figured URIParser was the resulting package.

@c42f
Copy link
Contributor Author

c42f commented Oct 9, 2020

@quinnj I went ahead and extracted the URI parsing functionality from HTTP.jl, preserving the git history and fixing up various things to make sure the tests pass. Further cleanup could be done but for now I think this works ok.

https://github.com/c42f/URIs.jl

Would you like to move this to JuliaWeb?

@quinnj
Copy link
Member

quinnj commented Oct 9, 2020

Yeah, that sounds good to me. I had wanted to try out actually leaving the code inside the HTTP.jl repo (as a subdirectory package) and registering it from there, but figuring out exactly how to do that has been the main blocker in doing it 😄 . The URIs.jl code is separate enough that I'm fine with it living as its own repo, but if you're up for just plopping that code into the HTTP.jl directory as a PR, I'd love to see if we can make that work.

@c42f
Copy link
Contributor Author

c42f commented Oct 9, 2020

Heh, I don't know how to do this either.

I found JuliaLang/Pkg.jl#1251 (comment) which contains some links to where the subdirs stuff was implemented.

Also as one working example, it seems SnoopCompile did this: https://github.com/timholy/SnoopCompile.jl/tree/master/SnoopCompileCore

Note that as a minor downside, if we put URLs as a subdir of HTTP and don't place HTTP in a subdir as well, HTTP will include the URLs source code as part of the package (even though it won't be used). cf. JuliaLang/Pkg.jl#1251 (comment)

@c42f
Copy link
Contributor Author

c42f commented Oct 9, 2020

Hmm. Reading through some of those issues it seems like using a subdir might be a fair amount of messing around without a lot of benefit at this point (JuliaLang/Pkg.jl#1251 (comment)).

Also there's CI to consider — do you want CI to be done separately or together?

Overall I get the vibe that it just might not be worth it at this point.

@quinnj
Copy link
Member

quinnj commented Oct 9, 2020

Thanks for digging in; let's just move the URIs.jl repo to JuliaWeb (I invited you as a member, so you should be able to do it) and have it live as a separate package.

@c42f
Copy link
Contributor Author

c42f commented Oct 12, 2020

Oop done!

I had a little mishap with permissions (I forgot to accept your JuliaWeb invite before transferring) so you'll get some spam, sorry!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants