JuliaGizmos / Escher.jl

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

Update REQUIRE #152

Closed jingpengw closed 7 years ago

jingpengw commented 8 years ago

after installing ComposeDiff, the plots in Escher works.

shashi commented 8 years ago

Hmm, the point is this is optional...

randyzwitch commented 7 years ago

@shashi, at this point is it really optional? When importing Escher into Vega, pre-compilation fails because ComposeDiff isn't available. It seems weird for me to require ComposeDiff in Vega, when it is Escher that actually uses it.

shashi commented 7 years ago

ComposeDiff is only required if you are using Compose or Gadfl` with Escher. ComposeDiff depends on Compose which is definitely an extraneous dependency for Escher.

shashi commented 7 years ago

@randyzwitch Why are you importing Escher? Is it to override Escher.render?

shashi commented 7 years ago

I would suggest, doing something like https://github.com/shashi/Escher.jl/blob/master/src/basics/lazyload.jl#L79-L88

Escher does not have the precompile directive, so other packages which precompile themselves cannot depend on it, it's a shame but the only correct way to deal with this seems to be to have some kind of conditional modules https://github.com/JuliaLang/julia/issues/6195.

randyzwitch commented 7 years ago

It originally started as a comment from @tkelman, who mentioned that my conditional imports of Escher and Blink keeps Vega from precompiling.

But ultimately, having Escher installed keeps Vega from loading. Escher doesn't load because ComposeDiff isn't available, because Requires.jl isn't working properly (?). So Vega is now in a difficult state because of all these conditional imports.

I was going to tag a new Vega version for 0.5 support, but at this point, I'm thinking of dropping Blink and Escher support, because the "optional" dependency chain is getting so long.

Related: #141

tkelman commented 7 years ago

Optional dependencies are best implemented as separate packages at this point, if you want precompilation to work right now.