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

Can't use Symbols as Preference keys #47

Open
BeastyBlacksmith opened this issue Nov 26, 2022 · 1 comment
Open

Can't use Symbols as Preference keys #47

BeastyBlacksmith opened this issue Nov 26, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@BeastyBlacksmith
Copy link

julia> set_preferences!(Plots, "default_backend" => :plotly)
ERROR: type `Symbol` is not a valid TOML type, pass a conversion function to `TOML.print`
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] _print(f::Nothing, io::IOStream, a::Dict{String, Any}, ks::Vector{String}; indent::Int64, first_block::Bool, sorted::Bool, by::Function)
    @ TOML.Internals.Printer ~/.asdf/installs/julia/1.8.0/share/julia/stdlib/v1.8/TOML/src/print.jl:112
  [3] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Any, NTuple{4, Symbol}, NamedTuple{(:indent, :first_block, :sorted, :by), Tuple{Int64, Bool, Bool, typeof(identity)}}})
    @ Base ./essentials.jl:731
  [4] _print(f::Nothing, io::IOStream, a::Dict{String, Any}, ks::Vector{String}; indent::Int64, first_block::Bool, sorted::Bool, by::Function)
    @ TOML.Internals.Printer ~/.asdf/installs/julia/1.8.0/share/julia/stdlib/v1.8/TOML/src/print.jl:147
  [5] #print#15
    @ ~/.asdf/installs/julia/1.8.0/share/julia/stdlib/v1.8/TOML/src/print.jl:170 [inlined]
  [6] (::Preferences.var"#4#5")(io::IOStream)
    @ Preferences ~/.julia/packages/Preferences/VmJXL/src/Preferences.jl:145
  [7] open(::Preferences.var"#4#5", ::String, ::Vararg{String}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base ./io.jl:384
  [8] open
    @ ./io.jl:381 [inlined]
  [9] set_preferences!(target_toml::String, pkg_name::String, pairs::Pair{String, Symbol}; force::Bool)
    @ Preferences ~/.julia/packages/Preferences/VmJXL/src/Preferences.jl:144
 [10] set_preferences!
    @ ~/.julia/packages/Preferences/VmJXL/src/Preferences.jl:115 [inlined]
 [11] set_preferences!(u::Base.UUID, prefs::Pair{String, Symbol}; export_prefs::Bool, active_project_only::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Preferences ~/.julia/packages/Preferences/VmJXL/src/Preferences.jl:276
 [12] set_preferences!
    @ ~/.julia/packages/Preferences/VmJXL/src/Preferences.jl:205 [inlined]
 [13] #set_preferences!#13
    @ ~/.julia/packages/Preferences/VmJXL/src/Preferences.jl:279 [inlined]
 [14] set_preferences!(m::Module, prefs::Pair{String, Symbol})
    @ Preferences ~/.julia/packages/Preferences/VmJXL/src/Preferences.jl:278
 [15] top-level scope
    @ REPL[7]:1
@StefanKarpinski
Copy link

Feature request I guess.

@StefanKarpinski StefanKarpinski added the enhancement New feature or request label Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants