anoma / juvix

A language for intent-centric and declarative decentralised applications
https://docs.juvix.org
GNU General Public License v3.0
442 stars 54 forks source link

The "Compiling" message should only be displayed for modules that are actually compiled #2797

Open lukaszcz opened 4 weeks ago

lukaszcz commented 4 weeks ago

Now we always display "[X of N] Compiling Module.juvix", including for all modules in the standard library, even if the module is only read from disk and deserialized. I think this message should be displayed only for modules that are actually re-compiled and not only read from disk. Otherwise, it's confusing and there is too much visual garbage every time you compile something.

Alternatively, we could use a different message for modules which are only read from disk, e.g., "Loading Module.juvix from disk". But I would advocate to remove the message entirely for modules that are not re-compiled.

Agreed

janmasrovira commented 4 weeks ago

I am leaning towards having the Loading message. I think it gives relevant feedback as loading from the file system does not take a negligible amount of time. Moreover, once we have optimized the files that we need to load, it'll become less noisy.

lukaszcz commented 4 weeks ago

I am leaning towards having the Loading message. I think it gives relevant feedback as loading from the file system does not take a negligible amount of time. Moreover, once we have optimized the files that we need to load, it'll become less noisy.

Okay, makes sense. But I think there should be a difference in feedback between "compiling" and "loading".

lukaszcz commented 3 weeks ago

There should also be a --quiet option which just turns off all the progress messages.

This actually annoys me most in the VSCode plugin, where every time I click "typecheck" I get a screen of "Compiling" messages. I think in VSCode it should just say the file type-checked or display the error.

lukaszcz commented 2 weeks ago

Perhaps a good trade-off would be to display "Compiling juvix-stdlib..." for the whole standard library (without displaying messages for each file) and so on, one message for each external package, but display "Compiling/Loading" for each file in the current package. I think the user doesn't care which particular file is being compiled/loaded in some external package (only cares about the package as a whole), but cares more about their own files. This would reduce the clutter without compromising too much on the feedback.

paulcadman commented 2 weeks ago

We agreed to rename the --only-errors flag to --quiet.