Skip to content
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

Use authorization for js imports #97

Closed
wants to merge 2 commits into from

Conversation

rdeits
Copy link
Collaborator

@rdeits rdeits commented May 2, 2018

I think this resolves #96 although it's tricky to test because Pkg operations don't work on JuliaBox (and the packages themselves aren't git repos).

Unfortunately, it looks like my version of webpack must be slightly different, because the bundled JS has a ton of meaningless changes. If you want to minimize the size of this diff, you might want to just take my first commit (2e98ad6) which has the actual change and then regenerate the bundles yourself with whatever the right version of webpack is.

@codecov-io
Copy link

Codecov Report

Merging #97 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #97   +/-   ##
======================================
  Coverage    60.8%   60.8%           
======================================
  Files          14      14           
  Lines         398     398           
======================================
  Hits          242     242           
  Misses        156     156

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 204f580...72f363d. Read the comment docs.

@rdeits rdeits closed this May 3, 2018
@rdeits rdeits deleted the import-authorization branch May 3, 2018 15:11
@rdeits rdeits mentioned this pull request May 3, 2018
halleysfifthinc added a commit to halleysfifthinc/WebIO.jl that referenced this pull request Oct 29, 2022
Non-MWE:
- In IJulia, with PlotlyJS, an observer on a plot event (e.g.
  "hover", "click", etc) gave the following error when updating/being run:

```julia
KERNEL EXCEPTION
MethodError: objects of type Pair{Int64, Any} are not callable

Stacktrace:
  [1] #invokelatest#2
    @ ./essentials.jl:729 [inlined]
  [2] invokelatest
    @ ./essentials.jl:726 [inlined]
  [3] set_nosync(ob::Observable{Dict{Any, Any}}, val::Dict{String, Any})
    @ WebIO ~/.julia/dev/WebIO/src/scope.jl:355
  [4] dispatch(ctx::Scope, key::String, data::Dict{String, Any})
    @ WebIO ~/.julia/dev/WebIO/src/scope.jl:368
  [5] dispatch_command(conn::WebIO.IJuliaConnection, data::Dict{String, Any})
    @ WebIO ~/.julia/dev/WebIO/src/messaging.jl:104
  [6] dispatch(conn::WebIO.IJuliaConnection, data::Dict{String, Any})
    @ WebIO ~/.julia/dev/WebIO/src/messaging.jl:81
  [7] (::WebIO.var"JuliaGizmos#97#98"{WebIO.IJuliaConnection})(msg::IJulia.Msg)
    @ WebIO ~/.julia/dev/WebIO/src/providers/ijulia.jl:21
  [8] comm_msg(sock::ZMQ.Socket, msg::IJulia.Msg)
    @ IJulia.CommManager ~/.julia/packages/IJulia/AQu2H/src/comm_manager.jl:134
  [9] #invokelatest#2
    @ ./essentials.jl:729 [inlined]
 [10] invokelatest
    @ ./essentials.jl:726 [inlined]
 [11] eventloop(socket::ZMQ.Socket)
    @ IJulia ~/.julia/packages/IJulia/AQu2H/src/eventloop.jl:8
 [12] (::IJulia.var"JuliaGizmos#15#18")()
    @ IJulia ./task.jl:484
```

I narrowed the problem down to an incorrect assumption about what is
returned from `Observables.listeners`. The previous expectation was an
array of functions, the reality is a `Vector{Pair,Function}`.
halleysfifthinc added a commit to halleysfifthinc/WebIO.jl that referenced this pull request Oct 31, 2022
Non-MWE:
- In IJulia, with PlotlyJS, an observer on a plot event (e.g.
  "hover", "click", etc) gave the following error when updating/being run:

```julia
KERNEL EXCEPTION
MethodError: objects of type Pair{Int64, Any} are not callable

Stacktrace:
  [1] #invokelatest#2
    @ ./essentials.jl:729 [inlined]
  [2] invokelatest
    @ ./essentials.jl:726 [inlined]
  [3] set_nosync(ob::Observable{Dict{Any, Any}}, val::Dict{String, Any})
    @ WebIO ~/.julia/dev/WebIO/src/scope.jl:355
  [4] dispatch(ctx::Scope, key::String, data::Dict{String, Any})
    @ WebIO ~/.julia/dev/WebIO/src/scope.jl:368
  [5] dispatch_command(conn::WebIO.IJuliaConnection, data::Dict{String, Any})
    @ WebIO ~/.julia/dev/WebIO/src/messaging.jl:104
  [6] dispatch(conn::WebIO.IJuliaConnection, data::Dict{String, Any})
    @ WebIO ~/.julia/dev/WebIO/src/messaging.jl:81
  [7] (::WebIO.var"JuliaGizmos#97#98"{WebIO.IJuliaConnection})(msg::IJulia.Msg)
    @ WebIO ~/.julia/dev/WebIO/src/providers/ijulia.jl:21
  [8] comm_msg(sock::ZMQ.Socket, msg::IJulia.Msg)
    @ IJulia.CommManager ~/.julia/packages/IJulia/AQu2H/src/comm_manager.jl:134
  [9] #invokelatest#2
    @ ./essentials.jl:729 [inlined]
 [10] invokelatest
    @ ./essentials.jl:726 [inlined]
 [11] eventloop(socket::ZMQ.Socket)
    @ IJulia ~/.julia/packages/IJulia/AQu2H/src/eventloop.jl:8
 [12] (::IJulia.var"JuliaGizmos#15#18")()
    @ IJulia ./task.jl:484
```

I narrowed the problem down to an incorrect assumption about what is
returned from `Observables.listeners`. The previous expectation was an
array of functions, the reality is a `Vector{Pair,Function}`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebIO imports don't work on JuliaBox
2 participants