Accessors.jl icon indicating copy to clipboard operation
Accessors.jl copied to clipboard

Move custom error hint for insert to a package extension

Open MasonProtter opened this issue 1 year ago • 2 comments

This is a followup PR to https://github.com/JuliaObjects/Accessors.jl/pull/140

On modern versions of julia, moving this code to a package extension should have no observable changes, but it makes it so that Accessors.jl doesn't unconditionally load Markdown.jl, and only ends up using it if it's already loaded (which will be the case for interactive sessions of julia, but might not be the case if one is doing something like making a small binary and are stripping stdlibs.

I'd argue that in such a situation, this error hint isn't necessary or desirable anyways.

MasonProtter avatar Jul 26 '24 11:07 MasonProtter

Tbh, I would vote for just removing Markdown and keeping the hint in __init__. Adding a separate extension just for a bit of highlights in a rare exception hint appears a bit too much...

But if others are in favor, this should be fine I guess.

aplavin avatar Jul 26 '24 14:07 aplavin

I agree with @aplavin lets keep it simple stupid.

jw3126 avatar Jul 26 '24 14:07 jw3126