Skip to content

Ezno 0.0.22

Compare
Choose a tag to compare
@github-actions github-actions released this 29 Aug 14:57
· 10 commits to main since this release

This new release of the type checker includes 110 new feature tests bringing the total to 345!

output

There are a lot of cool features in this release:

This release includes lots of work on a variety of complex issues. While still not quite ready for use, it is the closest it has ever been and the last release before 0.1.0 (where I am hoping to get it working completely on some real world projects)!

These following release notes contain an explanation of the tests, contributor additions, the performance of the checker and the future of the projects.

The test suite

The 345 number comes from the number of tests in specification.md. This document can be compiled into tests and has become invaluable in checking regressions as the codebase and feature set grows.

I have also just dropped a document which maps these test through TSC if you are interested in how it compares: https://kaleidawave.github.io/ezno/comparison/

While a fixed document has helped keep track of what is missing and needs to be implemented next, it does mean that it has directed the checker to be really good on small examples rather than real world code. You can help balance this out though, by submitting your small JavaScript/TypeScript projects under this discussion and I hope to focus new additions more on this area.

Contributions

There are some super cool additions in this release from contributors! Here are some of them:

First is #180 which adds suggestions for alternative properties when the one is missing. (also for variables etc). Thanks Earl!

Screenshot 2024-08-27 143146

Josh added errors for when a call site specifies an incorrect number of type arguments #160.

Screenshot 2024-08-27 143256

Nitant added errors for conflicting variable names from import statements #192.

Screenshot 2024-08-27 143225

And most recently and most awesome of all is initial support for regular expressions. This includes constant evaluation as well as syntax checking! Great work Lemuel! (a great 2nd PR). Excited to build on this! #184.

Screenshot 2024-08-27 144849

invalid_regexp

Additionally on the internals side, Caleb added fuzzing to the type checker! A super useful tool for uncovering crashes in the checker. This adds to the previously added two parser fuzzers (also thanks to Addison for helping).

Since the addition, it has found some really good edge cases that caused the type checker to crash. The step is now green on CI, meaning a sizable chunk no longer crashes! #152
Pasted image 20240827145252


It is super motivating to have others chip into the project with suggestions and issues. Even more is code that adds more passing tests or catches issues. A huge help in moving the project forward.

There are a few good-first-issues currently on the checker. Although I think the best thing for most contributions is to suggest something (by opening a new issue) you think is missing or want to work on and I can help walkthrough the details for the addition!

Performance

At the start of this year I added a benchmark step to CI that tracks statistics of the checking code in. While the focus of the type checker is better analysis I am beyond pleased with the current time it takes to check a large amounts of code.

lots of code

The future

As my Summer vacation comes to an end, I am now taking a break on the project. I hope to finish off some PRs later in the year.

I have a few future posts in the works:

  1. Implementing mapped types (draft available to sponsors ATM and should be out within next month)
  2. The events / side-effect / dependent function system
  3. Narrowing and new types (recent stuff!)
  4. "The parser"
  5. experimental thing 1 (does work somewhat at the moment)
  6. experimental thing 2 (in idea stage).

But I have been holding off them as they are still 75% done. I might post some before the end of the year, but not sure yet.

There are many cool things the checker does today but there are many cases where it breaks on simple real world code. So I am trying to wait until those features reach a stability beyond simple examples. So they can be used in practise rather than just be experiments.

:(

image

:)

events

Supporting the project

If you think any of those things are cool you can sponsor me on GitHub sponsors. This grants you access to a repository where you can try the LSP (checking in VSCode) as well as previews of blog posts and other experimental functionality.