I want to open github as usual and found that my favorite programming language elixir has released a new version. I downloaded and installed it immediately. I didn't expect a bunch of errors when I ran the company's project.
1
The first thing to see is:
warning: ^^^ is deprecated. It is typically used as xor but it has the wrong precedence, use Bitwise.bxor/2 instead
Checked the Changelog, it turns out that this function has been eliminated, just change it Bitwise.bxor/2
2
Then elixir 1.12 version fixes a bug about behavior. Previously, if the implementation function of a callback was not marked @impl true
, there would be no warning. Will report now:
warning: module attribute @impl was not set for function xxx/2 callback (specified in XXX). This either means you forgot to add the "@impl true" annotation before the definition or that you are accidentally overriding this callback
We just add @impl true
the corresponding function.
3
The last is the change of format. In version 1.12, it is no longer allowed to include newlines in string escapes, for example
"abc#{
d
}e"
It is qualified in the old version, but in the new version it will be forced to format as:
"abc#{d}e"
end
In this way, a pleasant upgrade is complete.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。