Skip to content

Begin cleaning up semantic errors, establishing styling conventions#1561

Merged
WardBrian merged 6 commits intomasterfrom
semantic-error-coloring
Oct 14, 2025
Merged

Begin cleaning up semantic errors, establishing styling conventions#1561
WardBrian merged 6 commits intomasterfrom
semantic-error-coloring

Conversation

@WardBrian
Copy link
Copy Markdown
Member

Similar to #1551, this tries to set up some conventions for semantic errors by defining and using some consistent helper functions for things like "Found one type but expected another", or for quoting a string, etc.

Submission Checklist

  • Run unit tests
  • Documentation
    • If a user-facing facing change was made, the documentation PR is here:
    • OR, no user-facing changes were made

Release notes

Type errors will now contain colors.

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)

@WardBrian WardBrian requested a review from nhuurre October 14, 2025 16:18
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 14, 2025

Codecov Report

❌ Patch coverage is 90.58824% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.27%. Comparing base (f366f16) to head (a69e9d9).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
src/common/Nonempty_list.ml 20.00% 4 Missing ⚠️
src/frontend/Semantic_error.ml 94.87% 2 Missing ⚠️
src/frontend/Typechecker.ml 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1561      +/-   ##
==========================================
+ Coverage   90.26%   90.27%   +0.01%     
==========================================
  Files          64       65       +1     
  Lines        9929     9981      +52     
==========================================
+ Hits         8962     9010      +48     
- Misses        967      971       +4     
Files with missing lines Coverage Δ
src/frontend/SignatureMismatch.ml 87.63% <100.00%> (+1.02%) ⬆️
src/frontend/Semantic_error.ml 95.97% <94.87%> (+0.40%) ⬆️
src/frontend/Typechecker.ml 93.40% <50.00%> (+<0.01%) ⬆️
src/common/Nonempty_list.ml 20.00% <20.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@WardBrian WardBrian force-pushed the semantic-error-coloring branch from 8c08ccd to 7ff4ac2 Compare October 14, 2025 18:02
@WardBrian
Copy link
Copy Markdown
Member Author

(note, Nonempty_list will be in the next Core version, c.f. janestreet/core#177 janestreet/core_kernel@4b48de7)

@WardBrian WardBrian force-pushed the semantic-error-coloring branch from dc518b1 to 1051c99 Compare October 14, 2025 19:56
@WardBrian WardBrian merged commit 1f48cd3 into master Oct 14, 2025
3 checks passed
@WardBrian WardBrian deleted the semantic-error-coloring branch October 14, 2025 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants