Skip to content

feat: add syntax highlighting support #11006

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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

colinaaa
Copy link
Collaborator

@colinaaa colinaaa commented Jul 12, 2025

Summary

The first step for #10068.

Note

We haven't implement the SpanContents trait yet. So only those can be auto-detected have syntax highlighting now.

E.g.:

image

Since the MietteHighlighter is private, we made a fork from miette::hightlighters.

Related links

This is a port of zkat/miette#313.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link

netlify bot commented Jul 12, 2025

Deploy Preview for rspack ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f1e51fe
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/6877afa28454bd00083913ef
😎 Deploy Preview https://deploy-preview-11006--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Jul 12, 2025
Copy link

codspeed-hq bot commented Jul 12, 2025

CodSpeed Performance Report

Merging #11006 will degrade performances by 17.05%

Comparing colinaaa:colin/0712/highlighters (f1e51fe) with main (91dc2db)

Summary

⚡ 3 improvements
❌ 1 regressions
✅ 12 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
bundle@basic-react-development 434.9 ms 524.3 ms -17.05%
bundle@basic-react-production-sourcemap 841.4 ms 737.9 ms +14.03%
bundle@threejs-production 1.8 s 1.6 s +15.18%
bundle@threejs-production-sourcemap 2.4 s 2 s +18.72%

@colinaaa
Copy link
Collaborator Author

colinaaa commented Jul 12, 2025

📦 Binary Size-limit

Comparing 451d48a to fix: factorize hooks avoid update dependency request (#10999) by jinrui

❌ Size increased by 1.01MB from 57.46MB to 58.48MB (⬆️1.76%)

https://github.com/web-infra-dev/rspack/actions/runs/16235448038/job/45844922038?pr=11006

kdy1 pushed a commit to swc-project/swc that referenced this pull request Jul 14, 2025
…nostics (#10852)

**Description:**

Automatically prevent the creation of `miette::GraphicalReportHandler when no diagnostics are present.

**Related issue:**

See performance regression in web-infra-dev/rspack#11006
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: feature release: feature related release(mr only)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant