Git Product home page Git Product logo

Comments (12)

straight-shoota avatar straight-shoota commented on June 10, 2024 2

The base issue is the same as #366 though: SeverityYamlConverter.from_yaml returns Severity? and that value is assigned to a variable of type Severity.
This worked before only because the Nil type was silently ignored (an actual nil value would've caused a runtime exception).

This error now appears since crystal-lang/crystal#13433 regardless of the fix in #366 because it affects a different location.
For some reason this code path was previously not touched by the changes to JSON::Serializable in 1.8.x.

To resolve this, the return type of SeverityYamlConverter.from_yaml needs to be assignable to the instance variable. It's probably best to drop the Nil type and raise directly in the converter.

from ameba.

Sija avatar Sija commented on June 10, 2024 1

Most likely a duplicate of #366

@mamantoha Could you please check if the version from master works for you?

from ameba.

zw963 avatar zw963 commented on June 10, 2024 1

Test on 1.5.0, it works, thank you!

from ameba.

straight-shoota avatar straight-shoota commented on June 10, 2024

Yes, this is literally the same error message as #371. It should not only appear with Crystal nightly but since 1.8.0.

from ameba.

Sija avatar Sija commented on June 10, 2024

@straight-shoota There's no error for Crystal 1.8.2.

from ameba.

Sija avatar Sija commented on June 10, 2024

@straight-shoota Also, the #366 fixed the type in the specs, and not in the main application code.

from ameba.

mamantoha avatar mamantoha commented on June 10, 2024

@Sija @straight-shoota I checked this on master.

No issue on Crystal 1.8.1

Crystal 1.8.1 [a59a3dbd7] (2023-04-20)

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

Additionally, I updated the Crystal snap from the edge channel and the error no longer appears.

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

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

from ameba.

Sija avatar Sija commented on June 10, 2024

Interesting... perhaps an edge-case regression?

from ameba.

mamantoha avatar mamantoha commented on June 10, 2024

Perhaps. If the issue reappears, I will reopen the ticket.

from ameba.

Sija avatar Sija commented on June 10, 2024

@straight-shoota The issue still persists with Crystal 1.9.0-dev, so sth seems broken there...

from ameba.

mamantoha avatar mamantoha commented on June 10, 2024

I have confirmed the issue on the Crystal master branch by testing it with CRYSTAL_PATH. Setting the CRYSTAL_PATH to /path/to/crystal/src:lib and running crystal spec resulted in the same error as described in the ticket.

from ameba.

Sija avatar Sija commented on June 10, 2024

@mamantoha Could you try ameba's master branch?

from ameba.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.