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

Merged
merged 1 commit into from
Dec 12, 2024
Merged

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

@alyst alyst force-pushed the direct_colors_dep branch from 193f4dc to 57ded00 Compare December 10, 2024 18:37
@alyst
Copy link
Contributor Author

alyst commented Dec 10, 2024

@sglyon Could you please consider this PR? I've just rebased it to the current master.

@sglyon
Copy link
Owner

sglyon commented Dec 12, 2024

Thank you @alyst

@sglyon sglyon merged commit f8bc850 into sglyon:master Dec 12, 2024
6 checks passed
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.

3 participants