Skip to content

Commit

Permalink
rely less on Requires.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz committed Jan 23, 2022
1 parent 91156f8 commit 3a5e4c5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 69 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Observables = "510215fc-4207-5dde-b226-833fc4488ee2"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
AssetRegistry = "bf4720bc-e11a-5d0c-854e-bdca1663c893"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
Mux = "a975b10e-0019-58db-a62f-e48ff68538c9"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Widgets = "cc8bc4a8-27d6-5769-a93b-9d913e69aa62"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
Expand All @@ -25,7 +26,6 @@ Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
JSExpr = "97c1335a-c9c5-57fe-bc5d-ec35cebe8660"
IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a"
Mux = "a975b10e-0019-58db-a62f-e48ff68538c9"
Blink = "ad839575-38b3-5650-b840-f874b8c74a25"
NBInclude = "0db19996-df87-5ea3-a455-e3a50d440464"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
27 changes: 5 additions & 22 deletions src/WebIO.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import Widgets: node, AbstractWidget
using Logging
using UUIDs
using Base64
using Mux
using WebSockets

include("../deps/bundlepaths.jl")

Expand Down Expand Up @@ -94,35 +96,16 @@ function prefetch_provider_file(basename)
(file = filepath, code = code)
end

provider_mux = prefetch_provider_file("mux.jl")
provider_blink = prefetch_provider_file("blink.jl")
include("providers/mux.jl")
include("providers/generic_http.jl")

provider_ijulia = prefetch_provider_file("ijulia.jl")
provider_generic_http = prefetch_provider_file("generic_http.jl")

function __init__()
push!(Observables.addhandler_callbacks, WebIO.setup_comm)
@require Mux="a975b10e-0019-58db-a62f-e48ff68538c9" begin
include_string(@__MODULE__, provider_mux.code, provider_mux.file)
end
@require Blink="ad839575-38b3-5650-b840-f874b8c74a25" begin
# The latest version of Blink defines their own WebIO integration
# (after https://github.com/JunoLab/Blink.jl/pull/201).
if isdefined(Blink.AtomShell, :initwebio!)
return
end
Base.depwarn(
"Please upgrade Blink for a smoother integration with WebIO.",
:webio_blink_upgrade,
)
include_string(@__MODULE__, provider_blink.code, provider_blink.file)
end
@require IJulia="7073ff75-c697-5162-941a-fcdaad2a7d2a" begin
include_string(@__MODULE__, provider_ijulia.code, provider_ijulia.file)
end
@require WebSockets="104b5d7c-a370-577a-8038-80a2059c5097" begin
include_string(@__MODULE__, provider_generic_http.code, provider_generic_http.file)
end

end

end # module
46 changes: 0 additions & 46 deletions src/providers/blink.jl

This file was deleted.

0 comments on commit 3a5e4c5

Please sign in to comment.