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

Discuss: Any changes to common subset for 2022 / v12? #3526

Closed
Tracked by #3219
joshgoebel opened this issue Apr 25, 2022 · 5 comments
Closed
Tracked by #3219

Discuss: Any changes to common subset for 2022 / v12? #3526

joshgoebel opened this issue Apr 25, 2022 · 5 comments
Labels
discuss/propose Proposal for a new feature/direction enhancement An enhancement or new feature help welcome Could use help from community
Milestone

Comments

@joshgoebel
Copy link
Member

joshgoebel commented Apr 25, 2022

Related: #2848

Time for yearly/release cycle of discussing any changes to the default common set of languages we bundle. v11 was released in May of last year and we do have things on the breaking changes list so I'm starting to think about a summer release of v12.

The list stands at:

│ lang         │ minified │
───────────────────────────
│ bash         │ 6202     │
│ c            │ 7923     │
│ cpp          │ 11438    │
│ csharp       │ 8322     │
│ css          │ 3802     │
│ diff         │ 1195     │
│ go           │ 2359     │
│ ini          │ 2335     │
│ java         │ 5090     │
│ javascript   │ 14719    │
│ json         │ 1171     │
│ kotlin       │ 6229     │
│ less         │ 6243     │
│ lua          │ 3054     │
│ makefile     │ 2073     │
│ markdown     │ 5022     │
│ objectivec   │ 4896     │
│ perl         │ 8825     │
│ php          │ 13898    │
│ php-template │ 1147     │
│ plaintext    │ 289      │
│ python       │ 9064     │
│ python-repl  │ 624      │
│ r            │ 7935     │
│ ruby         │ 9188     │
│ rust         │ 5396     │
│ scss         │ 4331     │
│ shell        │ 770      │
│ sql          │ 11736    │
│ swift        │ 12238    │
│ typescript   │ 2745     │
│ vbnet        │ 5265     │
│ xml          │ 5204     │
│ yaml         │ 4562     │

And the stats:

highlight.min.js    : 117742 bytes
highlight.min.js.gz : 39711 bytes

Rather than rehash what "almost" happened last time I'm just going to start this discussion fresh. We have since added two "hot" new web-related grammars that aren't currently in common that are worth consideration:

  • WASM
  • GraphQL

I'm not sure why we never added Node REPL last time but we probably should now for parity.

Opening this up for discussion.

CC @highlightjs/core

@joshgoebel joshgoebel added enhancement An enhancement or new feature discuss/propose Proposal for a new feature/direction labels Apr 25, 2022
@joshgoebel joshgoebel added the help welcome Could use help from community label Apr 25, 2022
@joshgoebel joshgoebel changed the title Discuss: Any changes to common subset for 2002 / v12? Discuss: Any changes to common subset for 2022 / v12? Apr 25, 2022
@joshgoebel
Copy link
Member Author

joshgoebel commented Apr 25, 2022

I wonder if in 2022 we still need all 4 CSS variants:

  • css (the real deal)
  • less
  • stylus (my bad, this was never in common)
  • scss

Also makefile stands out at me a bit as a "which one doesn't belong" if we were looking for something to cut, but it's only only 2kb.... so I'm tempted to leave it...

@joshgoebel joshgoebel added this to the 12.0 milestone Apr 25, 2022
@joshgoebel
Copy link
Member Author

@allejo Any thoughts?

@allejo
Copy link
Member

allejo commented Jul 8, 2022

I feel like with the widespread support and usage of CSS "variables" (aka custom properties), the need for CSS preprocessors has lessened significantly compared to a few years ago. Unless you're building a CSS library, chances are, you probably won't be writing in a preprocessor anymore. I think if the common subset only had CSS, that would suffice for people.

Regarding Makefile... I don't think it's popular enough to deserve being in the common subset. It's mostly used in the C/C++ ecosystem and maybe Python. I vote to remove it.

I'm on the border but I'd push to remove vbnet from the common subset. I see it used in the Microsoft ecosystem, especially for plug-in development, but its use is dwindling since Microsoft has moved its Office SDKs to JavaScript.

Also on the border, but I'd vote out Objective-C. Swift has largely taken over the Apple SDK ecosystem where I don't see a need to bundle it as being common anymore.

You have my +1 for WASM and GraphQL

@joshgoebel
Copy link
Member Author

You have my +1 for WASM and GraphQL

These have been added and will hit with 11.6, only about ~750 bytes file size increase.

I think I'm with you - we'll try to be a bit more aggressive this year with our removals - and if anyone yells too loudly we can always slip things back in, otherwise I'm probably likely to leave in some of this stuff for years to come...

@joshgoebel
Copy link
Member Author

Removing:

	modified:   src/languages/less.js
	modified:   src/languages/makefile.js
	modified:   src/languages/objectivec.js
	modified:   src/languages/scss.js
	modified:   src/languages/vbnet.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss/propose Proposal for a new feature/direction enhancement An enhancement or new feature help welcome Could use help from community
Projects
None yet
Development

No branches or pull requests

2 participants