-
-
Notifications
You must be signed in to change notification settings - Fork 42
updated to HTTP 1.51; duplicated 0.9.17's RequestHandlerFunction in H… #175
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
CircleCI seems configured to run Julia 1.5, but updating to HTTP 1 needs Julia 1.6 or later. |
Hi @mind6 - thanks very much for this PR! 🎉 I got the tests to pass on locally using Julia 1.8.3 ✔️ Dropping support for Julia 1.5 is probably the way forward. HTTP.jl has done so here JuliaWeb/HTTP.jl#783 about a year ago now. Strictly speaking though this would imply a breaking change for Dash.jl, Meaning that the next Dash.jl release would be So, it might end up being easier and faster to:
I think something like this using HTTP
using TOML
const HTTP_VERSION = let
project = TOML.parsefile(joinpath(pkgdir(HTTP), "Project.toml"))
VersionNumber(project["version"])
end
@static if HTTP_VERSION < v"1"
RequestHandlerFunction = HTTP.RequestHandlerFunction
else
struct RequestHandlerFunction <: HTTP.Handler
func::Function # func(req)
end
end might get us close. |
OK. Sounds good. Should we configure CircleCI to test several Julia versions, such as 1.5, 1.6.7, 1.8.3, nightly build simultaneously? I've seen projects do that using Appveyor. |
That would be nice. Right now though, the tests are run inside a docker container: Line 8 in f0606e0
I suspect this makes the dash integration tests (which need a headless browser) much easier to setup. I'm not sure how tricky it would be to update that docker container such that we can run the Julia Perhaps a better way forward would be to setup a Github workflow (using e.g. setup-julia) to run |
Hi All, |
Hi @ueliwechsler, The current PR isn't compatible with the lowest Julia version target for Dash.jl which is currently defined as To workaround that, we would need to write some facade code as suggested in #175 (comment), to support HTTP.jl version Moreover, as discovered in #176, the Percy CI tests are currently broken. Figuring out how to get them working again would require some time, unless we can get help from folks at Plotly with Percy experience. I guess we could ignore those failing Percy tests momentarily to merge a HTTP.jl compat PR, but ideally we should fix the Percy tests before doing any other maintenance task in Dash.jl. Happy new year! |
Hi @etpinard Thanks a lot for your detailed explanation and the great work with Dash.jl. Makes sense. Is there a way I can help out? Unfortunately, I don't have any experience with Percy CI. |
If you could try making the Julia |
I can try 😅. For the branch corresponding to this PR (mind6:dev or for master? |
Yes, for the branch corresponding to this PR. The Julia |
@etpinard are you aware that the long term support release of Julia is now 1.6.7? See https://julialang.org/downloads/#long_term_support_release. As someone who maintains a lot of Julia packages and as someone who works with government customers using restrictive computing environments, my estimate of the percentage of Julia users on pre-LTS versions is closer to 0% than 1%. My (unsolicited but well-intended) advice is to drop support for Julia versions older than 1.6.7. I also don't think bumping the lower bound on Julia constitutes a major version bump according to semver, since there are no changes in the public API. |
Thanks for the input @joshday ! Let me reiterate, I don't personally think it's particularly important to keep compat down to Julia 1.4, but still dropping support for a Julia version is a breaking change. So we would need to bump the Dash.jl version to 2.0. If someone over at Plotly (cc @alexcjohnson ) is fine with bumping the Dash.jl version to 2.0 (and make a somewhat unspectacular 2.0 release) after merging this PR, then sure 👍 |
@etpinard I don't know the Julia ecosystem that well, but to give a little perspective from Dash and Python: We waited for a major version bump to drop Python 2 support because that was a pretty big change, and we haven't dropped support for any minor Python versions since then. However it's very common for Python packages to drop support for older Python versions - minor versions at least - and I think there's a good reason for it: you're not going to break anyone's app with this upgrade, because if you're on a now-unsupported Python version you simply won't get this update. I assume that's the same in Julia, in which case I'd say a minor bump would be fine. Your call though, if you still feel this requires a major bump I'm not concerned that the release is light. |
good point there. If you're on older Julia version you won't see these changes if compat is bumped up. |
Ok great, looks like we're coming to a consensus. Here's what I think would be the best way forward in preparation for the next Dash.jl release:
How does that sound? |
We now (finally) have passing tests on @mind6 would mind merging the |
…ttpHelpers/handlers.jl
HTTP 1 removed function wrapper types like
RequestHandlerFunction
, the only one used by Dash. It was simple to duplicate 0.9's dispatch functionality and I have put it in Dash.HttpHelpers