This requires crystal-lang/crystal#4614 to properly show the error messages from macro run.
But the next Crystal release 0.24 should arrive shortly.
Output looks like this:
Error in line 1: while requiring "./failing-test.cr"
in failing-test.cr:10: expanding macro
BakedFileSystem.load("./invalid_path", __DIR__)
^~~~
in src/baked_file_system.cr:102: Error executing run (exit code: 1): ./loader "./invalid_path" "/test/crystal/baked_file_system"
stderr:
directory /test/crystal/baked_file_system/invalid_path does not exist (Exception)
from ???
from ???
from __crystal_main
from main
from __libc_start_main
from ???
from ???
source = {{ run("./loader", path, source).stringify }}
Closes #4
This requires crystal-lang/crystal#4614 to properly show the error messages from macro run. But the next Crystal release 0.24 should arrive shortly.
Output looks like this: