guardian icon indicating copy to clipboard operation
guardian copied to clipboard

Brew install fails on latest crystal version

Open dbackeus opened this issue 6 years ago • 6 comments

Needs a new release with support for latest crystal as well as a version bump at https://github.com/f/homebrew-guardian

Currently brew install guardian is failing.

dbackeus avatar Aug 30 '18 13:08 dbackeus

Same here. But build from source was success. (crystal build in git cloned directory)

For your reference, here is my 'build failed' message:

==> crystal build --release src/guardian.cr
Last 15 lines from /Users/aoshi/Library/Logs/Homebrew/guardian/01.crystal:

      @watchers.each do |watcher|
                ^~~~

in src/guardian/watcher.cr:58: instantiating 'file_creation_date(String)'

            @timestamps[file] = file_creation_date(file)
                                ^~~~~~~~~~~~~~~~~~

in src/guardian/watcher.cr:46: undefined method 'stat' for File.class

      File.stat(file).mtime.to_s("%Y%m%d%H%M%S")

And my crystal version:

$ crystal version
Crystal 0.26.1 (2018-08-27)

LLVM: 6.0.1

Default target: x86_64-apple-macosx

arsley avatar Sep 08 '18 06:09 arsley

I fixed this in my fork of guardian (https://github.com/f1reflyyyylmao/guardian). @f Feel free to cherry pick the change from my fork :)

f1reflyyyylmao avatar Oct 16 '18 15:10 f1reflyyyylmao

Maybe opening a pull request would make things easier for the devs?

dbackeus avatar Oct 17 '18 07:10 dbackeus

Now lets see if @f is still around to merge

f1reflyyyylmao avatar Oct 17 '18 10:10 f1reflyyyylmao

Merged in 3 minutes.

f avatar Oct 17 '18 10:10 f

Well done guys!

As soon as the brew formula is updated to version 0.0.5 we should be good to go.

Maybe worth adding a HEAD install option to brew as well to be able to try these kind of fixes out before officially releasing a new version.

dbackeus avatar Oct 17 '18 13:10 dbackeus