Crystal 0.32.0 has been released!

We’ve written a blog post summarizing the changes in this release: https://crystal-lang.org/2019/12/11/crystal-0.32.0-released.html

The full changelog is here: https://github.com/crystal-lang/crystal/releases/tag/0.32.0

All the usual installation methods still apply: https://crystal-lang.org/install/ (but the installation pages are new!)

Docker images (now based on bionic) and 64 bits Linux packages are available as usual.

The brew formula PR is in https://github.com/Homebrew/homebrew-core/pull/47747

6 Likes

Awesome post, I love reading them :stuck_out_tongue:

I have a recommendation for the website though. Given:


It’s very hard to follow where the text/code starts and ends.

I’d suggest doing something like github:


The use of a slightly grey background color behind the code make it stand out on a white page and is way easier to read!

3 Likes

Awesome, thanks to all who worked on this! I’ve updated a personal project of mine. Seems to work…

However, I was wondering how to specify crystal-db version 0.8.0? In my shard.yml file I previously had 0.7.0 and tried changing it to 0.8.0:

dependencies:
  db:
    github: crystal-lang/crystal-db
    version: "~> 0.8.0"

When I run shards install though I get this:

Fetching https://github.com/crystal-lang/crystal-db.git
Error resolving db (~> 0.8.0, ~> 0.7.0)

You need to run shards update.

Ah okay, thanks.

It still didn’t work for me, however, I think it’s because crystal-pg still referrs to 0.7.0:

Do you use crystal-pg only in your project, or also another like crystal-mysql? If you use crystal-pg only, keep only crystal-pg in your dependencies and remove crystal-db (crystal-pg has it’s own dependency to crystal-db).

I have problem with Crystal::Doc::Markdown.to_html() method in 0.32 - it ends up with this compile error:

...
In /snap/crystal/212/share/crystal/src/compiler/crystal/tools/doc/markdown/parser.cr:26:7

 26 | render_header 1, line, 2
      ^------------
Error: instantiating 'render_header(Int32, String, Int32)'


In /snap/crystal/212/share/crystal/src/compiler/crystal/tools/doc/markdown/parser.cr:118:15

 118 | @renderer.begin_header level, anchor
                 ^-----------
Error: instantiating 'Crystal::Doc::Markdown::Renderer#begin_header(Int32, String)'


In /snap/crystal/212/share/crystal/src/compiler/crystal/tools/doc/markdown/html_renderer.cr:35:25

 35 | @io << Crystal::Doc.anchor_link(anchor)
                          ^----------
Error: undefined method 'anchor_link' for Crystal::Doc:Module

Crystal::Doc:Module trace:

  /snap/crystal/212/share/crystal/src/compiler/crystal/tools/doc/markdown/html_renderer.cr:35

        @io << Crystal::Doc.anchor_link(anchor)

Thanks!

Yes @ejstembler, there is a PR for that already https://github.com/will/crystal-pg/pull/197.

Since db drivers use ~> 0.x.y that means a >= 0.x.y and < 0.(x+1).0. I prefer striker dependencies. That force some burden to re-release sometimes unmodified version with a bump of dependencies. But I is a way to know they are slightly up to date, maintained, and avoid surprised due to breaking-changes.

3 Likes

Don’t use that, it’s private API. GitHub - icyleaf/markd: Yet another markdown parser, Compliant to CommonMark specification, written in Crystal.