kaby76 / Antlr4BuildTasks

Third-party build tool for 'Official' Antlr4 tool and runtime parsers using .Net. Drop-in replacement for 'Antlr4cs' Antlr4 tool and build rules.
MIT License
75 stars 10 forks source link

Build runs on every compile #85

Open masonwheeler opened 1 month ago

masonwheeler commented 1 month ago

The ANTLR build process appears to run every time I build the containing assembly. This wouldn't be so bad if it didn't take so long, but when I'm trying to fix a test failure, rebuild, and run the test again, taking 10+ seconds to run an external Java engine to rebuild something I don't need rebuilt severely damages my iteration speed.

Would it be possible to put a check in the build task that can determine "we have existing generated code files in obj, and the timestamp on them is newer than the Last Modified timestamp on the .g4 files, therefore we don't have to rebuild anything"?

kaby76 commented 1 month ago

It's not supposed to run the Antlr tool everytime on "dotnet build". I will check if it's broken. K

On Thu, Jul 25, 2024, 7:48 PM masonwheeler @.***> wrote:

The ANTLR build process appears to run every time I build the containing assembly. This wouldn't be so bad if it didn't take so long, but when I'm trying to fix a test failure, rebuild, and run the test again, taking 10+ seconds to run an external Java engine to rebuild something I don't need rebuilt severely damages my iteration speed.

Would it be possible to put a check in the build task that can determine "we have existing generated code files in obj, and the timestamp on them is newer than the Last Modified timestamp on the .g4 files, therefore we don't have to rebuild anything"?

— Reply to this email directly, view it on GitHub https://github.com/kaby76/Antlr4BuildTasks/issues/85, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACW4UC3DJ3E2QXZKJTG6WY3ZOGFELAVCNFSM6AAAAABLPPXMJKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZTCMJTG43DOMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

masonwheeler commented 1 month ago

Sorry, nevermind; I should have checked this further. I knew the parser was slowing things down drastically, but upon investigation it looks like it isn't running ANTLR every time. It's that the generated parser + lexer files are over 100,000 lines of code, and CSC is taking a while to chew through them.

My bad.