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

Option to compile as much as possible / show all errors #377

Open
RickyDaMa opened this issue Aug 3, 2023 · 1 comment
Open

Option to compile as much as possible / show all errors #377

RickyDaMa opened this issue Aug 3, 2023 · 1 comment

Comments

@RickyDaMa
Copy link
Contributor

Hi there!

When I'm using fontc, I'm aware it's an incomplete and imperfect font compiler, and I'm willing to make sacrifices in my source (or hacks on fontc's source itself) to try and get all the way to a TTF.

One problem I'm running into with this is that fontc only reports a few errors at a time (as far as I can tell), instead of all* errors at once. This means that I can't solve classes of errors in one go, I have to do a fix for 3-4 glyphs, then run fontc again, get the same error for a different 3-4 glyphs, fix those, rinse & repeat ad nauseam.

I understand in the long run failing fast is probably best and a sensible default, however much like Cargo's proposed --keep-going, I think something similar could help fontc's early adopters work through the teething pains and get a TTF built.

(*Obviously there may be some point at which no further work can be done due to the accumulated errors, but that's still distinct from stopping everything when the first error is discovered)

@cmyr
Copy link
Member

cmyr commented Aug 7, 2023

Thanks for opening this, it's definitely an issue we should discuss. In general we should be able (and this could be configurable) to complete all work up to a point where there is a dependency on something that has failed, and return these errors at the end. In general this is a matter of storing a vector of intermediate errors, and returning them at the end. There is some of this in place already, but we also do seem to exit early in some situations.

More generally, I think there's a lot of room for us to improve compiler diagnostics and error reporting, and maybe this could be part of a larger project to that end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants