dfinity / dfx-extensions

Source repo for DFX extensions binaries and metadata
Apache License 2.0
8 stars 5 forks source link

version in extension.json no longer allows version suffixes #144

Closed lastmjs closed 1 month ago

lastmjs commented 1 month ago

I just upgraded to dfx 0.23.0 and received this error during the deploy process of Kybra 0.7.0rc0:

Error: Failed to load extension manifest
Caused by: failed to parse contents of /home/lastmjs/.cache/dfinity/versions/0.23.0/extensions/kybra/extension.json as json
Caused by: unexpected character 'r' after patch version number at line 3 column 25

It seems that in dfx 0.23.0, the ability to parse suffixes in the extension.json file for dfx extensions has been lost. This is unfortunate as Azle and Kybra both make extensive use of suffixes during release candidate deploys, and we currently keep the extension.json version completely in sync with the version of Azle or Kybra.

lastmjs commented 1 month ago

This was my mistake. PyPI will take a version like this: "0.0.0-rc.0" and on the website it seems to remove the hyphen and dot in the suffix to create a version like this: "0.0.0rc0", so I had gotten into the habit of just adopting that pattern in our own code. But if I use correct semver (assuming what PyPI is doing is not correct), then the process works just fine.