JuliaGizmos / Escher.jl

Composable Web UIs in Julia
https://juliagizmos.github.io/Escher.jl
Other
335 stars 63 forks source link

Broken examples #66

Closed NOTtheMessiah closed 8 years ago

NOTtheMessiah commented 8 years ago

As of now, from tests using Julia v0.3.11 on Chromium:

examples/minesweeper.jl

nothing happens when you click on a square

examples/plotting.jl

`|> has no method matching |>(::Plot, ::ComposeGraphic)`

This can be circumvented by unchaining the drawing of plot_beta.

examples/latex.jl

Rendered text does not update

docs/index.jl

HTML links broken if served

docs/layout2-api.jl

References functions that are currently commented out (dropdown, item?)

shashi commented 8 years ago

I don't really know what to do about links in docs/index.jl. I think I have reasonably fixed the others. Also I cannot reproduce the minesweeper bug. Could you check again?

shashi commented 8 years ago

The examples directory will be replaced with the one in doc-spree branch that aims to do a nicer job of presenting examples with explanations.

NOTtheMessiah commented 8 years ago

Oddly enough after updating, can't test it as of now on either v0.3.11 or v0.4.0-dev+6932 (latest master):

> cd ~/.julia/v0.3/Escher/examples; ../bin/escher --serve
WARNING: This version of the GnuTLS library (3.4.4) is deprecated
and contains known security vulnerabilities. Please upgrade to a
more recent version.
ERROR: isexpr not defined
 in include at /usr/bin/../lib/julia/sys.so
 in include_from_node1 at /usr/bin/../lib/julia/sys.so
 in include at /usr/bin/../lib/julia/sys.so
 in include_from_node1 at loading.jl:128
 in process_options at /usr/bin/../lib/julia/sys.so
 in _start at /usr/bin/../lib/julia/sys.so
while loading ~/.julia/v0.3/Escher/src/cli/serve.jl, in expression starting on line 226
while loading ~/.julia/v0.3/Escher/bin/escher, in expression starting on line 7
~/./v0.4/E/examples> escher --serve           
WARNING: `require` is deprecated, use `using` or `import` instead
 in require at ./deprecated.jl:648
while loading ~/.julia/v0.4/ArgParse/src/ArgParse.jl, in expression starting on line 1
WARNING: module Patchwork should explicitly import << from Base
WARNING: module Escher should explicitly import * from Base
WARNING: module Escher should explicitly import / from Base
WARNING: module Escher should explicitly import + from Base
WARNING: module Escher should explicitly import - from Base
WARNING: This version of the GnuTLS library (3.4.4) is deprecated
and contains known security vulnerabilities. Please upgrade to a
more recent version.

WARNING: deprecated syntax "[a=>b, ...]" at ~/.julia/v0.4/Escher/src/cli/serve.jl:61.
Use "Dict(a=>b, ...)" instead.

WARNING: deprecated syntax "[a=>b, ...]" at ~/.julia/v0.4/Escher/src/cli/serve.jl:66.
Use "Dict(a=>b, ...)" instead.

WARNING: deprecated syntax "[a=>b, ...]" at ~/.julia/v0.4/Escher/src/cli/serve.jl:70.
Use "Dict(a=>b, ...)" instead.
WARNING: ntuple(n::Integer,f::Function) is deprecated, use ntuple(f,n) instead.
 in ntuple at ./deprecated.jl:49
 in call at ~/.julia/v0.4/Options/src/Options.jl:41
 in parse_commandline at /usr/local/bin/escher:573
 in main at /usr/local/bin/escher:40
while loading /usr/local/bin/escher, in expression starting on line 49
WARNING: ntuple(n::Integer,f::Function) is deprecated, use ntuple(f,n) instead.
 in ntuple at ./deprecated.jl:49
 in call at ~/.julia/v0.4/Options/src/Options.jl:41
 in parse_commandline at /usr/local/bin/escher:573
 in main at /usr/local/bin/escher:40
while loading /usr/local/bin/escher, in expression starting on line 49
WARNING: ntuple(n::Integer,f::Function) is deprecated, use ntuple(f,n) instead.
 in ntuple at ./deprecated.jl:49
 in call at ~/.julia/v0.4/Options/src/Options.jl:41
 in parse_commandline at /usr/local/bin/escher:573
 in main at /usr/local/bin/escher:40
while loading /usr/local/bin/escher, in expression starting on line 49
WARNING: ntuple(n::Integer,f::Function) is deprecated, use ntuple(f,n) instead.
 in ntuple at ./deprecated.jl:49
 in call at ~/.julia/v0.4/Options/src/Options.jl:41
 in parse_commandline at /usr/local/bin/escher:602
 in main at /usr/local/bin/escher:40
while loading /usr/local/bin/escher, in expression starting on line 49
WARNING: ntuple(n::Integer,f::Function) is deprecated, use ntuple(f,n) instead.
 in ntuple at ./deprecated.jl:49
 in call at ~/.julia/v0.4/Options/src/Options.jl:41
 in parse_args_unhandled at ~/.julia/v0.4/ArgParse/src/ArgParse.jl:1554
 in parse_args at ~/.julia/v0.4/ArgParse/src/ArgParse.jl:1447
 in parse_args at ~/.julia/v0.4/ArgParse/src/ArgParse.jl:1441
 in parse_commandline at /usr/local/bin/escher:36
 in main at /usr/local/bin/escher:40
