From 1841d3a70f44712626f9e508522aa3840d84dd12 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:36:26 +0000 Subject: [PATCH 01/27] chore(deps): Bump micromatch from 4.0.5 to 4.0.8 in /doc/docusaurus (#4671) Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
Changelog

Sourced from micromatch's changelog.

[4.0.8] - 2024-08-22

[4.0.7] - 2024-05-22

[4.0.6] - 2024-05-21

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=micromatch&package-manager=npm_and_yarn&previous-version=4.0.5&new-version=4.0.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/dfinity/motoko/network/alerts).
--- doc/docusaurus/package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/docusaurus/package-lock.json b/doc/docusaurus/package-lock.json index 75e2825e14c..ea15f1ad056 100644 --- a/doc/docusaurus/package-lock.json +++ b/doc/docusaurus/package-lock.json @@ -8994,11 +8994,11 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -20241,11 +20241,11 @@ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" }, "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "requires": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" } }, From bbffe06d37e0eb04156e27177fb2bb82f660f724 Mon Sep 17 00:00:00 2001 From: DFINITY bot <58022693+dfinity-bot@users.noreply.github.com> Date: Tue, 27 Aug 2024 02:15:47 +0200 Subject: [PATCH 02/27] niv ic-hs: update e727feca -> a5f89cf5 (#4672) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Changelog for ic-hs: Branch: master Commits: [dfinity/ic-hs@e727feca...a5f89cf5](https://github.com/dfinity/ic-hs/compare/e727fecab6bad1401a65a50773637e46b8a14e0e...a5f89cf508b0c80b633e3f0c152e3406fb750189) * [`99efc33f`](https://github.com/dfinity/ic-hs/commit/99efc33f910fda44018c0680f7c678dbfa2df06a) sync node height before making an update call in compliance tests ([dfinity/ic-hs⁠#213](https://togithub.com/dfinity/ic-hs/issues/213)) * [`4bdf6c35`](https://github.com/dfinity/ic-hs/commit/4bdf6c35091d573feb31678012acb0ea104359a9) sync node height before getStateCert ([dfinity/ic-hs⁠#214](https://togithub.com/dfinity/ic-hs/issues/214)) * [`f718f74d`](https://github.com/dfinity/ic-hs/commit/f718f74dc2c4bc9a13d45c6b9cff853684c0e2b2) retry on http status of 429 ([dfinity/ic-hs⁠#215](https://togithub.com/dfinity/ic-hs/issues/215)) * [`a5f89cf5`](https://github.com/dfinity/ic-hs/commit/a5f89cf508b0c80b633e3f0c152e3406fb750189) add note that DFINITY stopped contributing ([dfinity/ic-hs⁠#216](https://togithub.com/dfinity/ic-hs/issues/216)) --- nix/sources.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index 904667a283f..230e0c106e5 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -39,10 +39,10 @@ "homepage": "", "owner": "dfinity", "repo": "ic-hs", - "rev": "e727fecab6bad1401a65a50773637e46b8a14e0e", - "sha256": "183xcavjkfsa2hgx9s67qxg7hfykykmw0wbzd4458rkiqb164wmc", + "rev": "a5f89cf508b0c80b633e3f0c152e3406fb750189", + "sha256": "0sjj272ch14309h3n3cxq6g7jkdhhqmdjrjdg67w1xxk4k1s1sfn", "type": "tarball", - "url": "https://github.com/dfinity/ic-hs/archive/e727fecab6bad1401a65a50773637e46b8a14e0e.tar.gz", + "url": "https://github.com/dfinity/ic-hs/archive/a5f89cf508b0c80b633e3f0c152e3406fb750189.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "ic-wasm": { From de582b3aecf4d475d4603c620bdca83540d42889 Mon Sep 17 00:00:00 2001 From: DFINITY bot <58022693+dfinity-bot@users.noreply.github.com> Date: Tue, 27 Aug 2024 02:26:14 +0200 Subject: [PATCH 03/27] niv motoko-base: update dfabfc32 -> 4abc98e9 (#4673) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Changelog for motoko-base: Branch: next-moc Commits: [dfinity/motoko-base@dfabfc32...4abc98e9](https://github.com/dfinity/motoko-base/compare/dfabfc3201950263a0057f5d1a78d2ede5c87478...4abc98e92909d7b178629912057473302cf0d8be) * [`e4d32622`](https://github.com/dfinity/motoko-base/commit/e4d326221fc1ecb253b9b793c3de6417e42865b1) Code Refactoring: Curate More Unused Declarations ([dfinity/motoko-base⁠#636](https://togithub.com/dfinity/motoko-base/issues/636)) * [`999b5374`](https://github.com/dfinity/motoko-base/commit/999b5374bfec8d50c9c980ce771871c9a581d75e) Motoko 0.11.2 * [`fc9eb6a1`](https://github.com/dfinity/motoko-base/commit/fc9eb6a17e27c54071095fe715dcdb15ed08a4dd) chore(deps-dev): bump braces from 3.0.2 to 3.0.3 ([dfinity/motoko-base⁠#641](https://togithub.com/dfinity/motoko-base/issues/641)) * [`99ec65da`](https://github.com/dfinity/motoko-base/commit/99ec65da3eadb21bab1eab8755f70264a74b3890) chore(deps): bump express and mo-dev ([dfinity/motoko-base⁠#642](https://togithub.com/dfinity/motoko-base/issues/642)) * [`5a7884cd`](https://github.com/dfinity/motoko-base/commit/5a7884cde84fe29ad8771d6293ad7b06be83e85a) typo in `Float.mo` comment ([dfinity/motoko-base⁠#638](https://togithub.com/dfinity/motoko-base/issues/638)) * [`d38d7ded`](https://github.com/dfinity/motoko-base/commit/d38d7dedad8cd155353f6f105a402ea0a192427c) Motoko 0.11.3 * [`10a04245`](https://github.com/dfinity/motoko-base/commit/10a042454caa414241296fffa2624dc1862b22df) Motoko 0.12.0 * [`99926e86`](https://github.com/dfinity/motoko-base/commit/99926e86ba6e5706b4a27601955b327b612cb752) Fix link in `ExperimentalInternetComputer.mo` ([dfinity/motoko-base⁠#648](https://togithub.com/dfinity/motoko-base/issues/648)) * [`cf195379`](https://github.com/dfinity/motoko-base/commit/cf195379127156f865866b1d2986df028158bac0) Add Iter.concat function ([dfinity/motoko-base⁠#650](https://togithub.com/dfinity/motoko-base/issues/650)) * [`df62203b`](https://github.com/dfinity/motoko-base/commit/df62203b8cfebfa01375907cb5a0dd18d9f466e2) Motoko 0.12.1 --- nix/sources.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index 230e0c106e5..5bccf5519bf 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -75,10 +75,10 @@ "homepage": "", "owner": "dfinity", "repo": "motoko-base", - "rev": "dfabfc3201950263a0057f5d1a78d2ede5c87478", - "sha256": "1wd9rcmhg82h08l3gz3gmn2xpgalvf679w7yz2g35yzbg2b5g2fd", + "rev": "4abc98e92909d7b178629912057473302cf0d8be", + "sha256": "09yhfk17rb9xk2cvi6353hfb43df05pg0x1gw5qrf8n0g0dvd3jx", "type": "tarball", - "url": "https://github.com/dfinity/motoko-base/archive/dfabfc3201950263a0057f5d1a78d2ede5c87478.tar.gz", + "url": "https://github.com/dfinity/motoko-base/archive/4abc98e92909d7b178629912057473302cf0d8be.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "motoko-matchers": { From 247aa056afe9d5499f9f79d78d6d38117b8478ae Mon Sep 17 00:00:00 2001 From: DFINITY bot <58022693+dfinity-bot@users.noreply.github.com> Date: Wed, 28 Aug 2024 02:23:22 +0200 Subject: [PATCH 04/27] niv candid: update cfa7b54c -> 0ed73c14 (#4675) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Changelog for candid: Branch: master Commits: [dfinity/candid@cfa7b54c...0ed73c14](https://github.com/dfinity/candid/compare/cfa7b54c2552fbaff0029c10d24fa37925e42b02...0ed73c1448a07d00a1aa2d21bb2bd92208afd81a) * [`0ed73c14`](https://github.com/dfinity/candid/commit/0ed73c1448a07d00a1aa2d21bb2bd92208afd81a) Add size hints in order to optimize allocation during deserialization ([dfinity/candid⁠#570](https://togithub.com/dfinity/candid/issues/570)) --- nix/sources.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index 5bccf5519bf..d5759592492 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -6,10 +6,10 @@ "homepage": "", "owner": "dfinity", "repo": "candid", - "rev": "cfa7b54c2552fbaff0029c10d24fa37925e42b02", - "sha256": "0a2pw2nncwflq0bm6gckbzpnwwgz6b97p4i2psqiy8mwbkf1j7w3", + "rev": "0ed73c1448a07d00a1aa2d21bb2bd92208afd81a", + "sha256": "1m22rc38vnv63py3yxs50jb5gp7fcq4ikpprjgr3f8qvzxfvp50a", "type": "tarball", - "url": "https://github.com/dfinity/candid/archive/cfa7b54c2552fbaff0029c10d24fa37925e42b02.tar.gz", + "url": "https://github.com/dfinity/candid/archive/0ed73c1448a07d00a1aa2d21bb2bd92208afd81a.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "esm": { From 1243628e1e9144b1d3fed9016cfcd377c4671d14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2024 22:30:10 +0000 Subject: [PATCH 05/27] chore(deps): Bump webpack from 5.89.0 to 5.94.0 in /doc/docusaurus (#4680) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [webpack](https://github.com/webpack/webpack) from 5.89.0 to 5.94.0.
Release notes

Sourced from webpack's releases.

v5.94.0

Bug Fixes

  • Added runtime condition for harmony reexport checked
  • Handle properly data/http/https protocols in source maps
  • Make bigint optimistic when browserslist not found
  • Move @​types/eslint-scope to dev deps
  • Related in asset stats is now always an array when no related found
  • Handle ASI for export declarations
  • Mangle destruction incorrect with export named default properly
  • Fixed unexpected asi generation with sequence expression
  • Fixed a lot of types

New Features

  • Added new external type "module-import"
  • Support webpackIgnore for new URL() construction
  • [CSS] @import pathinfo support

Security

  • Fixed DOM clobbering in auto public path

v5.93.0

Bug Fixes

  • Generate correct relative path to runtime chunks
  • Makes DefinePlugin quieter under default log level
  • Fixed mangle destructuring default in namespace import
  • Fixed consumption of eager shared modules for module federation
  • Strip slash for pretty regexp
  • Calculate correct contenthash for CSS generator options

New Features

  • Added the binary generator option for asset modules to explicitly keep source maps produced by loaders
  • Added the modern-module library value for tree shakable output
  • Added the overrideStrict option to override strict or non-strict mode for javascript modules

v5.92.1

Bug Fixes

  • Doesn't crash with an error when the css experiment is enabled and contenthash is used

v5.92.0

Bug Fixes

  • Correct tidle range's comutation for module federation
  • Consider runtime for pure expression dependency update hash
  • Return value in the subtractRuntime function for runtime logic

... (truncated)

Commits
  • eabf85d chore(release): 5.94.0
  • 955e057 security: fix DOM clobbering in auto public path
  • 9822387 test: fix
  • cbb86ed test: fix
  • 5ac3d7f fix: unexpected asi generation with sequence expression
  • 2411661 security: fix DOM clobbering in auto public path
  • b8c03d4 fix: unexpected asi generation with sequence expression
  • f46a03c revert: do not use heuristic fallback for "module-import"
  • 60f1898 fix: do not use heuristic fallback for "module-import"
  • 66306aa Revert "fix: module-import get fallback from externalsPresets"
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=webpack&package-manager=npm_and_yarn&previous-version=5.89.0&new-version=5.94.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/dfinity/motoko/network/alerts).
--- doc/docusaurus/package-lock.json | 354 ++++++++++++++----------------- 1 file changed, 158 insertions(+), 196 deletions(-) diff --git a/doc/docusaurus/package-lock.json b/doc/docusaurus/package-lock.json index ea15f1ad056..e33fd27a22b 100644 --- a/doc/docusaurus/package-lock.json +++ b/doc/docusaurus/package-lock.json @@ -3945,24 +3945,6 @@ "@types/node": "*" } }, - "node_modules/@types/eslint": { - "version": "8.4.5", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.5.tgz", - "integrity": "sha512-dhsC09y1gpJWnK+Ff4SGvCuSnk9DaU0BJZSzOwa6GVSg65XtTugLBITDAAzRU5duGBoXBHpdR/9jHGxJjNflJQ==", - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", - "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -4217,9 +4199,9 @@ "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==" }, "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "dependencies": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -4236,9 +4218,9 @@ "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==" }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==" + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==" }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.11.6", @@ -4256,14 +4238,14 @@ "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==" }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" + "@webassemblyjs/wasm-gen": "1.12.1" } }, "node_modules/@webassemblyjs/ieee754": { @@ -4288,26 +4270,26 @@ "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==" }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", "@webassemblyjs/leb128": "1.11.6", @@ -4315,22 +4297,22 @@ } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", @@ -4339,11 +4321,11 @@ } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" } }, @@ -6635,9 +6617,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -7580,9 +7562,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/gray-matter": { "version": "4.0.3", @@ -12264,9 +12246,9 @@ } }, "node_modules/terser": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.24.0.tgz", - "integrity": "sha512-ZpGR4Hy3+wBEzVEnHvstMvqpD/nABNelQn/z2r0fjVWGQsN3bpOLzQlqDxmb4CDZnXq5lpjnQ+mHQLAOpfM5iw==", + "version": "5.31.6", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.6.tgz", + "integrity": "sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==", "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -12281,15 +12263,15 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", - "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" + "terser": "^5.26.0" }, "engines": { "node": ">= 10.13.0" @@ -13146,9 +13128,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -13180,33 +13162,32 @@ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/webpack": { - "version": "5.89.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz", - "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", - "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", + "version": "5.94.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", + "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", + "dependencies": { + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", + "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "bin": { @@ -13427,9 +13408,9 @@ } }, "node_modules/webpack/node_modules/acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "bin": { "acorn": "bin/acorn" }, @@ -13437,10 +13418,10 @@ "node": ">=0.4.0" } }, - "node_modules/webpack/node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "node_modules/webpack/node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "peerDependencies": { "acorn": "^8" } @@ -16505,24 +16486,6 @@ "@types/node": "*" } }, - "@types/eslint": { - "version": "8.4.5", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.5.tgz", - "integrity": "sha512-dhsC09y1gpJWnK+Ff4SGvCuSnk9DaU0BJZSzOwa6GVSg65XtTugLBITDAAzRU5duGBoXBHpdR/9jHGxJjNflJQ==", - "requires": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "@types/eslint-scope": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", - "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", - "requires": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -16777,9 +16740,9 @@ "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==" }, "@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "requires": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -16796,9 +16759,9 @@ "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==" }, "@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==" + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==" }, "@webassemblyjs/helper-numbers": { "version": "1.11.6", @@ -16816,14 +16779,14 @@ "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==" }, "@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "requires": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" + "@webassemblyjs/wasm-gen": "1.12.1" } }, "@webassemblyjs/ieee754": { @@ -16848,26 +16811,26 @@ "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==" }, "@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "requires": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "requires": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", "@webassemblyjs/leb128": "1.11.6", @@ -16875,22 +16838,22 @@ } }, "@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "requires": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, "@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "requires": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", @@ -16899,11 +16862,11 @@ } }, "@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "requires": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" } }, @@ -18544,9 +18507,9 @@ } }, "enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "requires": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -19225,9 +19188,9 @@ } }, "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "gray-matter": { "version": "4.0.3", @@ -22557,9 +22520,9 @@ "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==" }, "terser": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.24.0.tgz", - "integrity": "sha512-ZpGR4Hy3+wBEzVEnHvstMvqpD/nABNelQn/z2r0fjVWGQsN3bpOLzQlqDxmb4CDZnXq5lpjnQ+mHQLAOpfM5iw==", + "version": "5.31.6", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.6.tgz", + "integrity": "sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==", "requires": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -22580,15 +22543,15 @@ } }, "terser-webpack-plugin": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", - "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "requires": { - "@jridgewell/trace-mapping": "^0.3.17", + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" + "terser": "^5.26.0" }, "dependencies": { "schema-utils": { @@ -23135,9 +23098,9 @@ } }, "watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", "requires": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -23162,45 +23125,44 @@ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "webpack": { - "version": "5.89.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz", - "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", - "requires": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", + "version": "5.94.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", + "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", + "requires": { + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", + "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "dependencies": { "acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==" + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==" }, - "acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "requires": {} }, "mime-db": { From adb31da874ef0f1ed0c12b15878134e07f9ba49d Mon Sep 17 00:00:00 2001 From: DFINITY bot <58022693+dfinity-bot@users.noreply.github.com> Date: Sat, 31 Aug 2024 02:22:01 +0200 Subject: [PATCH 06/27] niv candid: update 0ed73c14 -> 8c20762b (#4681) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Changelog for candid: Branch: master Commits: [dfinity/candid@0ed73c14...8c20762b](https://github.com/dfinity/candid/compare/0ed73c1448a07d00a1aa2d21bb2bd92208afd81a...8c20762b734316613792226fb247a2aabd8fb823) * [`8c20762b`](https://github.com/dfinity/candid/commit/8c20762b734316613792226fb247a2aabd8fb823) feat(didjs): skip asset certification in Candid UI canister ([dfinity/candid⁠#571](https://togithub.com/dfinity/candid/issues/571)) --- nix/sources.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index d5759592492..19872f58034 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -6,10 +6,10 @@ "homepage": "", "owner": "dfinity", "repo": "candid", - "rev": "0ed73c1448a07d00a1aa2d21bb2bd92208afd81a", - "sha256": "1m22rc38vnv63py3yxs50jb5gp7fcq4ikpprjgr3f8qvzxfvp50a", + "rev": "8c20762b734316613792226fb247a2aabd8fb823", + "sha256": "125vv6rhiqkwvznzh8y2qmyjskjcwhws41ij8n7cyy28ygfcrmr8", "type": "tarball", - "url": "https://github.com/dfinity/candid/archive/0ed73c1448a07d00a1aa2d21bb2bd92208afd81a.tar.gz", + "url": "https://github.com/dfinity/candid/archive/8c20762b734316613792226fb247a2aabd8fb823.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "esm": { From 32a7bb18ba86090022549c279fa493c7561173cb Mon Sep 17 00:00:00 2001 From: Luc Blaeser <112870813+luc-blaeser@users.noreply.github.com> Date: Mon, 9 Sep 2024 13:35:25 +0200 Subject: [PATCH 07/27] chore: Upgrade `drun` (#4678) Using IC 2024-08-16 with some adjustments: * `drun` adjustments for better testing - https://github.com/dfinity/ic/pull/662 (Lift 8GB memory boundary from drun) - https://github.com/dfinity/ic/pull/988 (Enable Wasm64 with 16GB main memory capacity) - https://github.com/dfinity/ic/pull/991 (Disable DTS for deterministic debug outputs) - https://github.com/dfinity/ic/pull/992 (Increase batch limit for longer running tests) - https://github.com/dfinity/ic/pull/1240 (Enable canister snapshots) * IC build fixes for `nix`: - Remove duplicate entries of same crate with same versions in `Cargo.toml`. - https://github.com/dfinity/ic/pull/993 (Fix MacOS `rocksdb` dependency). * Other IC fixes: - https://github.com/dfinity/ic/pull/1250 (Fix canister snapshots) --- nix/drun.nix | 46 +--------------------------------------------- nix/sources.json | 8 ++++---- 2 files changed, 5 insertions(+), 49 deletions(-) diff --git a/nix/drun.nix b/nix/drun.nix index 7c69c049063..16acb317faa 100644 --- a/nix/drun.nix +++ b/nix/drun.nix @@ -19,8 +19,7 @@ pkgs: lockFile = "${pkgs.sources.ic}/Cargo.lock"; outputHashes = { "build-info-0.0.27" = "sha256-SkwWwDNrTsntkNiCv6rsyTFGazhpRDnKtVzPpYLKF9U="; - "cloudflare-0.11.0" = "sha256-bJYiypmDI4KEy/VWt/7UcOv+g2CZLb9qUA9c1xlLxhM="; - "ic-agent-0.36.0" = "sha256-vDONIVjz0cwVgiszVRIjTKcqRUMHdVwTURflAMqmzHM="; + "cloudflare-0.12.0" = "sha256-FxCAK7gUKp/63fdvzI5Ufsy4aur74fO4R/K3YFiUw0Y="; "icrc1-test-env-0.1.1" = "sha256-2PB7e64Owin/Eji3k8UoeWs+pfDfOOTaAyXjvjOZ/4g="; "jsonrpc-0.12.1" = "sha256-3FtdZlt2PqVDkE5iKWYIp1eiIELsaYlUPRSP2Xp8ejM="; "lmdb-rkv-0.14.99" = "sha256-5WcUzapkrc/s3wCBNCuUDhtbp17n67rTbm2rx0qtITg="; @@ -43,49 +42,6 @@ pkgs: EOF cd - - # Disable DTS for `drun` - patch rs/config/src/subnet_config.rs << EOF -@@ -290,9 +290,9 @@ impl SchedulerConfig { - } - - pub fn system_subnet() -> Self { -- let max_instructions_per_message_without_dts = NumInstructions::from(50 * B); -+ let max_instructions_per_message_without_dts = -+ MAX_INSTRUCTIONS_PER_MESSAGE_WITHOUT_DTS * SYSTEM_SUBNET_FACTOR; - let max_instructions_per_install_code = NumInstructions::from(1_000 * B); -- let max_instructions_per_slice = NumInstructions::from(10 * B); - Self { - scheduler_cores: NUMBER_OF_EXECUTION_THREADS, - max_paused_executions: MAX_PAUSED_EXECUTIONS, -@@ -300,20 +300,19 @@ impl SchedulerConfig { - // TODO(RUN-993): Enable heap delta rate limiting for system subnets. - // Setting initial reserve to capacity effectively disables the rate limiting. - heap_delta_initial_reserve: SUBNET_HEAP_DELTA_CAPACITY, -- // Round limit is set to allow on average 2B instructions. -- // See also comment about \`MAX_INSTRUCTIONS_PER_ROUND\`. -- max_instructions_per_round: max_instructions_per_message_without_dts -- .max(max_instructions_per_slice) -- + NumInstructions::from(2 * B), -+ max_instructions_per_round: MAX_INSTRUCTIONS_PER_ROUND * SYSTEM_SUBNET_FACTOR, -+ // Effectively disable DTS on system subnets. - max_instructions_per_message: max_instructions_per_message_without_dts, - max_instructions_per_message_without_dts, -- max_instructions_per_slice, -+ // Effectively disable DTS on system subnets. -+ max_instructions_per_slice: max_instructions_per_message_without_dts, - instruction_overhead_per_execution: INSTRUCTION_OVERHEAD_PER_EXECUTION, - instruction_overhead_per_canister: INSTRUCTION_OVERHEAD_PER_CANISTER, - instruction_overhead_per_canister_for_finalization: - INSTRUCTION_OVERHEAD_PER_CANISTER_FOR_FINALIZATION, - max_instructions_per_install_code, -- max_instructions_per_install_code_slice: max_instructions_per_slice, -+ // Effectively disable DTS on system subnets. -+ max_instructions_per_install_code_slice: max_instructions_per_install_code, - max_heap_delta_per_iteration: MAX_HEAP_DELTA_PER_ITERATION * SYSTEM_SUBNET_FACTOR, - max_message_duration_before_warn_in_seconds: - MAX_MESSAGE_DURATION_BEFORE_WARN_IN_SECONDS, -EOF - # static linking of libunwind fails under nix Linux patch rs/monitoring/backtrace/build.rs << EOF @@ -1,8 +1,2 @@ diff --git a/nix/sources.json b/nix/sources.json index 19872f58034..88ed2a77e75 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -21,15 +21,15 @@ "version": "3.2.25" }, "ic": { - "branch": "luc/latest-ic-wasm64-test", + "branch": "luc/adjust-drun", "description": "Internet Computer blockchain source: the client/replica software run by nodes", "homepage": "", "owner": "luc-blaeser", "repo": "ic", - "rev": "7921f5f3dc0d9fb774e3222f8ff6b1c00a086f1a", - "sha256": "1ykawbpaqnf1y508vh81m30p813ykmnbffxc3p0hw0p0k1ynq6zz", + "rev": "6c718b80e04ad1930a08e6c53440c15021ca9c3d", + "sha256": "0iglm7m69d836wipzi25xza25l84dmjq9b4s1y6rwa8xnmiipnbh", "type": "tarball", - "url": "https://github.com/luc-blaeser/ic/archive/7921f5f3dc0d9fb774e3222f8ff6b1c00a086f1a.tar.gz", + "url": "https://github.com/luc-blaeser/ic/archive/6c718b80e04ad1930a08e6c53440c15021ca9c3d.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "ic-hs": { From 5b36b8b799f7083ee0a77b47928fff42e4a16093 Mon Sep 17 00:00:00 2001 From: DFINITY bot <58022693+dfinity-bot@users.noreply.github.com> Date: Tue, 10 Sep 2024 02:24:25 +0200 Subject: [PATCH 08/27] niv candid: update 8c20762b -> 5234523f (#4687) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Changelog for candid: Branch: master Commits: [dfinity/candid@8c20762b...5234523f](https://github.com/dfinity/candid/compare/8c20762b734316613792226fb247a2aabd8fb823...5234523fca11d4cbc75f6bdca21c704918361387) * [`5234523f`](https://github.com/dfinity/candid/commit/5234523fca11d4cbc75f6bdca21c704918361387) add cross-origin header for candid UI ([dfinity/candid⁠#572](https://togithub.com/dfinity/candid/issues/572)) --- nix/sources.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index 88ed2a77e75..b96398b1b44 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -6,10 +6,10 @@ "homepage": "", "owner": "dfinity", "repo": "candid", - "rev": "8c20762b734316613792226fb247a2aabd8fb823", - "sha256": "125vv6rhiqkwvznzh8y2qmyjskjcwhws41ij8n7cyy28ygfcrmr8", + "rev": "5234523fca11d4cbc75f6bdca21c704918361387", + "sha256": "00gax2x6rybc6b0nh1nk81gb5x29il3ijk1pizlb7jwv9y215x4b", "type": "tarball", - "url": "https://github.com/dfinity/candid/archive/8c20762b734316613792226fb247a2aabd8fb823.tar.gz", + "url": "https://github.com/dfinity/candid/archive/5234523fca11d4cbc75f6bdca21c704918361387.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "esm": { From 983c988ef5add870f2d05043c41d9ed69df7ecb7 Mon Sep 17 00:00:00 2001 From: Luc Blaeser <112870813+luc-blaeser@users.noreply.github.com> Date: Wed, 11 Sep 2024 13:12:59 +0200 Subject: [PATCH 09/27] Fix: Start Wasm table for the RTS at offset >= 1 (#4685) Rust requires a table offset of at least 1 as the element index 0 is considered invalid and causes a debug null check to panic when called. On the other hand, `elem[0]` can be used by the Motoko backend code, as correct Rust-generated Wasm code does not call `elem[0]`. This bug is independent of `wasm32` and `wasm64`. This issue has been observed in https://github.com/dfinity/motoko/actions/runs/10703077671/job/29672766216?pr=4683 and happened only on Linux and only under `nix-build` (not `nix-shell`). --- src/linking/linkModule.ml | 8 +++++++- test/ld/ok/representative.linked.wat.ok | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/linking/linkModule.ml b/src/linking/linkModule.ml index 6adf1535312..55c657285a1 100644 --- a/src/linking/linkModule.ml +++ b/src/linking/linkModule.ml @@ -846,7 +846,13 @@ let link (em1 : extended_module) libname (em2 : extended_module) = ) end else (); - let old_table_size = read_table_size em1.module_ in + let max x y = if x >= y then x else y in (* use `Int.max` when bumping to 4.13 *) + + (* Rust requires a table offset of at least 1 as elem[0] is considered invalid. + There are debug checks panicking if the element index is zero. + On the other hand, elem[0] can be used by the Motoko backend code (em1), + as correct Rust-generated Wasm code does not call elem[0]. *) + let old_table_size = max (read_table_size em1.module_) 1l in let lib_table_start = align_i32 dylink.table_alignment old_table_size in let uses_memory64 = uses_memory64 em1.module_ in diff --git a/test/ld/ok/representative.linked.wat.ok b/test/ld/ok/representative.linked.wat.ok index bcf3c073ec9..076c64ab1df 100644 --- a/test/ld/ok/representative.linked.wat.ok +++ b/test/ld/ok/representative.linked.wat.ok @@ -22,7 +22,7 @@ i32.mul) (func $link_start (type 0) call $__wasm_call_ctors) - (table (;0;) 0 0 funcref) + (table (;0;) 1 1 funcref) (memory (;0;) i64 2) (global (;0;) i64 (i64.const 65536)) (start $link_start)) From 074ffca17f95a3da876d8d0dda4d123cd5c16674 Mon Sep 17 00:00:00 2001 From: Jessie Mongeon <133128541+jessiemongeon1@users.noreply.github.com> Date: Thu, 12 Sep 2024 05:20:55 -0500 Subject: [PATCH 10/27] doc: add `try`/`finally` code example (#4669) --- doc/md/examples/try-finally.mo | 18 ++++++++++++++++++ doc/md/writing-motoko/errors.md | 19 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 doc/md/examples/try-finally.mo diff --git a/doc/md/examples/try-finally.mo b/doc/md/examples/try-finally.mo new file mode 100644 index 00000000000..a8deebc6d92 --- /dev/null +++ b/doc/md/examples/try-finally.mo @@ -0,0 +1,18 @@ +import Text "mo:base/Text"; +import Debug "mo:base/Debug" + +actor { + public func tryFunction() { + + try { + func greetOptional(optionalName : ?Text) : Text = + switch optionalName { + case null { "No name to be found." }; + case (?name) { "Hello, " # name # "!" }; + }; + assert greetOptional(?"Motoko") == "Motoko"; + } finally { + Debug.print("Finally block executed"); + } + } +} diff --git a/doc/md/writing-motoko/errors.md b/doc/md/writing-motoko/errors.md index 02a8fe7c6a8..65212bac916 100644 --- a/doc/md/writing-motoko/errors.md +++ b/doc/md/writing-motoko/errors.md @@ -121,6 +121,25 @@ Callsite: ``` motoko no-repl file=../examples/todo-error.mo#L143-L150 ``` +## Using try/finally + +A `finally` clause can be used within a `try/catch` error handling expression that facilitates control-flow expression cleanups, resource deallocation, or rolling back temporary state changes. The `finally` clause is optional, and when used, the `catch` clause may be omitted. Any uncaught error from the `try` block will be propagated after the `finally` block has executed. + +:::info + +`try/finally` is supported in `moc` `v0.12.0` and newer, and `dfx` `v0.24.0` and newer. + +::: + +`try/finally` must be used within an async expression or in the body of a shared function. Before using `try/finally`, please review the [security best practices](https://internetcomputer.org/docs/current/developer-docs/security/security-best-practices/inter-canister-calls#recommendation) for using this syntax. + +``` motoko no-repl file=../examples/try-finally.mo +``` + +Inside the `try` block, include code that may throw an error. In the `finally` block, include code that should be executed whether an error was thrown or not. Code within the `finally` block should not trap and should terminate promptly. If a `finally` block were to trap, it may prevent a future upgrade to the canister. + +Learn more about [`try/finally`](https://internetcomputer.org/docs/current/motoko/main/reference/language-manual#try). + ### How not to handle errors A generally poor way of reporting errors is through the use of a sentinel value. For example, for your `markDone` function, you might decide to use the value `-1` to signal that something failed. The callsite then has to check the return value against this special value and report the error. It's easy to not check for that error condition and continue to work with that value in the code. This can lead to delayed or even missing error detection and is strongly discouraged. From c75e20cd53139481d94f392a41368ab817fbaa26 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 00:46:05 +0000 Subject: [PATCH 11/27] chore(deps): Bump `cachix/install-nix-action` from 27 to 28 (#4691) Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 27 to 28.
Release notes

Sourced from cachix/install-nix-action's releases.

v28

Nix 2.24.6 - https://github.com/NixOS/nix/security/advisories/GHSA-h4vv-h3jq-v493

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cachix/install-nix-action&package-manager=github_actions&previous-version=27&new-version=28)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/release.yml | 4 ++-- .github/workflows/test.yml | 6 +++--- .github/workflows/update-hash.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d59e9c9cc83..d532e4bc059 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,7 +48,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v27 + - uses: cachix/install-nix-action@V28 - uses: cachix/cachix-action@v15 if: startsWith(github.ref, 'refs/heads/') with: @@ -74,7 +74,7 @@ jobs: needs: [ changelog, build ] steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v27 + - uses: cachix/install-nix-action@V28 - uses: cachix/cachix-action@v15 with: name: ic-hs-test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 94826e0613c..f0ddb388739 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: fetch-depth: 0 # fetch PR commit, not predicted merge commit ref: ${{ github.event.pull_request.head.sha }} - - uses: cachix/install-nix-action@V27 + - uses: cachix/install-nix-action@V28 # We are using the ic-hs-test cachix cache that is also used by # dfinity/ic-hs. This is partly laziness (on need to set up a separate @@ -106,7 +106,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v27 + - uses: cachix/install-nix-action@V28 - uses: cachix/cachix-action@v15 with: name: ic-hs-test @@ -129,7 +129,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v27 + - uses: cachix/install-nix-action@V28 - uses: cachix/cachix-action@v15 with: name: ic-hs-test diff --git a/.github/workflows/update-hash.yml b/.github/workflows/update-hash.yml index 92959b5fe72..fd0749ad33e 100644 --- a/.github/workflows/update-hash.yml +++ b/.github/workflows/update-hash.yml @@ -16,7 +16,7 @@ jobs: with: # This is needed to be able to push and trigger CI with that push token: ${{ secrets.NIV_UPDATER_TOKEN }} - - uses: cachix/install-nix-action@V27 + - uses: cachix/install-nix-action@V28 with: nix_path: nixpkgs=channel:nixos-22.11 - uses: cachix/cachix-action@v15 From 0ff90e080d599949af3423de9c3c0ff6dbb161a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 00:56:20 +0000 Subject: [PATCH 12/27] chore(deps): Bump body-parser and express in /doc/docusaurus (#4695) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [body-parser](https://github.com/expressjs/body-parser) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together. Updates `body-parser` from 1.20.2 to 1.20.3
Release notes

Sourced from body-parser's releases.

1.20.3

What's Changed

Important

  • deps: qs@6.13.0
  • add depth option to customize the depth level in the parser
  • IMPORTANT: The default depth level for parsing URL-encoded data is now 32 (previously was Infinity). Documentation

Other changes

New Contributors

Full Changelog: https://github.com/expressjs/body-parser/compare/1.20.2...1.20.3

Changelog

Sourced from body-parser's changelog.

1.20.3 / 2024-09-10

  • deps: qs@6.13.0
  • add depth option to customize the depth level in the parser
  • IMPORTANT: The default depth level for parsing URL-encoded data is now 32 (previously was Infinity)
Commits
Maintainer changes

This version was pushed to npm by ulisesgascon, a new releaser for body-parser since your current version.


Updates `express` from 4.19.2 to 4.21.0
Release notes

Sourced from express's releases.

4.21.0

What's Changed

New Contributors

Full Changelog: https://github.com/expressjs/express/compare/4.20.0...4.21.0

4.20.0

What's Changed

Important

  • IMPORTANT: The default depth level for parsing URL-encoded data is now 32 (previously was Infinity)
  • Remove link renderization in html while using res.redirect

Other Changes

... (truncated)

Changelog

Sourced from express's changelog.

4.21.0 / 2024-09-11

  • Deprecate res.location("back") and res.redirect("back") magic string
  • deps: serve-static@1.16.2
    • includes send@0.19.0
  • deps: finalhandler@1.3.1
  • deps: qs@6.13.0

