Happy Friday, community!
V0.4.9 is now available for download!
What’s new?
-
New
dfx cache
commands enable you to check the versions ofdfx
you have installed and in use.
You can use the newdfx cache
subcommands to manage thedfx
version cache (~/.cache/dfinity/versions
) and perform operations such as delete a particular version from the cache or force installation from a version ofdfx
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 removeddfx
manually and cleared the cache by running therm -rf ~/.cache/dfinity
command. -
dfx canister call
command can invoke query method based on the IDL.
Thedfx 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/result.mo"; 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 renameddfx _language-service
and included as a separate topic in the documentation.
You should note that thedfx _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: https://sdk.dfinity.org/developers-guide/sdk-release-notes.html