Compile single file with damlc?

Is it possible to compile a single file with daml damlc, rather than the entire project defined in daml.yaml?

I want to do this because I’ve made a large refactoring change that prevents many files from compiling.

You can change your source line in daml.yaml to point to a single file, e.g.:

source: daml/Main.daml

Then daml build will try compiling that file (and any other files it depends on), instead of the whole folder.

2 Likes