metaborg / spoofax

Spoofax runtime
Apache License 2.0
129 stars 23 forks source link

Don't generate Typesmart when disabled (which is the default) #62

Closed Virtlink closed 4 years ago

Virtlink commented 4 years ago

When typesmart: true is not specified in the metaborg.yaml, it defaults to false. However, the Typesmart files are still generated. This PR avoids generating Typesmart files when it is disabled.

This reduces the time for a full clean build of Spoofax from 28.3 min to 19.4 min (-31%) on my machine.

Apanatshka commented 4 years ago

I introduced this once as well, because Typesmart is slow with that generation. But the problem is that if you depend on another project and have Typesmart on, you need that other project to have those Typesmart files as well. So this is not a good idea. If you were able to have Typesmart generate files for dependencies that don't package them, that would allow this change to happen. And Typesmart is not really used, so putting the onus on its users would be ok. But don't put time into that, I expect we will drop Typesmart entirely once the Gradual Types work for Stratego is in a usable state.

Virtlink commented 4 years ago

Yeah, I'm not going to put more time into this. I wasn't sure about the interaction of typesmart with the rest of the ecosystem, which is why I created a PR.