invidious icon indicating copy to clipboard operation
invidious copied to clipboard

[Enhancement] Support crystal 1.8.x

Open tiekoetter opened this issue 2 years ago • 7 comments

We should add the support for crystal 1.8.x


Describe the bug

Done checking player dependencies, now compiling Invidious...
In src/invidious/views/search_homepage.ecr:7:4

 7 | <% end %>
        ^
Error: expecting token 'EOF', not 'end'

After trying to compile Invidious I get this error message. I have tried deleting and cloning the repository again but it still shows this error.

Steps to Reproduce

  1. Compile Invidious shards install --production && crystal build src/invidious.cr --release

Additional context

  • OS: Debian 11

tiekoetter avatar Jun 12 '23 11:06 tiekoetter

Did you try using a previous crystal version? 1.4 for example

unixfox avatar Jun 12 '23 12:06 unixfox

Thank you @unixfox!

I switched to a local install of crystal and am now using version 1.4.1

tiekoetter avatar Jun 12 '23 13:06 tiekoetter

I am currently using Crystal 1.8.2 to compile Invidious (latest master at the time of speaking) on Debian 12 and it works without problems (I did have to clear the cache after upgrading Debian but that was due to a libssl version change). I am using Crystal's OBS package (from https://download.opensuse.org/repositories/devel:/languages:/crystal/Debian_11)

$ crystal -v
Crystal 1.8.2 [7aa5cdd86] (2023-05-09)

LLVM: 15.0.7
Default target: x86_64-unknown-linux-gnu
$ shards install --production && crystal build -s --no-debug --release -o

I don't get any compile-time errors and Invidious itself runs and works without issues.

markozajc avatar Jun 13 '23 21:06 markozajc

Thank you for the heads-up @markozajc, you made me realized that crystal 1.8.x was working fine for me too.

@tiekoetter what was the crystal version that you were using?

unixfox avatar Jun 14 '23 07:06 unixfox

I got the exact same error. I am on Fedora 37 using crystal 1.8.2

$ crystal version
Crystal 1.8.2 [7aa5cdd86] (2023-05-09)

LLVM: 15.0.7
Default target: x86_64-unknown-linux-gnu

Worked around by removing crystal and reinstalling version 1.7

curl -fsSL https://crystal-lang.org/install.sh | sudo bash -s -- --channel=stable --version=1.7

OrvilleRed avatar Jun 25 '23 02:06 OrvilleRed

I just ran into this error after upgrading crystal (1.8.2-1+5.1 -> 1.8.2-1+5.3 from the Debian_Testing repository on OBS). Turns out removing ~/.cache/{crystal,shards} fixes it, but I don't know what exactly causes it.

markozajc avatar Jun 25 '23 13:06 markozajc

Confirmed, moving back up to crystal-1.8.2 and recompiling Invidious worked just fine after deleting ~/.cache/{crystal,shards}

Maybe just adding this cache cleaning to the make distclean target is a decent-enough solution?

OrvilleRed avatar Jun 25 '23 23:06 OrvilleRed

I just ran into this error after upgrading crystal (1.8.2-1+5.1 -> 1.8.2-1+5.3 from the Debian_Testing repository on OBS). Turns out removing ~/.cache/{crystal,shards} fixes it, but I don't know what exactly causes it.

As long as cleaning the cache fixes it, I won't bother looking into that much. If you want to look at it nonetheless, I recommend to share your findings with the peeps at https://github.com/crystal-lang/crystal/. This problem is likely unrelated to invidious.

SamantazFox avatar Jul 14 '23 15:07 SamantazFox