while loading /usr/local/bin/escher, in expression starting on line 49
Listening on 0.0.0.0:5555...
ERROR (unhandled task failure): MethodError: `lowercase` has no method matching lowercase(::Bool)
 in is_websocket_handshake at ~/.julia/v0.4/WebSockets/src/WebSockets.jl:332
 in on_message_complete at ~/.julia/v0.4/HttpServer/src/HttpServer.jl:358
 in on_message_complete at ~/.julia/v0.4/HttpServer/src/RequestParser.jl:99
rohitvarkey commented 8 years ago

The isexpr error might be a dup of https://github.com/shashi/Escher.jl/issues/62. Pkg.checkout("Lazy") is the fix I think.

rohitvarkey commented 8 years ago

I'm not getting the lowercase error or any of the warnings except

WARNING: deprecated syntax "[a=>b, ...]" at ~/.julia/v0.4/Escher/src/cli/serve.jl:61.
Use "Dict(a=>b, ...)" instead.

WARNING: deprecated syntax "[a=>b, ...]" at ~/.julia/v0.4/Escher/src/cli/serve.jl:66.
Use "Dict(a=>b, ...)" instead.

WARNING: deprecated syntax "[a=>b, ...]" at ~/.julia/v0.4/Escher/src/cli/serve.jl:70.
Use "Dict(a=>b, ...)" instead.

Are you on Escher master?

NOTtheMessiah commented 8 years ago

Oops, missed the fact that I had dirty edits in a v0.4 package (hadn't been using it until v0.3 broke) but not on v0.3. once cleaned up, v0.4 works again.

Most of my attention had been on the missing isexpr, which I reproduced v0.4 by using WebSockets master (in an attempt to silence uint8(x::Integer) is deprecated, use x % UInt8 warnings), but fixed with Pkg.free("WebSockets").

NOTtheMessiah commented 8 years ago

I figured out what was wrong with minesweeper.jl: I wasn't using Patchwork.jl master, so as of now, all 3 examples mentioned examples work with v0.3, but there are some weird function composition things and missing exports with v0.4, and I'm not sure which packages I should be using master instead of releases.

as of now on v0.4:

julia -e "Pkg.status()" | grep master

  • Escher 0.1.0+ master (dirty)
  • GnuTLS 0.0.4+ master
  • Mux 0.0.0+ master
  • Options 0.2.4+ master
  • Patchwork 0.1.6+ master
  • Lazy 0.10.0 master

and on v0.3:

julia -e "Pkg.status()" | grep master

  • Escher 0.1.0+ master
  • Mux 0.0.0+ master
  • Patchwork 0.1.6+ master
rohitvarkey commented 8 years ago

Most of my attention had been on the missing isexpr, which I reproduced v0.4 by using WebSockets master (in an attempt to silence uint8(x::Integer) is deprecated, use x % UInt8 warnings), but fixed with Pkg.free("WebSockets").

I tried checking out to Websockets master, but I haven't got any error for the missing isexp.

julia> Pkg.checkout("Websockets")
INFO: Checking out Websockets master...
INFO: Pulling Websockets latest master...
INFO: No packages to install, update or remove

julia> using Escher
INFO: Recompiling stale cache file /Users/rohitvarkey/.julia/lib/v0.4/Compat.ji for module Compat.
INFO: Recompiling stale cache file /Users/rohitvarkey/.julia/lib/v0.4/FixedPointNumbers.ji for module FixedPointNumbers.

julia> include(Pkg.dir("Escher", "src", "cli", "serve.jl"))
INFO: Recompiling stale cache file /Users/rohitvarkey/.julia/lib/v0.4/SHA.ji for module SHA.

WARNING: deprecated syntax "[a=>b, ...]" at /Users/rohitvarkey/.julia/v0.4/Escher/src/cli/serve.jl:61.
Use "Dict(a=>b, ...)" instead.

WARNING: deprecated syntax "[a=>b, ...]" at /Users/rohitvarkey/.julia/v0.4/Escher/src/cli/serve.jl:66.
Use "Dict(a=>b, ...)" instead.

WARNING: deprecated syntax "[a=>b, ...]" at /Users/rohitvarkey/.julia/v0.4/Escher/src/cli/serve.jl:70.
Use "Dict(a=>b, ...)" instead.
escher_serve (generic function with 3 methods)

julia> escher_serve()
Listening on 0.0.0.0:5555...
rohitvarkey commented 8 years ago

On the other hand, that just reproduced the lowercase error!

slowbrain commented 8 years ago

I've tried to pack the Escher into docker image and had to checkout Lazy, Patchwork and Mux in this particular order. Otherwise I would get the 'isexpr not defined' error. Any idea why would that be?

NOTtheMessiah commented 8 years ago

examples/toolbar.jl

Failed test on both v0.3 and v0.4: after clicking Notifications tab, it failed to update iron-selected.

ERROR: LoadError: test failed: "Hello, World!\nYou can write any Markdown text and place it in the middle of other tiles." == "b"
 in expression: ((driver[:find_element_by_tag_name])("iron-pages"))[:text] == "b"
 in default_handler at ./test.jl:30
 in do_test at ./test.jl:53
while loading ~/code/EscherTesting.jl/test_toolbar.jl, in expression starting on line 17
NOTtheMessiah commented 8 years ago

Above is a dupe of https://github.com/shashi/Escher.jl/pull/75

shashi commented 8 years ago

@slowbrain that's because those packages need a new release

I'm closing this issue because it's grown meaningless. Please open separate issues for each bug that currently exists.

@NOTtheMessiah that error output is looking good.