Build fails when builded with the crystal version 0.35.0 (published on june 09th 2020). This version have some breaking change (see changelog).
I use last version of crystal provided by https://dist.crystal-lang.org/apt for debian (as required in README).
Issue seems to only come from this breaking change (see Files section of crystal 0.35.0 changelog).
(breaking-change) Move Flate, Gzip, Zip, Zlib to Compress.
This issue also affect the dependancy _kemal_ (but there is an correction)
here a patch that work on my system it's only support crystal 0.35.0. For support of 0.34.0 and 0.35.0 there is an interessing solution in kemal source code)
Feel free to submit a pull request
I just run into the same issue.
I did apply the patch from @DaarkMoon:
git apply crystal_0.35.0_suport.patch.txt
crystal_0.35.0_suport.patch.txt:10: trailing whitespace.
commit: 4d6fb0614f29aa02254913dc6ed69b0cb148fa81
warning: 1 line adds whitespace errors.
Then I have modified shard.yml :
kemal:
github: kemalcr/kemal
commit: 4d6fb0614f29aa02254913dc6ed69b0cb148fa81
into (because it is the current commit for v0.35.0)
kemal:
github: kemalcr/kemal
commit: a8c0f09b858162bd13c96663febef5527b322a32
So far so good, but if I run crystal build src/invidious.cr --release, I get these 10 warnings: output.txt
P.S.: It would be good to put that a little more prominent place, because you can easily overlook the last hidden part ( config/config.yml) like me ;-)
# Change 'kemal' here to a stronger password, and update `password` in config/config.yml
Should be fixed with d30a972a909e66d963ee953349fe045a1d9a41ee.
Great timing.. I was just attempting to install it.
Confirmed build is fixed - latest commit builds with no errors!
Can't get it to build using Docker on master.
Using protodec (0.1.3)
Using lsquic (0.1.9 at 5261034)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6869k 100 6869k 0 0 963k 0 0:00:07 0:00:07 --:--:-- 1330k
Removing intermediate container c8ecb51de833
---> 4f4246d38a9a
Step 6/20 : COPY ./src/ ./src/
---> a00f10964231
Step 7/20 : COPY ./.git/ ./.git/
---> 9a5a0f0feccd
Step 8/20 : RUN crystal build ./src/invidious.cr --static --warnings all --error-on-warnings --link-flags "-lxml2 -llzma"
---> Running in 902a211f06fc
Showing last frame. Use --error-trace for full trace.
In src/invidious.cr:26:1
26 | require "compress/zip"
^
Error: can't find file 'compress/zip'
If you're trying to require a shard:
shards install?
Most helpful comment
Great timing.. I was just attempting to install it.
Confirmed build is fixed - latest commit builds with no errors!