-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update Azle templates to 0.25.0 #4040
base: master
Are you sure you want to change the base?
Conversation
Dear @lastmjs, In order to potentially merge your code in this open-source repository and therefore proceed with your contribution, we need to have your approval on DFINITY's CLA. If you decide to agree with it, please visit this issue and read the instructions there. Once you have signed it, re-trigger the workflow on this PR to see if your code can be merged. — The DFINITY Foundation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following fails, because with this setup the backend canister (type=azle) is relying on a frontend canister to run npm install
to install the azle extension.
It might be enough for this specific case to move the npm install post_create setup in templates.js to the dfx_js_base template.
Even then, if npm install
fails (and notice that dfx new is specifically set up to treat this as a warning), all dfx commands run in the project will report an error like the one below until npm install
is run and succeeds.
$ dfx cache delete
$ dfx new azt --type azle --frontend none
Fetching manifest https://sdk.dfinity.org/manifest.json
Installed dfx 0.24.3-azletest to cache.
Creating new project "azt"...
Initializing git repository...
===============================================================================
Welcome to the internet computer developer community!
To learn more before you start coding, check out the developer docs and samples:
- Documentation: https://internetcomputer.org/docs/current/developer-docs
- Samples: https://internetcomputer.org/samples
===============================================================================
$ cd azt
$ dfx deploy
Error: Failed to create AgentEnvironment.
Caused by: canister 'azt_backend' has unknown type 'azle' and there is no installed extension by that name which could define it
I assume you meant |
@@ -226,7 +226,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> { | |||
get_archive_fn: assets::new_project_js_files, | |||
}, | |||
category: ProjectTemplateCategory::Support, | |||
post_create: vec![], | |||
post_create: vec![NPM_INSTALL.to_string()], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should remove the post create fields from the templates that require dfx_js_base, and add them here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe I have done this correctly now
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
The
dfx new
command forAzle
has been out-of-date for a while now. This PR updatesAzle
's templates to the latest version and simplifies the templates with new changes possible because of the latest version.How Has This Been Tested?
I built the sdk locally and manually used the
dfx new
command to create a new example project. I then deployed the project and checked that it worked in the Candid UI.Checklist: