Wow, that’s one hell of a release! The future looks bright!
Thanks everyone working on this huge release and kudos to the core team. In this uncertain time following Crystal development makes me less stressed out and more optimistic.
I found out the hard way that: crystal file.cr --release
no longer builds and runs an optimized file, and is now equivalent to just crystal file.cr
I had to decipher this release note to figure out what had changed.
**(breaking-change)** Improve compiler single-file run syntax to make it shebang-friendly#!` . (#9171, thanks @RX14)
This is so cryptic to a user, and doesn’t tell users what needs to be done to get equivalent old behavior.
A much better non-cryptic message would be something like this:
(breaking-change) For equivalent behavior of formerly: crystal file.cr --release
to build and run optimized code, must now do: crystal run file.cr --release
This is clear, and tell users exactly what they must do to replace old scripts, and not the (unnecessary) discussion of why this change was made.
I had to decipher this release note to figure out what had changed.
Did you read the blog post literally linked in the first line of the forum post?
Looks pretty clear to me:
We are making a breaking-change in the compiler CLI to make it more comfortable for shebang #! scripts. From now on when running the compiler with a file argument instead of a command like crystal path/to/file.cr arg1 arg2 the file will be compiled, and then executed with the arguments. This means the arguments affect only the program to run and not the compiler.
If you need to use compile flags and want to execute the program with some arguments you can still use the run command: crystal run path/to/file.cr -Dcompiler_flag --release -- arg1 arg2 . The -- will split compiler options from program options. Read more at #9171.
Another breaking-change use for some shell integrations is that crystal env will now quote the values. This means it’s safe to eval "$(crystal env)" . The crystal env VARIABLE is still the same. Read more at #9428
It’s always exciting to get a new release! Well done everyone.
I must say crystal has become one of my favorite languages. It’s been a breath of fresh air for me.
Even though it’s clear in the blog post, it should be even more clear in the Changelog because not everyone will read the blog post.
Sure, not arguing with that and this is not what I meant.
Just replying to the sentence “I had to decipher this release note to figure out what had changed.” by pointing out that it was not necessary since there is a place where it is well explained.
I agree @jzakiya. I will try to have in mind that on the next changelog.
I found it hard to be concise of all the information needed since that depends on how the tools/std-lib are used. Doing in an exhaustive description is not feasible. Balancing between what is lost and what is new is again, hard.
To me this is also part of a bigger story to summarize the changes between releases. Sometimes the PR title and openning comment got really outdated from the final state of the PR. Having that will help a lot to the whole process.
I just want to add that this dialogue is great! Having users making suggestions and core team listening with an open mind is what a healthy community is all about. Props to everyone!