Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with last version of Crystal (Version 0.35.0) #1235

Closed
DaarkMoon opened this issue Jun 13, 2020 · 5 comments
Closed

Build fails with last version of Crystal (Version 0.35.0) #1235

DaarkMoon opened this issue Jun 13, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@DaarkMoon
Copy link

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)

@Perflyst Perflyst added the bug Something isn't working label Jun 14, 2020
@Perflyst
Copy link
Contributor

Feel free to submit a pull request

@Vertux
Copy link

Vertux commented Jun 14, 2020

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

@omarroth
Copy link
Contributor

Should be fixed with d30a972.

@idanoo
Copy link

idanoo commented Jun 16, 2020

Great timing.. I was just attempting to install it.

Confirmed build is fixed - latest commit builds with no errors!

@m4teh
Copy link

m4teh commented Jun 16, 2020

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:

  • Did you remember to run shards install?
  • Did you make sure you're running the compiler in the same directory as your shard.yml?
    ERROR: Service 'invidious' failed to build: The command '/bin/sh -c crystal build ./src/invidious.cr --static --warnings all --error-on-warnings --link-flags "-lxml2 -llzma"' returned a non-zero code: 1

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants