-
Notifications
You must be signed in to change notification settings - Fork 181
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
Many fields not available in (REPL) autocomplete #660
Comments
I think something like JuliaLang/julia#38162 would be necessary to fix this. It proposes "scoped" exports, so that names like |
I think that this is something different. Normally autocomplete also shows fields that are not exported: julia> module Example
x1 = 1
x2 = 2
export x1
end
Main.Example
julia> using .Example
julia> Example.x
x1 x2 But indeed, it looks like the problem is that these fields are not included in julia> :Router ∈ names(HTTP, all=true)
false
julia> HTTP.Router
HTTP.Handlers.Router
julia> :URI ∈ names(HTTP, all=true)
false
julia> HTTP.URI
URIs.URI |
@fonsp, could you post an update here? Is there something actionable for HTTP.jl or URIs.jl here? I'm happy to dig in, but just want to know if you have a better idea of the context/issue here and what we would need to do and where. |
I'm not sure there's anything we can do here in HTTP.jl apart from getting rid of all submodules and just defining everything in a single HTTP module, but that seems quite heavy-handed and gives up a lot of clean separation we have. |
Could make everything that is public API available in the HTTP module, and the rest in an Internals module. Doesn't have to mean code has to be organized that much, see e.g. https://github.com/fredrikekre/Canvas.jl |
That's true and actually probably wouldn't be too hard. I think we would just want to look at the existing submodules and what they export and then define those names at the top-level HTTP module, then wrap everything else in an Internals module. Or maybe we don't even need the Internals module, since we already have all these submodules where they can just import the public API methods/structs to provide the functionality. Anyone want to have a go at implementing this? If not, I can get around to it in the next little while. |
If I type
HTTP.UR
in the Julia REPL and press TAB, nothing comes up. This can make HTTP.jl difficult to use.The same for:
URIs
,URI
,Router
,@register
,splitpath
,unescapeuri
,queryparams
, and moreThe text was updated successfully, but these errors were encountered: