cogentcore / core

A free and open source framework for building powerful, fast, and elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the Web with a single pure Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.31k stars 71 forks source link

Reduce the amount of code in enumgen files #928

Closed kkoreilly closed 3 months ago

kkoreilly commented 3 months ago

Describe the feature

We can do this by removing unnecessary functions and moving logic into the enums package, which can then be called in the generated code. This will help reduce binary sizes for #733 and increase test coverage for #541.

Relevant code

No response

kkoreilly commented 3 months ago

I implemented this, which resulted in around 10,000 lines of deleted code, 220kb of removed binary size, and 1.1% more test coverage.