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

stop exporting HTML and Text from Base #29841

Open
musm opened this issue Oct 29, 2018 · 12 comments
Open

stop exporting HTML and Text from Base #29841

musm opened this issue Oct 29, 2018 · 12 comments
Labels
kind:breaking This change will break code
Milestone

Comments

@musm
Copy link
Contributor

musm commented Oct 29, 2018

Stop exporting HTML and Text from Base.

The Text one is pretty annoying since it's easy to clash with.

@musm musm changed the title stop exporting HTML and Text stop exporting HTML and Text from Base Oct 29, 2018
@StefanKarpinski StefanKarpinski added this to the 2.0+ milestone Oct 29, 2018
@StefanKarpinski
Copy link
Sponsor Member

It might be possible to remove these exports before 2.0 but only if no one in any package is using them.

@stevengj
Copy link
Member

The HTML function seems to be used in a bunch of packages. Text is also used, e.g. in Tk.jl.

@KristofferC
Copy link
Sponsor Member

It is used but it is explicitly imported so removing the export wouldn't be breaking.

@stevengj
Copy link
Member

stevengj commented Oct 29, 2018

There are other packages that use Text without importing, e.g. DiffEqBase.

@StefanKarpinski
Copy link
Sponsor Member

StefanKarpinski commented Oct 29, 2018

It is used but it is explicitly imported so removing the export wouldn't be breaking.

Seems sneaky and kind of crappy to go from exported—and therefore official API—to unexported, taking advantage of the fact that someone else was a good end-user explicitly and imported it, only to then turn around and break their code by deleting or moving what used to be an official API.

@musm
Copy link
Contributor Author

musm commented Oct 29, 2018

Don't we have femtocleaner for precisely these types of trivial substitutions?

@ChrisRackauckas
Copy link
Member

The ASCII colors required Text in order to render correctly on I Julia IIRC, but I can double check. Just remove the export and I'll make sure to Base. it ASAP.

@stevengj
Copy link
Member

If you take semver seriously, then this is simply not an option until Julia 2.0.

@musm
Copy link
Contributor Author

musm commented Sep 17, 2019

I'd also add @text_str to this list.

@tknopp
Copy link
Contributor

tknopp commented Sep 17, 2019

If you take semver seriously, then this is simply not an option until Julia 2.0.

I second that. Public packages are not the only Julia code out there.

@StefanKarpinski
Copy link
Sponsor Member

Believe me, I hate that we export this as much as anyone, but we do, now we have to live with it.

@clarkevans
Copy link
Member

clarkevans commented Dec 16, 2020

I didn't grok it at first, but now I think HTML is brilliant -- it's just missing a critical fix #38892 that would enable it to be really useful. Perhaps what is missing is documentation that explains how hypertext processing could be done in Julia? I can work on a pull request for documentation, but it'd need #38892 to be interesting.

Anyway, I use HTML as a central part of HypertextLiteral.jl. I would also note that HTML provides a trait object for content that is intended to be showable(text/html). It's much faster to have dispatches based upon HTML that can be resolved at compile time, rather than having runtime checks for showable, which is an order of magnitude slower. In short, I did feel initially that HTML (and Text) collided with what I wanted to do... till I understood how they worked.

If we want to drop HTML perhaps there's a way to hook into the compilation stage that notices that HTML is used but not Docs.HTML? It'd be easy enough for packages out there to make a gradual change to Docs.HTML. We could start by searching github for usage and ask those package vendors to prefix it. Also the documentation could encourage this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:breaking This change will break code
Projects
None yet
Development

No branches or pull requests

8 participants