aiken-lang / aiken

A modern smart contract platform for Cardano
https://aiken-lang.org
Apache License 2.0
454 stars 84 forks source link

Cache dependencies #861

Closed rvcas closed 4 months ago

rvcas commented 6 months ago

What is your idea? Provide a use case.

Cache dependencies using CheckedModule::to_cbor.

Why is it a good idea?

It will allow us to have the compiler avoid doing work it's already done on subsequent runs of check and build.

Instead of parsing and type checking modules that won't often change from dependencies we can load up the fully type checked module from the file system.

What is the current alternative and why is it not good enough?

The current state is such that the compiler must parse and type check every module on every invocation of the compiler. In the future as projects grow this should help reduce the time it takes to compile entire projects.