Currently bokeh depends on breeze, mainly to allow breeze.linalg.DenseVector[_] as a column type (and serialization). It would be better to make breeze optional to reduce dependency size and make a step towards scala.js compatibility. Most support for DenseVector is done through type classes, so it shouldn't be a problem to move them to a separate sub-project (e.g. lib or something like that) and then import as needed. The only issue is with serialization of Any (still required for ColumnDataSource). I tried to use a structural type instead of DenseVector[_] in anyToJson(), but this can fail with "method not found" upon reflection (the match is unchecked, resulting in a cast, possibly unsuccessful). If ColumnDataSource was improved to not use Any, then this issue would resolve by itself.
Currently bokeh depends on breeze, mainly to allow
breeze.linalg.DenseVector[_]
as a column type (and serialization). It would be better to make breeze optional to reduce dependency size and make a step towards scala.js compatibility. Most support forDenseVector
is done through type classes, so it shouldn't be a problem to move them to a separate sub-project (e.g.lib
or something like that) and then import as needed. The only issue is with serialization ofAny
(still required forColumnDataSource
). I tried to use a structural type instead ofDenseVector[_]
inanyToJson()
, but this can fail with "method not found" upon reflection (the match is unchecked, resulting in a cast, possibly unsuccessful). IfColumnDataSource
was improved to not useAny
, then this issue would resolve by itself.