Why does this fail?
using DataFrames, AlgebraOfGraphics, WGLMakie
plotdf = DataFrame(a=["x", "x", "y", "y"], b=["a", "b", "a", "b"], c=[1., 2., 3.,4.])
spec = (
data(plotdf)
* mapping(:a, dodge=:b, color=:b)
* mapping(:c) * visual(Scatter)
)
p = draw(spec)
julia> ┌ Error: Type Observable{Int64} isn't supported for uniform: dodge
└ @ ShaderAbstractions ~/.julia/packages/ShaderAbstractions/zraST/src/program.jl:104
┌ Error: error handling request
│ exception =
│ Type Int64 not supported
│ Stacktrace:
│ [1] error(s::String)
│ @ Base ./error.jl:33
│ [2] type_string(context::WGLMakie.WebGL, t::Type)
│ @ ShaderAbstractions ~/.julia/packages/ShaderAbstractions/zraST/src/uniforms.jl:142
│ [3] type_string(context::WGLMakie.WebGL, x::Int64)
│ @ ShaderAbstractions ~/.julia/packages/ShaderAbstractions/zraST/src/uniforms.jl:114
│ [4] type_string(context::WGLMakie.WebGL, t::Observable{Int64})
│ @ ShaderAbstractions ~/.julia/packages/ShaderAbstractions/zraST/src/uniforms.jl:140
│ [5] (::ShaderAbstractions.var"#29#31"{Base.Pairs{Symbol, Any, NTuple{27, Symbol}, NamedTuple{(:dodge, :strokecolor, :specular, :use_pixel_marker, :glowwidth, :n_dodge, :atlas_texture_size, :ssao, :markersize, :rotations, :marker_offset, :ambient, :shape_type, :nan_color, :distancefield, :shininess, :strokewidth, :pixelspace, :resolution, :model, :billboard, :color, :uv_offset_width, :diffuse, :inspectable, :glowcolor, :transform_marker), Tuple{Observable{Int64}, Observable{RGBA{Float32}}, Observable{Vec{3, Float32}}, Observable{Bool}, Observable{Float32}, Observable{Int64}, Float32, Observable{Bool}, Observable{Vec{2, Float32}}, Observable{Quaternionf}, Observable{Vec{2, Float32}}, Observable{Vec{3, Float32}}, Observable{Int32}, Observable{RGBA{Float32}}, ShaderAbstractions.Sampler{Float16, 2, Matrix{Float16}}, Observable{Float32}, Observable{Float32}, Observable{StaticArrays.SMatrix{4, 4, Float32, 16}}, Observable{Vec{2, Float32}}, Observable{StaticArrays.SMatrix{4, 4, Float32, 16}}, Observable{Bool}, Observable{RGBA{Float32}}, Observable{Vec{4, Float32}}, Observable{Vec{3, Float32}}, Observable{Bool}, Observable{RGBA{Float32}}, Observable{Bool}}}}, WGLMakie.WebGL, Dict{Symbol, Any}})(io::IOBuffer)
│ @ ShaderAbstractions ~/.julia/packages/ShaderAbstractions/zraST/src/program.jl:102
│ [6] sprint(::Function; context::Nothing, sizehint::Int64)
│ @ Base ./strings/io.jl:114
│ [7] sprint
│ @ ./strings/io.jl:108 [inlined]
│ [8] #Program#28
│ @ ~/.julia/packages/ShaderAbstractions/zraST/src/program.jl:96 [inlined]
│ [9] ShaderAbstractions.InstancedProgram(context::WGLMakie.WebGL, vertshader::String, fragshader::String, instance::GeometryBasics.Mesh{2, Float32, GeometryBasics.TriangleP{2, Float32, GeometryBasics.PointWithUV{2, Float32}}, GeometryBasics.FaceView{GeometryBasics.TriangleP{2, Float32, GeometryBasics.PointWithUV{2, Float32}}, GeometryBasics.PointWithUV{2, Float32}, GeometryBasics.NgonFace{3, GeometryBasics.OffsetInteger{-1, UInt32}}, StructArrays.StructVector{GeometryBasics.PointWithUV{2, Float32}, NamedTuple{(:position, :uv), Tuple{Vector{Point{2, Float32}}, Vector{Vec{2, Float32}}}}, Int64}, Vector{GeometryBasics.NgonFace{3, GeometryBasics.OffsetInteger{-1, UInt32}}}}}, per_instance::ShaderAbstractions.VertexArray{NamedTuple{(:offset,), Tuple{Point{2, Float32}}}, StructArrays.StructVector{NamedTuple{(:offset,), Tuple{Point{2, Float32}}}, NamedTuple{(:offset,), Tuple{ShaderAbstractions.Buffer{Point{2, Float32}, Vector{Point{2, Float32}}}}}, CartesianIndex{1}}}; uniforms::Base.Pairs{Symbol, Any, NTuple{27, Symbol}, NamedTuple{(:dodge, :strokecolor, :specular, :use_pixel_marker, :glowwidth, :n_dodge, :atlas_texture_size, :ssao, :markersize, :rotations, :marker_offset, :ambient, :shape_type, :nan_color, :distancefield, :shininess, :strokewidth, :pixelspace, :resolution, :model, :billboard, :color, :uv_offset_width, :diffuse, :inspectable, :glowcolor, :transform_marker), Tuple{Observable{Int64}, Observable{RGBA{Float32}}, Observable{Vec{3, Float32}}, Observable{Bool}, Observable{Float32}, Observable{Int64}, Float32, Observable{Bool}, Observable{Vec{2, Float32}}, Observable{Quaternionf}, Observable{Vec{2, Float32}}, Observable{Vec{3, Float32}}, Observable{Int32}, Observable{RGBA{Float32}}, ShaderAbstractions.Sampler{Float16, 2, Matrix{Float16}}, Observable{Float32}, Observable{Float32}, Observable{StaticArrays.SMatrix{4, 4, Float32, 16}}, Observable{Vec{2, Float32}}, Observable{StaticArrays.SMatrix{4, 4, Float32, 16}}, Observable{Bool}, Observable{RGBA{Float32}}, Observable{Vec{4, Float32}}, Observable{Vec{3, Float32}}, Observable{Bool}, Observable{RGBA{Float32}}, Observable{Bool}}}})
│ @ ShaderAbstractions ~/.julia/packages/ShaderAbstractions/zraST/src/program.jl:58
│ [10] scatter_shader(scene::Scene, attributes::Dict{Symbol, Observable})
│ @ WGLMakie ~/.julia/packages/WGLMakie/0tzNl/src/particles.jl:137
│ [11] create_shader(scene::Scene, plot::Scatter{Tuple{Vector{Point{2, Float32}}}})
│ @ WGLMakie ~/.julia/packages/WGLMakie/0tzNl/src/particles.jl:155
│ [12] serialize_three(scene::Scene, plot::Scatter{Tuple{Vector{Point{2, Float32}}}})
│ @ WGLMakie ~/.julia/packages/WGLMakie/0tzNl/src/serialization.jl:290
│ [13] serialize_plots(scene::Scene, plots::Vector{AbstractPlot}, result::Vector{Any})
│ @ WGLMakie ~/.julia/packages/WGLMakie/0tzNl/src/serialization.jl:279
│ [14] serialize_plots
│ @ ~/.julia/packages/WGLMakie/0tzNl/src/serialization.jl:276 [inlined]
│ [15] serialize_scene(scene::Scene, serialized_scenes::Vector{Any})
│ @ WGLMakie ~/.julia/packages/WGLMakie/0tzNl/src/serialization.jl:260
│ [16] (::WGLMakie.var"#20#24"{Vector{Any}})(child::Scene)
│ @ WGLMakie ~/.julia/packages/WGLMakie/0tzNl/src/serialization.jl:270
│ [17] foreach(f::WGLMakie.var"#20#24"{Vector{Any}}, itr::Vector{Scene})
│ @ Base ./abstractarray.jl:2694
│ [18] serialize_scene(scene::Scene, serialized_scenes::Vector{Any})
│ @ WGLMakie ~/.julia/packages/WGLMakie/0tzNl/src/serialization.jl:270
│ [19] serialize_scene
│ @ ~/.julia/packages/WGLMakie/0tzNl/src/serialization.jl:251 [inlined]
│ [20] three_display(session::JSServe.Session, scene::Scene)
│ @ WGLMakie ~/.julia/packages/WGLMakie/0tzNl/src/three_plot.jl:54
│ [21] (::WGLMakie.var"#145#146"{Scene, Base.RefValue{Any}})(s::JSServe.Session, request::HTTP.Messages.Request)
│ @ WGLMakie ~/.julia/packages/WGLMakie/0tzNl/src/display.jl:80
│ [22] #invokelatest#2
│ @ ./essentials.jl:716 [inlined]
│ [23] invokelatest
│ @ ./essentials.jl:714 [inlined]
│ [24] apply_handler(app::JSServe.App, context::NamedTuple{(:routes, :application, :request, :match), Tuple{JSServe.Routes, JSServe.Server, HTTP.Messages.Request, String}})
│ @ JSServe ~/.julia/packages/JSServe/E7QrV/src/server.jl:50
│ [25] delegate(::JSServe.Routes, ::JSServe.Server, ::HTTP.Messages.Request)
│ @ JSServe ~/.julia/packages/JSServe/E7QrV/src/server.jl:64
│ [26] #15
│ @ ~/.julia/packages/JSServe/E7QrV/src/server.jl:184 [inlined]
│ [27] handle
│ @ ~/.julia/packages/HTTP/aTjcj/src/Handlers.jl:254 [inlined]
│ [28] handle(::HTTP.Handlers.RequestHandlerFunction{JSServe.var"#15#17"{JSServe.Server}}, ::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}})
│ @ HTTP.Handlers ~/.julia/packages/HTTP/aTjcj/src/Handlers.jl:277
│ [29] stream_handler(application::JSServe.Server, stream::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}})
│ @ JSServe ~/.julia/packages/JSServe/E7QrV/src/server.jl:189
│ [30] #invokelatest#2
│ @ ./essentials.jl:716 [inlined]
│ [31] invokelatest
│ @ ./essentials.jl:714 [inlined]
│ [32] #26
│ @ ~/.julia/packages/JSServe/E7QrV/src/server.jl:302 [inlined]
│ [33] macro expansion
│ @ ~/.julia/packages/HTTP/aTjcj/src/Servers.jl:415 [inlined]
│ [34] (::HTTP.Servers.var"#13#14"{JSServe.var"#26#28"{JSServe.Server}, HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}, HTTP.Servers.Server{Nothing, Sockets.TCPServer}, HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}})()
│ @ HTTP.Servers ./task.jl:423
└ @ HTTP.Servers ~/.julia/packages/HTTP/aTjcj/src/Servers.jl:429