Closed factyy closed 3 years ago
The fix should be merged, however given that there hasn't been a fresh release of Amber since June I expect that you'll need to use the main branch version to get things to work.
Sadly I have to confirm that this problem exists with an up-to-day amber (master
branch).
I've patched the description
Oh, wow. Thanks for posting more info. I had tried to install Amber a few days ago and assumed it was a fairly simple issue.
Looks like there will need to be some deeper fixes in Amber to bring it up to date with the latest breaking changes. So, for a solution for you I would suggest: either roll back to an older version of Crystal or I'm sure the Amber project would love to have someone tackling these issues.
Currently I decided to stick with 0.35.1
but hopefully I will be able to help with such issues in the foreseeable future :)
Released Amber 0.36.0 to support Crystal 0.36.x
I'm getting this on a project created with v0.35.1 while trying amber w
with a newly compiled v0.36.0
[renich@introdesk rafita]$ amber -v
Amber CLI (amberframework.org) - v0.36.0
[renich@introdesk rafita]$ amber w
11:13:54 watch.run (Info) Building...
2021-02-22T17:13:54.330479Z INFO - watch.run: Building...
Showing last frame. Use --error-trace for full trace.
In lib/amber/src/amber/router/session/cookie_store.cr:41:3
41 | class CookieStore < AbstractStore
^
Error: abstract `def Amber::Router::Session::AbstractStore#update(other_hash)` must be implemented by Amber::Router::Session::CookieStore
2021-02-22T17:13:55.910551Z INFO - watch.run: Compile time errors detected, exiting...
11:13:55 watch.run (Info) Compile time errors detected, exiting...
OK, the fix was kind of easy. I just deleted lib/*
, updated shards.yml
to the ones currently used and ran shards install
again. After that, it worked.
Description
Amber fails to build an empty app using crystal
0.36.x
Reproducing both in host and docker environments (the following description is for a docker one)Steps to Reproduce
docker pull crystallang/crystal:0.36.0
and create a container from it;amber w
Expected behavior: Amber app starts
Actual behavior: Amber app fails to build:
Reproduces how often: 100% reproduction with crystal
0.36.0
and0.36.1
Versions
Crystal 0.36.0 [1e6f96aef] (2021-01-26)
LLVM: 10.0.0 Default target: x86_64-unknown-linux-gnu
Amber CLI (amberframework.org) - v0.35.0
Additional Information
I'm entirely new to crystal but it looks like a method with type constraints doesn't override the most generic one in the base class via inheritance. This particular error can be fixed by adding (to the base class) or removing (from
CookieStore
) type constraints from the method signature. But there are lots of errors like this in the generated code base, so it looks like it is not possible to eliminate all of them by hand without breaking something in the framework (touching the framework by hand is a pretty bad idea itself).