-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add more details to the Holochain upgrade guide #426
Conversation
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.
thanks, i'm sure this will help lots of devs. i added some non-critical suggestions.
|
||
### Update Cargo dependencies | ||
|
||
This section is harder to write a general guide for because it's common for hApps to add dependencies on other Holochain crates. If you have added other dependencies than the `hdi` and `hdk` to your project then you will need to update those too but figuring out which versions you |
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 like this honest preface
Co-authored-by: Stefan Junker <1181362+steveej@users.noreply.github.com>
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.
Great documentation and very easy to follow
Something to consider though, the package.json
scripts in 0.1
and 0.2
vary with regards to calling hc run-local-services
in the launch
script which was not done before in 0.1
. Running this command also requires that BOOTSTRAP_PORT
and SIGNAL_PORT
are set in the start
script so that they are referenced in the launch
script
Here is an example
0.1
:
"scripts": {
"start": "AGENTS=2 npm run network",
"network": "hc s clean && npm run build:happ && UI_PORT=8888 concurrently \"npm start -w ui\" \"npm run launch:happ\" \"holochain-playground\"",
"test": "npm run build:zomes && hc app pack workdir --recursive && npm t -w tests",
"launch:happ": "hc-spin -n $AGENTS --ui-port $UI_PORT workdir/{{app_name}}.happ",
"start:tauri": "AGENTS=2 npm run network:tauri",
"network:tauri": "hc s clean && npm run build:happ && UI_PORT=8888 concurrently \"npm start -w ui\" \"npm run launch:tauri\" \"holochain-playground\"",
"launch:tauri": "echo \"pass\" | RUST_LOG=warn hc launch --piped -n $AGENTS workdir/{{app_name}}.happ --ui-port $UI_PORT network mdns",
"package": "npm run build:happ && npm run package -w ui && hc web-app pack workdir --recursive",
"build:happ": "npm run build:zomes && hc app pack workdir --recursive",
"build:zomes": "RUSTFLAGS='' CARGO_TARGET_DIR=target cargo build --release --target wasm32-unknown-unknown"
}
0.2
"scripts": {
"start": "AGENTS=2 BOOTSTRAP_PORT=$(port) SIGNAL_PORT=$(port) npm run network",
"network": "hc s clean && npm run build:happ && UI_PORT=8888 concurrently \"npm start -w ui\" \"npm run launch:happ\" \"holochain-playground\"",
"test": "npm run build:zomes && hc app pack workdir --recursive && npm t -w tests",
"launch:happ": "hc-spin -n $AGENTS --ui-port $UI_PORT workdir/{{app_name}}.happ",
"start:tauri": "AGENTS=2 BOOTSTRAP_PORT=$(port) SIGNAL_PORT=$(port) npm run network:tauri",
"network:tauri": "hc s clean && npm run build:happ && UI_PORT=8888 concurrently \"npm start -w ui\" \"npm run launch:tauri\" \"holochain-playground\"",
"launch:tauri": "concurrently \"hc run-local-services --bootstrap-port $BOOTSTRAP_PORT --signal-port $SIGNAL_PORT\" \"echo pass | RUST_LOG=warn hc launch --piped -n $AGENTS workdir/{{app_name}}.happ --ui-port $UI_PORT network --bootstrap http://127.0.0.1:\"$BOOTSTRAP_PORT\" webrtc ws://127.0.0.1:\"$SIGNAL_PORT\"\"",
"package": "npm run build:happ && npm run package -w ui && hc web-app pack workdir --recursive",
"build:happ": "npm run build:zomes && hc app pack workdir --recursive",
"build:zomes": "RUSTFLAGS='' CARGO_TARGET_DIR=target cargo build --release --target wasm32-unknown-unknown"
}
I am not sure whether excluding hc run-local-services
will have any effect in running the happ though
Co-authored-by: Stefan Junker <1181362+steveej@users.noreply.github.com>
Hmm, that's an interesting one @c12i, when I scaffolded today I got a project that has I wonder if it's worth suggesting that people scaffold a project using 0.2 and diff it against their project to see if there are other changes they want? For example this project looks like it might have started from the scaffolding but has diverged quite a bit on scripts so it'd be hard to advise them what to do about resolving differences |
One more thing that might be worth mentioning actually is the Node.js upgrade. People will be on 18 but should ideally move to 20 |
Added Node.js instructions |
Or actually @c12i, maybe I just scaffold a 0.2 app and include the scripts in this doc? Then people can diff against it with a bit less work... that does mean that future updates to the scripts will be missed but it might be a helpful way to get the initial move from 0.1 to 0.2 done smoothly |
Yep this is a very recent change, I assume older happs on Documenting the diff will be tricky indeed, I think what I can suggest would be to add |
Cool, I'll give that a go and see what you think :) |
Should have mentioned the version of |
I can update that, but the command I'm giving will install the latest version of |
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.
looking good now 👍🏽
No description provided.