Release Notes for V0.5.7

Happy Monday, community!

We are super excited to announce the release of SDK V0.5.7! :tada:

:gift: What’s new?

The 0.5.7 release includes the following new features and capabilities:

  • Motoko and the JavaScript library now support floating point numbers (Float).
  • When using the Candid UI, you can view return values in text, UI, and JSON formats.
    You can switch between the formats for representing values by clicking the results bar.
  • Internal updates that are not yet user-visible to support future features.

:rotating_light: Breaking change

The 0.5.7 release includes the following changes that might require updates to existing programs:

  • The name of the built-in Motoko library has changed from stdlib to base .
  • All of the module names in the base library start with an upper case letter.
  • The principalId module has been changed to Principal .

Modifying existing programs

If you have programs that rely on modules in the stdlib library, you must change the import statement to use the new base library name. For example, you might have previously imported the Array module using the following statement:

import Array "mo:stdlib/array";

With this release, you would change the statement like this:

import Array "mo:base/Array";

Addressing case-sensitivity

If your local development environment runs on macOS, you might be able to build your Motoko program using a lower case module name because the macOS file system is not case-sensitive by default.

If you use lower case module names, however, the same code will not compile on Linux computers. Therefore, the recommended best practice is to always capitalize module names. For example, use import Array "mo:base/Array" , not import Array "mo:base/array".

:hammer_and_wrench: Fixes

The 0.5.7 release includes internal fixes and improvements to the Candid user interface, the interface description library, and some refactoring of dfx commands.

Cheers! :nerd_face: