Release Notes for V0.4.9

Happy Friday, community!

V0.4.9 is now available for download! :tada:

What’s new?

  • New dfx cache commands enable you to check the versions of dfx you have installed and in use.
    You can use the new dfx cache subcommands to manage the dfx version cache ( ~/.cache/dfinity/versions ) and perform operations such as delete a particular version from the cache or force installation from a version of dfx found in the cache. Previously, dfx version information could be misleading in that it did not distinguish between the currently installed version and the version used in your projects and was not being updated properly even if you removed dfx manually and cleared the cache by running the rm -rf ~/.cache/dfinity command.

  • dfx canister call command can invoke query method based on the IDL.
    The dfx canister query command will be deprecated, but can still be used in this release.

  • Support displaying variant return values.
    You can now define a Motoko method that returns variant type. For example:
    import R "mo:stdlib/"; actor { public func greet(name: Text) : async R.Result { return #ok("Hello, " # name # "!"); }; }; $ dfx canister call hello greet '("test")' (variant { 24860 = "Hello, test!" })

  • Tutorials have been updated to provide additional guidance to new developers and include more sample code.

Issues fixed in this release:

  • The previously-undocumented dfx ide command has been renamed dfx _language-service and included as a separate topic in the documentation.
    You should note that the dfx _language-service command is not intended to be entered manually in a terminal shell but to be invoked by an editor or integrated development environment that supports LSP.

  • Support added for unknown read response to dfx canister request-status commands.
    Previously, an error was provided when requesting status and the client did not process the message.

These updates are also available here: