Dfx 0.11.2 is promoted

Release Notes | Internet Computer Home

Summary

  • Patch release for frontend canister (also known as asset canister or certified assets canister) code.
  • Recent updates to the asset canister that came as part of dfx 0.11.1 release introduced two unwanted behaviors to asset canister code, and we’re disabling both of them with this release:
    1. redirection of all HTTP traffic from .raw.ic0.app to .ic0.app
      • HTTP traffic redirection will find its way into dfx in the form of per-asset configurable redirects in the upcoming dfx release
    2. support for ETag HTTP header (a mechanism to aid cache validation).
      • ETag's will be back once we add more code to icx-proxy`

I know those two issues broke workflows for some people, for which I’m sorry, as this slipped through the release review process I was conducting. We will be implementing measures to make sure this never happens again.

Happy building!

5 Likes

Arf, you still cannot use dfx deploy with Gzipped wasm :confused:
(When the path to the wasm.gz is specified in dfx.json)

Sticking with version 0.10.1 then, but thanks for the hard work ! Maybe in version 0.12 :crossed_fingers: :slight_smile: :crossed_fingers:

1 Like

0.12.0 will support gzipped wasm :slight_smile:

3 Likes

There’s an open issues you can follow for this: dfx deploy with gzip · Issue #2357 · dfinity/sdk · GitHub. I’m looking forward to it as well :slight_smile:

2 Likes

Does this have the latest motoko updates demoed in the Global R&D?

Features presented at yesterday’s Global R&D are not part of 0.11.2 release. 0.11.2 is only a patch release to frontend canister code (wasm), there were no other changes in comparison to 0.11.1.

Looks like some of the features from yesterday GR&D are part of Release 0.7.0 · dfinity/motoko · GitHub (tho I don’t know if that release includes all of the features presented). At the time of writing this message, master branch of dfx uses motoko 0.6.3, and I don’t know/can’t promise if 0.7.0 motoko will get included in next dfx minor release (0.12.0).

Nope, but you can manually download moc and put it in (if you are into patching or sufficiently desperate).

After upgrading to 0.11.2 dfx complained about duplicate asset keys. I removed the CopyPlugin() as described here and also deleted the /dist folder from my project. However, now my React application can’t find the asset files including the main.css anymore. What is the recommended way for adding static assets now with 0.11.2?

It’s difficult for me to say what’s the root cause in this case, perhaps you can share the content of your: dfx.json, package.json, webpack.config.js?

The recommended way of adding static assets has not changed – when you issue dfx new xyz, the directory for frontend project will contain src/xyz_frontend/src and src/xyz_frontend/assets. Webpack config file is set up in way which will bundle the content of src/xyz_frontend/src into /dist directory. Afterwards, when you dfx deploy your canister, dfx will upload all files in directories listed under the key canisters.xyz_frontend.source in dfx.json file.

1 Like

Thanks for your answer! I created a new project with dfx new <projectname> and compared the webpack.config.js. The following line was missing in the config of my old project: static: path.resolve(__dirname, "src", frontendDirectory, "assets"). Added it in and now it’s working again.

2 Likes

glad to hear you’ve figured it out!