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

Make Colors.jl a direct dependency #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alyst
Copy link
Contributor

@alyst alyst commented Jul 7, 2024

Currently, Colors.jl is a weak dependency, and the user needs using Colors to enable ColorsExt extension, which sole purpose is to define _json_lower(c::Colorant).
However, PlotlyBase.jl already has ColorSchemes.jl as a direct dependency and defines _json_lower(::ColorScheme) in the main module.
But the latter method needs _json_lower(::Colorant) to work.

So, making Colors.jl a direct dependency of PlotlyBase.jl would simplify things a bit. It would not increase the "dependencies burden" of PlotlyBase.jl since Colors.jl is already a direct dependency of ColorSchemes.jl.

Also, it should solve the error

MethodError: Cannot `convert` an object of type JSON.Writer.CompositeTypeWrapper{RGB{Float64}} to an object of type String

which I am getting despite using Colors in my user project.

@hhaensel
Copy link
Contributor

I fully support this PR

(PlotlyBase) pkg> st -m Colors
Project PlotlyBase v0.8.19
Status `~/.julia/dev/PlotlyBase/Manifest.toml`
  [5ae59095] Colors v0.12.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants