Hi
This is a minor Quality of Life thing and I understand if it cannot be taken on any priority.
When i compile my code, there is no indication to me, of the progress or whats going on under the hood.
while it is ok for small snippets which are compiled in a couple of seconds, it gets irritating for larger programs.
Since this is a scenario we face all the time while coding in crystal, it will be nice if we have a small progress bar and indications on what is the compiler doing.
For example;
$ crystal build MyProj.cr
================......................... 70% done
Pending 12 Tasks.
Build Started....
<doing task 1> ... Done!
<doing task 2> ... Done!
<doing task 3> ... Current!
Great idea , it can show all files being compiled or something and do a file x from y files total is compiled right now
We could, but we have no indication of when things are going to be finished. For example with --release you'll see the progress stuck at the LLVM phase (bitcode generation, optimization, compilation) for a long time. For example the phase takes 20 minutes to compile Crystal in release mode with LLVM 4.0 on my laptop.
You'll may want to add --stats to your command.
However, in non-release mode it would be perfectly possible to show the progress of the codegen phase as each module is codegened seperately in parallel. I don't think it would be possible to show progress in other phases, or even to show a non-useless progress bar, however a simple status indicator should be very possible. It would simply show the current stage of the compiler ([12/14] Codegen (crystal)), and in the llvm phase, the number of modules codegened out of the total ([13/14] Codegen (llvm) 15/150 modules).
We even have a lot of the code that this feature would need there already in the form of the stats tracker.
since the goal is to make the dev work easier, i think even if we add it for non-release modes, it will be great. Even for parts for which we have no control over, we can still list them like;
Generating Code .......... Done!
Generating LLVM IR .......... Done!
Linking Objects .......... Current!
I've developed a PoC compilation progress indicator:

As you can see it's a bit buggy (it's currently a singleton so it breaks on macro runs), but I can flesh it out a bit more later.
This is more or less implemented with --progress
Most helpful comment
I've developed a PoC compilation progress indicator:
As you can see it's a bit buggy (it's currently a singleton so it breaks on macro runs), but I can flesh it out a bit more later.