4.20.0 / 2024-09-10

  • deps: serve-static@0.16.0
    • Remove link renderization in html while redirecting
  • deps: send@0.19.0
    • Remove link renderization in html while redirecting
  • deps: body-parser@0.6.0
    • add depth option to customize the depth level in the parser
    • IMPORTANT: The default depth level for parsing URL-encoded data is now 32 (previously was Infinity)
  • Remove link renderization in html while using res.redirect
  • deps: path-to-regexp@0.1.10
    • Adds support for named matching groups in the routes using a regex
    • Adds backtracking protection to parameters without regexes defined
  • deps: encodeurl@~2.0.0
    • Removes encoding of \, |, and ^ to align better with URL spec
  • Deprecate passing options.maxAge and options.expires to res.clearCookie
    • Will be ignored in v5, clearCookie will set a cookie with an expires in the past to instruct clients to delete the cookie
Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/dfinity/motoko/network/alerts).
--- doc/docusaurus/package-lock.json | 191 +++++++++++++++++-------------- 1 file changed, 105 insertions(+), 86 deletions(-) diff --git a/doc/docusaurus/package-lock.json b/doc/docusaurus/package-lock.json index e33fd27a22b..90b7adf2fdf 100644 --- a/doc/docusaurus/package-lock.json +++ b/doc/docusaurus/package-lock.json @@ -4845,9 +4845,9 @@ } }, "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.5", @@ -4857,7 +4857,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", + "qs": "6.13.0", "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -6601,9 +6601,9 @@ } }, "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", "engines": { "node": ">= 0.8" } @@ -6829,36 +6829,36 @@ } }, "node_modules/express": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", - "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", + "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.2", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.2.0", + "finalhandler": "1.3.1", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.10", "proxy-addr": "~2.0.7", - "qs": "6.11.0", + "qs": "6.13.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.2", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -6899,9 +6899,9 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/express/node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==" }, "node_modules/express/node_modules/range-parser": { "version": "1.2.1", @@ -7092,12 +7092,12 @@ } }, "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", "dependencies": { "debug": "2.6.9", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "on-finished": "2.4.1", "parseurl": "~1.3.3", @@ -8950,9 +8950,12 @@ } }, "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/merge-stream": { "version": "2.0.0", @@ -9242,9 +9245,12 @@ } }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -10414,11 +10420,11 @@ "integrity": "sha512-QFADYnsVoBMw1srW7OVKEYjG+MbIa49s54w1MA1EDY6r2r/sTcKKYqRX1f4GYvnXP7eN/Pe9HFcX+hwzmrXRHA==" }, "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -11606,9 +11612,9 @@ } }, "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -11641,6 +11647,14 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/send/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -11753,14 +11767,14 @@ } }, "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", "dependencies": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.18.0" + "send": "0.19.0" }, "engines": { "node": ">= 0.8.0" @@ -17249,9 +17263,9 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" }, "body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "requires": { "bytes": "3.1.2", "content-type": "~1.0.5", @@ -17261,7 +17275,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", + "qs": "6.13.0", "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -18494,9 +18508,9 @@ "integrity": "sha512-SNujglcLTTg+lDAcApPNgEdudaqQFiAbJCqzjNxJkvN9vAwCGi0uu8IUVvx+f16h+V44KCY6Y2yboroc9pilHg==" }, "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==" }, "end-of-stream": { "version": "1.4.4", @@ -18651,36 +18665,36 @@ } }, "express": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", - "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", + "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.2", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.2.0", + "finalhandler": "1.3.1", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.10", "proxy-addr": "~2.0.7", - "qs": "6.11.0", + "qs": "6.13.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.2", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -18715,9 +18729,9 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==" }, "range-parser": { "version": "1.2.1", @@ -18860,12 +18874,12 @@ } }, "finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", "requires": { "debug": "2.6.9", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "on-finished": "2.4.1", "parseurl": "~1.3.3", @@ -20184,9 +20198,9 @@ } }, "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==" }, "merge-stream": { "version": "2.0.0", @@ -20377,9 +20391,9 @@ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" }, "object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==" + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==" }, "object-keys": { "version": "1.1.1", @@ -21151,11 +21165,11 @@ "integrity": "sha512-QFADYnsVoBMw1srW7OVKEYjG+MbIa49s54w1MA1EDY6r2r/sTcKKYqRX1f4GYvnXP7eN/Pe9HFcX+hwzmrXRHA==" }, "qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "requires": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" } }, "queue": { @@ -22026,9 +22040,9 @@ } }, "send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "requires": { "debug": "2.6.9", "depd": "2.0.0", @@ -22060,6 +22074,11 @@ } } }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" + }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -22163,14 +22182,14 @@ } }, "serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", "requires": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.18.0" + "send": "0.19.0" } }, "set-function-length": { From 22b228b6ea262308d661194ed74b1416b47ad484 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 01:06:05 +0000 Subject: [PATCH 13/27] chore(deps): Bump serve-static and express in /doc/docusaurus (#4692) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [serve-static](https://github.com/expressjs/serve-static) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together. Updates `serve-static` from 1.15.0 to 1.16.2
Release notes

Sourced from serve-static's releases.

1.16.0

What's Changed

New Contributors

Full Changelog: https://github.com/expressjs/serve-static/compare/v1.15.0...1.16.0

Changelog

Sourced from serve-static's changelog.

1.16.2 / 2024-09-11

  • deps: encodeurl@~2.0.0

1.16.1 / 2024-09-11

  • deps: send@0.19.0

1.16.0 / 2024-09-10

  • Remove link renderization in html while redirecting
Commits
Maintainer changes

This version was pushed to npm by wesleytodd, a new releaser for serve-static since your current version.


Updates `express` from 4.19.2 to 4.21.0
Release notes

Sourced from express's releases.

4.21.0

What's Changed

New Contributors

Full Changelog: https://github.com/expressjs/express/compare/4.20.0...4.21.0

4.20.0

What's Changed

Important

  • IMPORTANT: The default depth level for parsing URL-encoded data is now 32 (previously was Infinity)
  • Remove link renderization in html while using res.redirect

Other Changes

... (truncated)

Changelog

Sourced from express's changelog.

4.21.0 / 2024-09-11

  • Deprecate res.location("back") and res.redirect("back") magic string
  • deps: serve-static@1.16.2
    • includes send@0.19.0
  • deps: finalhandler@1.3.1
  • deps: qs@6.13.0

4.20.0 / 2024-09-10

  • deps: serve-static@0.16.0
    • Remove link renderization in html while redirecting
  • deps: send@0.19.0
    • Remove link renderization in html while redirecting
  • deps: body-parser@0.6.0
    • add depth option to customize the depth level in the parser
    • IMPORTANT: The default depth level for parsing URL-encoded data is now 32 (previously was Infinity)
  • Remove link renderization in html while using res.redirect
  • deps: path-to-regexp@0.1.10
    • Adds support for named matching groups in the routes using a regex
    • Adds backtracking protection to parameters without regexes defined
  • deps: encodeurl@~2.0.0
    • Removes encoding of \, |, and ^ to align better with URL spec
  • Deprecate passing options.maxAge and options.expires to res.clearCookie
    • Will be ignored in v5, clearCookie will set a cookie with an expires in the past to instruct clients to delete the cookie
Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/dfinity/motoko/network/alerts).
From ddf5299f75608a17dc0bf3af94402cc02132ff46 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Fri, 13 Sep 2024 09:58:45 +0200 Subject: [PATCH 14/27] chore: regenerate documentation (#4696) --- doc/md/base/Iter.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/doc/md/base/Iter.md b/doc/md/base/Iter.md index 81bcdf106ac..280190e1e08 100644 --- a/doc/md/base/Iter.md +++ b/doc/md/base/Iter.md @@ -108,7 +108,7 @@ func filter(xs : Iter, f : A -> Bool) : Iter Takes a function and an iterator and returns a new iterator that produces elements from the original iterator if and only if the predicate is true. ```motoko -import Iter "o:base/Iter"; +import Iter "mo:base/Iter"; let iter = Iter.range(1, 3); let mappedIter = Iter.filter(iter, func (x : Nat) : Bool { x % 2 == 1 }); assert(?1 == mappedIter.next()); @@ -131,6 +131,25 @@ assert(?10 == iter.next()); // ... ``` +## Function `concat` +``` motoko no-repl +func concat(a : Iter, b : Iter) : Iter +``` + +Takes two iterators and returns a new iterator that produces +elements from the original iterators sequentally. +```motoko +import Iter "mo:base/Iter"; +let iter1 = Iter.range(1, 2); +let iter2 = Iter.range(5, 6); +let concatenatedIter = Iter.concat(iter1, iter2); +assert(?1 == concatenatedIter.next()); +assert(?2 == concatenatedIter.next()); +assert(?5 == concatenatedIter.next()); +assert(?6 == concatenatedIter.next()); +assert(null == concatenatedIter.next()); +``` + ## Function `fromArray` ``` motoko no-repl func fromArray(xs : [A]) : Iter From 1511fba2ff050b9fed8482f4bbcf935accb87496 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Fri, 13 Sep 2024 12:08:01 +0200 Subject: [PATCH 15/27] feat: burning cycles programmatically (#4690) This adds a new primitive `(prim "cyclesBurn")` and a `prim.mo` function `cyclesBurn : Nat -> Nat`. It can be used to burn (some of the) canister's cycles programmatically using the system interface `ic0.cycles_burn128`. --- Building.md | 24 ++++++------ Changelog.md | 5 ++- src/codegen/compile_classical.ml | 46 ++++++++++++++-------- src/codegen/compile_enhanced.ml | 54 ++++++++++++++++---------- src/ir_def/arrange_ir.ml | 1 + src/ir_def/check_ir.ml | 2 +- src/ir_def/construct.ml | 3 +- src/ir_def/ir.ml | 2 + src/lowering/desugar.ml | 2 + src/prelude/prim.mo | 4 ++ test/fail/ok/no-timer-canc.tc.ok | 1 + test/fail/ok/no-timer-set.tc.ok | 1 + test/run-drun/basic-cycles.mo | 2 + test/run-drun/empty-actor-classical.mo | 4 +- test/run-drun/ok/basic-cycles.tc.ok | 2 +- 15 files changed, 99 insertions(+), 54 deletions(-) diff --git a/Building.md b/Building.md index 2c210777c0f..f89b5389e6d 100644 --- a/Building.md +++ b/Building.md @@ -56,11 +56,11 @@ For more details on our CI and CI setup, see `CI.md`. ## Making releases -We make frequent releases, at least weekly. The steps to make a release (say, version 0.12.1) are: +We make frequent releases, at least weekly. The steps to make a release (say, version 0.13.1) are: * Make sure that the top section of `Changelog.md` has a title like - ## 0.12.1 (2024-07-29) + ## 0.13.1 (2024-09-10) with today’s date. @@ -77,18 +77,18 @@ We make frequent releases, at least weekly. The steps to make a release (say, ve * Define a shell variable `export MOC_MINOR=1` - * Look at `git log --first-parent 0.12.$(expr $MOC_MINOR - 1)..HEAD` and check + * Look at `git log --first-parent 0.13.$(expr $MOC_MINOR - 1)..HEAD` and check that everything relevant is mentioned in the changelog section, and possibly clean it up a bit, curating the information for the target audience. - * `git commit -am "chore: Releasing 0.12."$MOC_MINOR` + * `git commit -am "chore: Releasing 0.13."$MOC_MINOR` * Create a PR from this commit, and label it `automerge-squash`. E.g. - with `git push origin HEAD:$USER/0.12.$MOC_MINOR`. Mergify will + with `git push origin HEAD:$USER/0.13.$MOC_MINOR`. Mergify will merge it into `master` without additional approval, but it will take some time as the title (version number) enters into the `nix` dependency tracking. * `git switch master; git pull --rebase`. The release commit should be your `HEAD` - * `git tag 0.12.$MOC_MINOR -m "Motoko 0.12."$MOC_MINOR` - * `git push origin 0.12.$MOC_MINOR` + * `git tag 0.13.$MOC_MINOR -m "Motoko 0.13."$MOC_MINOR` + * `git push origin 0.13.$MOC_MINOR` Pushing the tag should cause GitHub Actions to create a “Release” on the GitHub project. This will fail if the changelog is not in order (in this case, fix and @@ -102,12 +102,12 @@ branch to the `next-moc` branch. * Wait ca. 5min after releasing to give the CI/CD pipeline time to upload the release artifacts * Change into `motoko-base` * `git switch next-moc; git pull` -* `git switch -c $USER/update-moc-0.12.$MOC_MINOR` +* `git switch -c $USER/update-moc-0.13.$MOC_MINOR` * Update the `CHANGELOG.md` file with an entry at the top * Update the `moc_version` env variable in `.github/workflows/{ci, package-set}.yml` and `mops.toml` to the new released version: - `perl -pi -e "s/moc_version: \"0\.12\.\\d+\"/moc_version: \"0.12.$MOC_MINOR\"/g; s/moc = \"0\.12\.\\d+\"/moc = \"0.12.$MOC_MINOR\"/g; s/version = \"0\.12\.\\d+\"/version = \"0.12.$MOC_MINOR\"/g" .github/workflows/ci.yml .github/workflows/package-set.yml mops.toml` -* `git add .github/ CHANGELOG.md mops.toml && git commit -m "Motoko 0.12."$MOC_MINOR` + `perl -pi -e "s/moc_version: \"0\.13\.\\d+\"/moc_version: \"0.13.$MOC_MINOR\"/g; s/moc = \"0\.13\.\\d+\"/moc = \"0.13.$MOC_MINOR\"/g; s/version = \"0\.13\.\\d+\"/version = \"0.13.$MOC_MINOR\"/g" .github/workflows/ci.yml .github/workflows/package-set.yml mops.toml` +* `git add .github/ CHANGELOG.md mops.toml && git commit -m "Motoko 0.13."$MOC_MINOR` * Revise `CHANGELOG.md`, adding a top entry for the release * You can `git push` now @@ -117,8 +117,8 @@ repo by a scheduled `niv-updater-action`. Finally tag the base release (so the documentation interpreter can do the right thing): * `git switch master && git pull` -* `git tag moc-0.12.$MOC_MINOR` -* `git push origin moc-0.12.$MOC_MINOR` +* `git tag moc-0.13.$MOC_MINOR` +* `git push origin moc-0.13.$MOC_MINOR` If you want to update the portal documentation, typically to keep in sync with a `dfx` release, follow the instructions in https://github.com/dfinity/portal/blob/master/MAINTENANCE.md. diff --git a/Changelog.md b/Changelog.md index b3efc5a4a31..8c2e608e4fc 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,7 +2,10 @@ * motoko (`moc`) - * **For beta testing:** Support __enhanced orthogonal persistence__, enabled with new moc flag `--enhanced-orthogonal-persistence` (#4193). + * Added a new primitive `cyclesBurn : Nat -> Nat` for burning the canister's cycles + programmatically (#4690). + + * **For beta testing:** Support __enhanced orthogonal persistence__, enabled with new `moc` flag `--enhanced-orthogonal-persistence` (#4193). This implements scalable and efficient orthogonal persistence (stable variables) for Motoko: * The Wasm main memory (heap) is retained on upgrade with new program versions directly picking up this state. diff --git a/src/codegen/compile_classical.ml b/src/codegen/compile_classical.ml index 18448230778..354c755307a 100644 --- a/src/codegen/compile_classical.ml +++ b/src/codegen/compile_classical.ml @@ -5073,6 +5073,7 @@ module IC = struct E.add_func_import env "ic0" "msg_cycles_available128" [I32Type] []; E.add_func_import env "ic0" "msg_cycles_refunded128" [I32Type] []; E.add_func_import env "ic0" "msg_cycles_accept128" [I64Type; I64Type; I32Type] []; + E.add_func_import env "ic0" "cycles_burn128" [I64Type; I64Type; I32Type] []; E.add_func_import env "ic0" "certified_data_set" (i32s 2) []; E.add_func_import env "ic0" "data_certificate_present" [] [I32Type]; E.add_func_import env "ic0" "data_certificate_size" [] [I32Type]; @@ -5093,8 +5094,7 @@ module IC = struct E.add_func_import env "ic0" "stable64_grow" [I64Type] [I64Type]; E.add_func_import env "ic0" "time" [] [I64Type]; if !Flags.global_timer then - E.add_func_import env "ic0" "global_timer_set" [I64Type] [I64Type]; - () + E.add_func_import env "ic0" "global_timer_set" [I64Type] [I64Type] let system_imports env = match E.mode env with @@ -5490,48 +5490,49 @@ module IC = struct let cycle_balance env = match E.mode env with - | Flags.ICMode - | Flags.RefMode -> + | Flags.(ICMode | RefMode) -> system_call env "canister_cycle_balance128" | _ -> E.trap_with env "cannot read balance when running locally" let cycles_add env = match E.mode env with - | Flags.ICMode - | Flags.RefMode -> + | Flags.(ICMode | RefMode) -> system_call env "call_cycles_add128" | _ -> E.trap_with env "cannot accept cycles when running locally" let cycles_accept env = match E.mode env with - | Flags.ICMode - | Flags.RefMode -> + | Flags.(ICMode | RefMode) -> system_call env "msg_cycles_accept128" | _ -> E.trap_with env "cannot accept cycles when running locally" let cycles_available env = match E.mode env with - | Flags.ICMode - | Flags.RefMode -> + | Flags.(ICMode | RefMode) -> system_call env "msg_cycles_available128" | _ -> E.trap_with env "cannot get cycles available when running locally" let cycles_refunded env = match E.mode env with - | Flags.ICMode - | Flags.RefMode -> + | Flags.(ICMode | RefMode) -> system_call env "msg_cycles_refunded128" | _ -> E.trap_with env "cannot get cycles refunded when running locally" + let cycles_burn env = + match E.mode env with + | Flags.(ICMode | RefMode) -> + system_call env "cycles_burn128" + | _ -> + E.trap_with env "cannot burn cycles when running locally" + let set_certified_data env = match E.mode env with - | Flags.ICMode - | Flags.RefMode -> + | Flags.(ICMode | RefMode) -> Blob.as_ptr_len env ^^ system_call env "certified_data_set" | _ -> @@ -5539,8 +5540,7 @@ module IC = struct let get_certificate env = match E.mode env with - | Flags.ICMode - | Flags.RefMode -> + | Flags.(ICMode | RefMode) -> system_call env "data_certificate_present" ^^ G.if1 I32Type begin @@ -5649,6 +5649,18 @@ module Cycles = struct ) ) + let burn env = + Func.share_code1 Func.Always env "cycle_burn" ("cycles", I32Type) [I32Type] (fun env get_x -> + Stack.with_words env "dst" 4l (fun get_dst -> + get_x ^^ + to_two_word64 env ^^ + get_dst ^^ + IC.cycles_burn env ^^ + get_dst ^^ + from_word128_ptr env + ) + ) + end (* Cycles *) (* Low-level, almost raw access to IC stable memory. @@ -12067,6 +12079,8 @@ and compile_prim_invocation (env : E.t) ae p es at = SR.Vanilla, Cycles.available env | SystemCyclesRefundedPrim, [] -> SR.Vanilla, Cycles.refunded env + | SystemCyclesBurnPrim, [e1] -> + SR.Vanilla, compile_exp_vanilla env ae e1 ^^ Cycles.burn env | SetCertifiedData, [e1] -> SR.unit, compile_exp_vanilla env ae e1 ^^ IC.set_certified_data env diff --git a/src/codegen/compile_enhanced.ml b/src/codegen/compile_enhanced.ml index 080f1acfb7d..2a1351135ac 100644 --- a/src/codegen/compile_enhanced.ml +++ b/src/codegen/compile_enhanced.ml @@ -4731,6 +4731,7 @@ module IC = struct E.add_func_import env "ic0" "msg_cycles_available128" [I64Type] []; E.add_func_import env "ic0" "msg_cycles_refunded128" [I64Type] []; E.add_func_import env "ic0" "msg_cycles_accept128" (i64s 3) []; + E.add_func_import env "ic0" "cycles_burn128" (i64s 3) []; E.add_func_import env "ic0" "certified_data_set" (i64s 2) []; E.add_func_import env "ic0" "data_certificate_present" [] [I32Type]; E.add_func_import env "ic0" "data_certificate_size" [] [I64Type]; @@ -4751,8 +4752,7 @@ module IC = struct E.add_func_import env "ic0" "stable64_grow" [I64Type] [I64Type]; E.add_func_import env "ic0" "time" [] [I64Type]; if !Flags.global_timer then - E.add_func_import env "ic0" "global_timer_set" [I64Type] [I64Type]; - () + E.add_func_import env "ic0" "global_timer_set" [I64Type] [I64Type] let system_imports env = match E.mode env with @@ -5221,48 +5221,49 @@ module IC = struct let cycle_balance env = match E.mode env with - | Flags.ICMode - | Flags.RefMode -> + | Flags.(ICMode | RefMode) -> system_call env "canister_cycle_balance128" | _ -> E.trap_with env "cannot read balance when running locally" let cycles_add env = match E.mode env with - | Flags.ICMode - | Flags.RefMode -> + | Flags.(ICMode | RefMode) -> system_call env "call_cycles_add128" | _ -> E.trap_with env "cannot accept cycles when running locally" let cycles_accept env = match E.mode env with - | Flags.ICMode - | Flags.RefMode -> + | Flags.(ICMode | RefMode) -> system_call env "msg_cycles_accept128" | _ -> E.trap_with env "cannot accept cycles when running locally" let cycles_available env = match E.mode env with - | Flags.ICMode - | Flags.RefMode -> + | Flags.(ICMode | RefMode) -> system_call env "msg_cycles_available128" | _ -> E.trap_with env "cannot get cycles available when running locally" let cycles_refunded env = match E.mode env with - | Flags.ICMode - | Flags.RefMode -> + | Flags.(ICMode | RefMode) -> system_call env "msg_cycles_refunded128" | _ -> E.trap_with env "cannot get cycles refunded when running locally" + let cycles_burn env = + match E.mode env with + | Flags.(ICMode | RefMode) -> + system_call env "cycles_burn128" + | _ -> + E.trap_with env "cannot burn cycles when running locally" + let set_certified_data env = match E.mode env with - | Flags.ICMode - | Flags.RefMode -> + | Flags.(ICMode | RefMode) -> Blob.as_ptr_len env ^^ system_call env "certified_data_set" | _ -> @@ -5270,8 +5271,7 @@ module IC = struct let get_certificate env = match E.mode env with - | Flags.ICMode - | Flags.RefMode -> + | Flags.(ICMode | RefMode) -> system_call env "data_certificate_present" ^^ Bool.from_rts_int32 ^^ E.if1 I64Type @@ -5338,7 +5338,7 @@ module Cycles = struct let balance env = Func.share_code0 Func.Always env "cycle_balance" [I64Type] (fun env -> - Stack.with_words env "dst" 4L (fun get_dst -> + Stack.with_words env "dst" 2L (fun get_dst -> get_dst ^^ IC.cycle_balance env ^^ get_dst ^^ @@ -5355,7 +5355,7 @@ module Cycles = struct let accept env = Func.share_code1 Func.Always env "cycle_accept" ("cycles", I64Type) [I64Type] (fun env get_x -> - Stack.with_words env "dst" 4L (fun get_dst -> + Stack.with_words env "dst" 2L (fun get_dst -> get_x ^^ to_two_word64 env ^^ get_dst ^^ @@ -5367,7 +5367,7 @@ module Cycles = struct let available env = Func.share_code0 Func.Always env "cycle_available" [I64Type] (fun env -> - Stack.with_words env "dst" 4L (fun get_dst -> + Stack.with_words env "dst" 2L (fun get_dst -> get_dst ^^ IC.cycles_available env ^^ get_dst ^^ @@ -5377,7 +5377,7 @@ module Cycles = struct let refunded env = Func.share_code0 Func.Always env "cycle_refunded" [I64Type] (fun env -> - Stack.with_words env "dst" 4L (fun get_dst -> + Stack.with_words env "dst" 2L (fun get_dst -> get_dst ^^ IC.cycles_refunded env ^^ get_dst ^^ @@ -5385,6 +5385,18 @@ module Cycles = struct ) ) + let burn env = + Func.share_code1 Func.Always env "cycle_burn" ("cycles", I64Type) [I64Type] (fun env get_x -> + Stack.with_words env "dst" 2L (fun get_dst -> + get_x ^^ + to_two_word64 env ^^ + get_dst ^^ + IC.cycles_burn env ^^ + get_dst ^^ + from_word128_ptr env + ) + ) + end (* Cycles *) (* Low-level, almost raw access to IC stable memory. @@ -12245,6 +12257,8 @@ and compile_prim_invocation (env : E.t) ae p es at = SR.Vanilla, Cycles.available env | SystemCyclesRefundedPrim, [] -> SR.Vanilla, Cycles.refunded env + | SystemCyclesBurnPrim, [e1] -> + SR.Vanilla, compile_exp_vanilla env ae e1 ^^ Cycles.burn env | SetCertifiedData, [e1] -> SR.unit, compile_exp_vanilla env ae e1 ^^ IC.set_certified_data env diff --git a/src/ir_def/arrange_ir.ml b/src/ir_def/arrange_ir.ml index d476aa83ec7..02cb40bde7d 100644 --- a/src/ir_def/arrange_ir.ml +++ b/src/ir_def/arrange_ir.ml @@ -101,6 +101,7 @@ and prim = function | SystemCyclesAvailablePrim -> Atom "SystemCyclesAvailablePrim" | SystemCyclesBalancePrim -> Atom "SystemCyclesBalancePrim" | SystemCyclesRefundedPrim -> Atom "SystemCyclesRefundedPrim" + | SystemCyclesBurnPrim -> Atom "SystemCyclesBurnPrim" | SetCertifiedData -> Atom "SetCertifiedData" | GetCertificate -> Atom "GetCertificate" | OtherPrim s -> Atom s diff --git a/src/ir_def/check_ir.ml b/src/ir_def/check_ir.ml index a70c10f47d1..0d9f45279a6 100644 --- a/src/ir_def/check_ir.ml +++ b/src/ir_def/check_ir.ml @@ -676,7 +676,7 @@ let rec check_exp env (exp:Ir.exp) : unit = (* Cycles *) | (SystemCyclesBalancePrim | SystemCyclesAvailablePrim | SystemCyclesRefundedPrim), [] -> T.nat <: t - | SystemCyclesAcceptPrim, [e1] -> + | (SystemCyclesAcceptPrim | SystemCyclesBurnPrim), [e1] -> typ e1 <: T.nat; T.nat <: t | SystemCyclesAddPrim, [e1] -> diff --git a/src/ir_def/construct.ml b/src/ir_def/construct.ml index 5de2e5ef0a7..6564490287e 100644 --- a/src/ir_def/construct.ml +++ b/src/ir_def/construct.ml @@ -107,7 +107,8 @@ let primE prim es = | RelPrim _ -> T.bool | SerializePrim _ -> T.blob | SystemCyclesAvailablePrim - | SystemCyclesAcceptPrim -> T.nat + | SystemCyclesAcceptPrim + | SystemCyclesBurnPrim -> T.nat | DeserializePrim ts -> T.seq ts | DeserializeOptPrim ts -> T.Opt (T.seq ts) | OtherPrim "trap" -> T.Non diff --git a/src/ir_def/ir.ml b/src/ir_def/ir.ml index 413b56506dd..18b28c8b9ff 100644 --- a/src/ir_def/ir.ml +++ b/src/ir_def/ir.ml @@ -159,6 +159,7 @@ and prim = | SystemCyclesAvailablePrim | SystemCyclesBalancePrim | SystemCyclesRefundedPrim + | SystemCyclesBurnPrim | SetCertifiedData | GetCertificate @@ -308,6 +309,7 @@ let map_prim t_typ t_id p = | SystemCyclesAvailablePrim | SystemCyclesBalancePrim | SystemCyclesRefundedPrim + | SystemCyclesBurnPrim | SetCertifiedData | GetCertificate | OtherPrim _ -> p diff --git a/src/lowering/desugar.ml b/src/lowering/desugar.ml index 9c498035d41..bcbb995e46d 100644 --- a/src/lowering/desugar.ml +++ b/src/lowering/desugar.ml @@ -183,6 +183,8 @@ and exp' at note = function I.PrimE (I.SystemCyclesAcceptPrim, [exp e]) | S.CallE ({it=S.AnnotE ({it=S.PrimE "cyclesAdd";_},_);_}, _, e) -> I.PrimE (I.SystemCyclesAddPrim, [exp e]) + | S.CallE ({it=S.AnnotE ({it=S.PrimE "cyclesBurn";_},_);_}, _, e) -> + I.PrimE (I.SystemCyclesBurnPrim, [exp e]) (* Certified data *) | S.CallE ({it=S.AnnotE ({it=S.PrimE "setCertifiedData";_},_);_}, _, e) -> I.PrimE (I.SetCertifiedData, [exp e]) diff --git a/src/prelude/prim.mo b/src/prelude/prim.mo index f900e2063cf..209337400e0 100644 --- a/src/prelude/prim.mo +++ b/src/prelude/prim.mo @@ -351,6 +351,10 @@ func cyclesAdd(amount : Nat) : () { }; }; +func cyclesBurn(amount : Nat) : Nat { + (prim "cyclesBurn" : Nat -> Nat) amount; +}; + // certified data func setCertifiedData(data : Blob) = (prim "setCertifiedData" : Blob -> ()) data; func getCertificate() : ?Blob = (prim "getCertificate" : () -> ?Blob)(); diff --git a/test/fail/ok/no-timer-canc.tc.ok b/test/fail/ok/no-timer-canc.tc.ok index 7918c4887dd..e1877945e59 100644 --- a/test/fail/ok/no-timer-canc.tc.ok +++ b/test/fail/ok/no-timer-canc.tc.ok @@ -88,6 +88,7 @@ no-timer-canc.mo:3.10-3.21: type error [M0119], object field cancelTimer is not cyclesAdd : Nat -> (); cyclesAvailable : () -> Nat; cyclesBalance : () -> Nat; + cyclesBurn : Nat -> Nat; cyclesRefunded : () -> Nat; debugPrint : Text -> (); debugPrintChar : Char -> (); diff --git a/test/fail/ok/no-timer-set.tc.ok b/test/fail/ok/no-timer-set.tc.ok index a015c4bae8e..f4951c74796 100644 --- a/test/fail/ok/no-timer-set.tc.ok +++ b/test/fail/ok/no-timer-set.tc.ok @@ -88,6 +88,7 @@ no-timer-set.mo:3.10-3.18: type error [M0119], object field setTimer is not cont cyclesAdd : Nat -> (); cyclesAvailable : () -> Nat; cyclesBalance : () -> Nat; + cyclesBurn : Nat -> Nat; cyclesRefunded : () -> Nat; debugPrint : Text -> (); debugPrintChar : Char -> (); diff --git a/test/run-drun/basic-cycles.mo b/test/run-drun/basic-cycles.mo index 42b3b159282..73cfd970224 100644 --- a/test/run-drun/basic-cycles.mo +++ b/test/run-drun/basic-cycles.mo @@ -8,6 +8,7 @@ actor a { let available : () -> Nat = Prim.cyclesAvailable; let accept : Nat -> Nat = Prim.cyclesAccept; let add : Nat -> () = Prim.cyclesAdd; + let burn : Nat -> Nat = Prim.cyclesBurn; let refunded : () -> Nat = Prim.cyclesRefunded; @@ -91,6 +92,7 @@ actor a { public func go() : async (){ await overflow(); await iter(); + assert 1000 == burn 1000 } }; diff --git a/test/run-drun/empty-actor-classical.mo b/test/run-drun/empty-actor-classical.mo index 564bf9d4ddd..babae5e5f94 100644 --- a/test/run-drun/empty-actor-classical.mo +++ b/test/run-drun/empty-actor-classical.mo @@ -8,11 +8,11 @@ actor {}; // CHECK-NEXT: call $trans_state // CHECK-NEXT: call $init // CHECK-NEXT: i32.const 0 -// CHECK-NEXT: call 32 +// CHECK-NEXT: call 33 // CHECK-NEXT: global.set 4 // CHECK-NEXT: call ${{copying_gc|compacting_gc|generational_gc|incremental_gc}} // CHECK-NEXT: i32.const 0 -// CHECK-NEXT: call 32 +// CHECK-NEXT: call 33 // CHECK-NEXT: global.get 4 // CHECK-NEXT: i64.sub // CHECK-NEXT: global.set 5 diff --git a/test/run-drun/ok/basic-cycles.tc.ok b/test/run-drun/ok/basic-cycles.tc.ok index 6b3df344d9d..d80be283628 100644 --- a/test/run-drun/ok/basic-cycles.tc.ok +++ b/test/run-drun/ok/basic-cycles.tc.ok @@ -1 +1 @@ -basic-cycles.mo:12.7-12.15: warning [M0194], unused identifier refunded (delete or rename to wildcard `_` or `_refunded`) +basic-cycles.mo:13.7-13.15: warning [M0194], unused identifier refunded (delete or rename to wildcard `_` or `_refunded`) From 9a3ea6e48b40e0bee85d5ed5f43358d20a2b85e6 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Fri, 13 Sep 2024 14:54:43 +0200 Subject: [PATCH 16/27] chore: Releasing 0.13.0 (#4697) --- Changelog.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 8c2e608e4fc..0a83672e5f8 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,7 @@ # Motoko compiler changelog +## 0.13.0 (2024-09-13) + * motoko (`moc`) * Added a new primitive `cyclesBurn : Nat -> Nat` for burning the canister's cycles @@ -31,10 +33,11 @@ "args" : "--enhanced-orthogonal-persistence" ... ``` + BREAKING CHANGE (Minor): changes some aspects of `Float` formatting. For more information, see: * The Motoko design documentation `design/OrthogonalPersistence.md` - * The Motoko user documentation `doc/md/canister-maintenance//upgrades.md`. + * The Motoko user documentation `doc/md/canister-maintenance/upgrades.md`. * Candid decoding: impose an upper limit on the number of values decoded or skipped in a single candid payload, as a linear function, `max_values`, of binary payload size. From eb29e5f5df0fdb96c2695e767e75b342503ca78e Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Sat, 14 Sep 2024 17:23:03 +0200 Subject: [PATCH 17/27] strip from checks and uploads --- .github/workflows/release.yml | 52 ----------------------------------- 1 file changed, 52 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d532e4bc059..907bdebb358 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,38 +13,12 @@ on: - 'master' jobs: - # first check that the changelog is in good order and extract the changelog - # This will fail for non-release tags. - changelog: - runs-on: 'ubuntu-latest' - steps: - - uses: actions/checkout@v4 - - - name: Get the version - id: get_version - run: echo version=${{ github.ref_name }} >> "$GITHUB_OUTPUT" - - - name: Extract changelog - id: read_changelog - if: startsWith(github.ref, 'refs/tags/') - run: | - export VERSION='${{ steps.get_version.outputs.version }}' - perl -0777 -ne '/^# Motoko compiler changelog\n\n## (??{quotemeta($ENV{VERSION})}) \(\d\d\d\d-\d\d-\d\d\)\n\n(.*?)^##/sm or die "Changelog does not look right for this version\n" ; print $1' Changelog.md > changelog-extract.md - cat changelog-extract.md - # need to mangle to use with $GITHUB_OUTPUT (previously: set-output), - # see https://github.com/svenstaro/upload-release-action/blob/master/README.md - # under "Example for feeding a file from repo to the body tag" - echo "RELEASE_BODY=$(perl -0777 -p -e 's/%/%25/g; s/\n/%0A/g; s/\r/%0D/g' changelog-extract.md)" >> "$GITHUB_OUTPUT" - - outputs: - release_body: ${{ steps.read_changelog.outputs.RELEASE_BODY }} # Now build the release on both linux and darwin build: strategy: matrix: os: [ ubuntu-latest, macos-12 ] - needs: changelog runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -64,29 +38,3 @@ jobs: # these are the dependencies listed in release-files. Sorry for the duplication run: | nix-build --max-jobs 1 --arg officialRelease true -A moc -A mo-ide -A mo-doc -A js.moc -A js.moc_interpreter - - # Finally do the upload. Hopefully the previous job has uploaded the - # build product to the cachix cache, as we cannot build the darwin products on - # linux - release: - if: startsWith(github.ref, 'refs/tags/') - runs-on: 'ubuntu-latest' - needs: [ changelog, build ] - steps: - - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@V28 - - uses: cachix/cachix-action@v15 - with: - name: ic-hs-test - # NB: No auth token, we don’t expect to push new stuff here - - - run: nix-build --max-jobs 1 --arg officialRelease true release-files.nix - - - name: Upload Release Assets - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ github.ref }} - file: result/* - file_glob: true - body: ${{ needs.changelog.outputs.release_body }} From 624d52d2a53dc4ee079b1e4c11e70874fe698749 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Sat, 14 Sep 2024 18:46:03 +0200 Subject: [PATCH 18/27] eeek, re-add --- .github/workflows/release.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 907bdebb358..e39e89693df 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,3 +38,20 @@ jobs: # these are the dependencies listed in release-files. Sorry for the duplication run: | nix-build --max-jobs 1 --arg officialRelease true -A moc -A mo-ide -A mo-doc -A js.moc -A js.moc_interpreter + + # Finally do the upload. Hopefully the previous job has uploaded the + # build product to the cachix cache, as we cannot build the darwin products on + # linux + release: + if: startsWith(github.ref, 'refs/tags/') + runs-on: 'ubuntu-latest' + needs: [ build ] + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@V28 + - uses: cachix/cachix-action@v15 + with: + name: ic-hs-test + # NB: No auth token, we don’t expect to push new stuff here + + - run: nix-build --max-jobs 1 --arg officialRelease true release-files.nix From 5ff0b7277fcfba34e83699592ba7802b00e46923 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Sat, 14 Sep 2024 19:01:08 +0200 Subject: [PATCH 19/27] experiment --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e39e89693df..c8750a971e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,4 +54,4 @@ jobs: name: ic-hs-test # NB: No auth token, we don’t expect to push new stuff here - - run: nix-build --max-jobs 1 --arg officialRelease true release-files.nix + - run: nix-build --download-buffer-size 167108864 --max-jobs 1 --arg officialRelease true release-files.nix From cfd919c9db94d5e2f9ef2f108853845aa3288935 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Sat, 14 Sep 2024 19:10:25 +0200 Subject: [PATCH 20/27] damn --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c8750a971e1..d7185a08829 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,4 +54,4 @@ jobs: name: ic-hs-test # NB: No auth token, we don’t expect to push new stuff here - - run: nix-build --download-buffer-size 167108864 --max-jobs 1 --arg officialRelease true release-files.nix + - run: nix-build --option download-buffer-size 167108864 --max-jobs 1 --arg officialRelease true release-files.nix From 14d68cc9414cf1a360b2054781abcfc7ded2e69d Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Sat, 14 Sep 2024 20:24:47 +0200 Subject: [PATCH 21/27] harmless change --- default.nix | 2 +- rts/cargo-vendor-tools/src/vendor_rust_std_deps.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index a582d9adcd1..39e5ac43b9e 100644 --- a/default.nix +++ b/default.nix @@ -165,7 +165,7 @@ rec { cargoVendorTools = nixpkgs.rustPlatform.buildRustPackage rec { name = "cargo-vendor-tools"; src = subpath "./rts/${name}/"; - cargoSha256 = "sha256-E6GTFvmZMjGsVlec7aH3QaizqIET6Dz8Csh0N1jeX+M="; + cargoSha256 = "sha256-X6GTFvmZMjGsVlec7aH3QaizqIET6Dz8Csh0N1jeX+M="; }; # Path to vendor-rust-std-deps, provided by cargo-vendor-tools diff --git a/rts/cargo-vendor-tools/src/vendor_rust_std_deps.rs b/rts/cargo-vendor-tools/src/vendor_rust_std_deps.rs index 3c3bf7e7848..014f418d308 100644 --- a/rts/cargo-vendor-tools/src/vendor_rust_std_deps.rs +++ b/rts/cargo-vendor-tools/src/vendor_rust_std_deps.rs @@ -7,7 +7,7 @@ use serde_json as json; use sha2::{Digest, Sha256}; static DESCR: &str = " -Given a Rust toolchain path and a vendor directory, this program vendors Rust std dependencies in +XGiven a Rust toolchain path and a vendor directory, this program vendors Rust std dependencies in the given vendor directory. This directory can then be used to build packages with `-Zbuild-std` parameters in nix. "; From e3cf0b32dd5102329b4fc70972f4ddb35994d900 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Sat, 14 Sep 2024 21:49:45 +0200 Subject: [PATCH 22/27] assert release build archs --- default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/default.nix b/default.nix index 39e5ac43b9e..32ef79e6e4b 100644 --- a/default.nix +++ b/default.nix @@ -6,6 +6,8 @@ let nixpkgs = import ./nix { inherit system; }; in +assert !officialRelease || nixpkgs.lib.asserts.assertOneOf "system" system [ "x86_64-linux" "x86_64-darwin" ]; + let releaseVersion = import nix/releaseVersion.nix { pkgs = nixpkgs; inherit officialRelease; }; in let stdenv = nixpkgs.stdenv; in From 6163213e645da3595389d058fc38ac203057e499 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Sat, 14 Sep 2024 22:09:38 +0200 Subject: [PATCH 23/27] debug --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d7185a08829..e15bfce98e8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,4 +54,5 @@ jobs: name: ic-hs-test # NB: No auth token, we don’t expect to push new stuff here - - run: nix-build --option download-buffer-size 167108864 --max-jobs 1 --arg officialRelease true release-files.nix + - run: | + nix-build --option download-buffer-size 167108864 --max-jobs 1 --arg officialRelease true release-files.nix || derivation show /nix/store/*-moc-rts.drv From a914dae678f4a76713b16d534c3e1afa0ab77f77 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Sat, 14 Sep 2024 22:10:17 +0200 Subject: [PATCH 24/27] grrr --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e15bfce98e8..69c260a3dda 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,4 +55,4 @@ jobs: # NB: No auth token, we don’t expect to push new stuff here - run: | - nix-build --option download-buffer-size 167108864 --max-jobs 1 --arg officialRelease true release-files.nix || derivation show /nix/store/*-moc-rts.drv + nix-build --option download-buffer-size 167108864 --max-jobs 1 --arg officialRelease true release-files.nix || nix derivation show /nix/store/*-moc-rts.drv From c7e71ec2d5b371e91d983e325428809701ba7d9a Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Sat, 14 Sep 2024 22:26:39 +0200 Subject: [PATCH 25/27] more debug --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 69c260a3dda..4f73e08fbab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,6 +38,7 @@ jobs: # these are the dependencies listed in release-files. Sorry for the duplication run: | nix-build --max-jobs 1 --arg officialRelease true -A moc -A mo-ide -A mo-doc -A js.moc -A js.moc_interpreter + nix derivation show /nix/store/*-moc-rts.drv # Finally do the upload. Hopefully the previous job has uploaded the # build product to the cachix cache, as we cannot build the darwin products on From ede2ac6c5887f58eed5e2aa68afce8def9090fa5 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Sat, 14 Sep 2024 22:54:06 +0200 Subject: [PATCH 26/27] more debug --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4f73e08fbab..7e8f1c4fc5c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,6 +39,7 @@ jobs: run: | nix-build --max-jobs 1 --arg officialRelease true -A moc -A mo-ide -A mo-doc -A js.moc -A js.moc_interpreter nix derivation show /nix/store/*-moc-rts.drv + ls -l /nix/store/*-moc-rts.drv # Finally do the upload. Hopefully the previous job has uploaded the # build product to the cachix cache, as we cannot build the darwin products on @@ -57,3 +58,4 @@ jobs: - run: | nix-build --option download-buffer-size 167108864 --max-jobs 1 --arg officialRelease true release-files.nix || nix derivation show /nix/store/*-moc-rts.drv + ls -l /nix/store/*-moc-rts.drv From 65ef5171cd144d9a7c3653ccdf10a889bde28dca Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Mon, 16 Sep 2024 11:06:14 +0200 Subject: [PATCH 27/27] chore: bump `nixpkgs` to `release-24.05` --- nix/sources.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index b96398b1b44..62145f09787 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -108,16 +108,16 @@ "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs": { - "branch": "release-23.11", + "branch": "release-24.05", "builtin": true, "description": "Nixpkgs/NixOS branches that track the Nixpkgs/NixOS channels", "homepage": null, "owner": "NixOS", "repo": "nixpkgs", - "rev": "6a5b92486ae7826c07fbfad302f569ceb187b0eb", - "sha256": "058kf03v7yh1c4ns96af6jq3ymadv71s7ajv9s05ipl9bnkjfrhm", + "rev": "f5173c0827d19dc1a46003a9df9de653b1285173", + "sha256": "1swhcfxcdx3kj4pkzwh82yaq3s2vbvjimbvd8qndkqxf2127wyak", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/6a5b92486ae7826c07fbfad302f569ceb187b0eb.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/f5173c0827d19dc1a46003a9df9de653b1285173.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs-mozilla": {