Skip to content

Remove Blink dependency? #184

@EricForgy

Description

@EricForgy

Hi @sglyon 👋

I was recently doing some work on WebSockets.jl. WebSockets.jl used to (past tense applies once the new branch is merged) depend on HttpServer.jl. I modified WebSockets.jl to be able to work with both HttpServer.jl and HTTP.jl, but in the process removed the dependency of WebSockets.jl on BOTH HttpServer.jl and HTTP.jl via Requires.jl.

WebSockets.jl now checks to see if you are using HttpServer.jl and / or HTTP.jl (it's cool they actual work nice together) and loads appropriate methods.

https://github.com/JuliaWeb/WebSockets.jl/blob/change_dependencies/src/WebSockets.jl#L390-L392

@require HTTP include("HTTP.jl")

@require HttpServer include("HttpServer.jl")

Would you be open to a PR that does something similar:

@require Blink include("Blink.jl")

where PlotlyJS.Blink includes PlotlyJS methods specific to Blink that only get loaded if a user does something like:

> using Blink
> using PlotlyJS

The using Blink would need to appear before using PlotlyJS.

This has the advantage that PlotlyJS.jl no longer has Blink.jl as a dependency. If someone wants to use Blink.jl with PlotlyJS.jl, it is no longer your responsibility to worry about getting Blink installed and working.

This approach has grown on me. I like it for removing unnecessary package dependencies and would make your life easier I think.

What do you think?

Edit: I'm working on improving my team's workflow and I'd like to have PlotlyJS be a part of it, but I don't want to have Blink as a dependency for our workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions