-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Type piracy in package #61
Comments
Somewhat related to #57, regarding the justification for this library to do the piracy. |
Loosely at best, since here we're talking about moving some functionality from this library to Base, and #57 is more about what/how functionality should be backported to the compat version. |
That's right. However, isn't the "result" of that the same? |
I can't say I follow. In Julia >1.11 the |
I am just referring to The above piracy could be eliminated from StyledString as stdlib. As a result, the piracy left in In other words, I am talking about the justification for piracy here, not how the code behaves. |
Hi! Just for the records, it seems that this issue is causing a huge precompilation overhead in PrettyTables.jl when using Julia 1.11. For more information, see JuliaLang/julia#56080. |
Good to have, and FWIW you have some sympathy for the effort in tracking this down. I don't think the core issue has actually been stated here, so it would probably be worth me doing so for the record. During the series of triage discussions that occurred around There's ongoing discussion about how this should best be resolved, ranging from just evicting everything currently in Cody also had an interesting idea I half-remember about making a more central, pluggable, print method to solve this issue and make it possible to customise printing potentially. This is an issue that's cared about, without an obvious fix, but with a few ideas that need exploring. |
Yeah the idea is to split the behavior into the The additional wrinkle right now is that an You wouldn't be allowed to "mix" annotations from different libraries in the same string - but that also dramatically simplifies the display logic since you only need to worry about "your own" display state on the library side. The key thing to get rid of is the hard-coded behavior where we assume there is one special library in memory that knows how to display annotations in an AnnotatedString (and we invalidate on it) |
All of this stuff:
StyledStrings.jl/src/io.jl
Lines 252 to 297 in 6901610
looks to be a pretty bad type piracy and should probably be moved to Base.
The text was updated successfully, but these errors were encountered: