Fail to compile in path with whitespace
The bug happens in any OS. I'm using crystal version 1.12.1, installed on a Mac via homebrewer.
My project is in a folder whose path is like this:
~/Library/Mobile Documents/com~apple~CloudDocs/Projects/mgq-private-eye/crystaleye
(it contains a whitespace).
By issuing:
crystal build --no-debug --release -o bin/crystal-eye src/cli.cr
it fails with:
find: /Users/alan/Library/Mobile: No such file or directory
find: Documents/com~apple~CloudDocs/Projects/mgq-private-eye/crystaleye/src: No such file or directory
I tried crystal build --no-debug --release -o bin/crystal-eye "$PWD/src/cli.cr" and gave the same error.
If I move my project to folder without whitespace in its path it works fine.
The error message looks like it's coming from the find command. I'm not aware we're using this anywhere in the compiler. So the error must be coming from somewhere else.
Maybe some macro code calling find. But I figure that should leave more debug output indicating it's from a macro call...
Could you run crystal build with --status to see where we're at in the process? And dtrace or whatever tool on macOS to log system calls? Maybe that could help identify where this issue is coming from.
Sorry, dtrace will require to compile from source crystal, which is a bit beyond me.
I can't find --status option in crystal, this is not working for example:
crystal build --status --no-debug --release -o bin/crystal-eye src/cli.cr
Ooops, I mean --stats. Sorry.
I don't know macOS, but there must surely be a means to trace syscalls without recompiling the executable. Maybe someone else has a suggestion?