-
Notifications
You must be signed in to change notification settings - Fork 8
Simplify commands used in README instructions #62
Conversation
Here is how it currently fails (because $ yarn start
yarn run v1.22.5
$ concurrently --kill-others -c "bgBlue.bold,bgMagenta,bgYellow.bold" --names "SIM,DEP,UI " "yarn start:sim" "yarn start:deploy" "yarn start:ui"
$ agoric deploy contract/deploy.js api/deploy.js
$ agoric start --reset
$ cd ui && yarn start
$ parcel serve --host=127.0.0.1 --port=3000 public/index.html
[DEP] Open CapTP connection to ws://127.0.0.1:8000/private/captp...agoric: start: removing _agstate/agoric-servers/dev
[SIM] agoric: start: rm -rf _agstate/agoric-servers/dev
[SIM] agoric: start: initializing dev
[SIM] agoric: start: /Users/michael/agoric/dapp-fungible-faucet/node_modules/@agoric/solo/src/entrypoint.js init dev --egresses=fake --webport=8000
[UI ] Server running at http://127.0.0.1:3000
[UI ] ✨ Built in 7ms
[SIM] agoric: start: setting sim chain with 0 second delay
[SIM] agoric: start: /Users/michael/agoric/dapp-fungible-faucet/node_modules/@agoric/solo/src/entrypoint.js set-fake-chain --delay=0 sim-chain
[DEP] .agoric: start: /Users/michael/agoric/dapp-fungible-faucet/node_modules/@agoric/solo/src/entrypoint.js start
[DEP] ......Loading makeSlogSender from @agoric/telemetry/src/flight-recorder.js
[SIM] (Error#1)
[SIM] Error#1: spawn /Users/michael/agoric/dapp-fungible-faucet/node_modules/@agoric/xsnap/xsnap-native/xsnap/build/bin/mac/release/xsnap-worker ENOENT
[SIM]
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[SIM] yarn start:sim exited with code 255
--> Sending SIGTERM to other processes..
[DEP] yarn start:deploy exited with code 1
--> Sending SIGTERM to other processes..
[UI ] yarn start:ui exited with code 1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
snow:dapp-fungible-faucet michael$ |
After Now I was able to run the README instructions to completion (contract successfully deployed), and the next broken thing appeared to be a problem with running an older I call this a victory. |
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.
Use getting-started-dev
instead of beta
1346578
to
1e3f6f4
Compare
1e3f6f4
to
b6a1921
Compare
c2c1579
to
c4698b6
Compare
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.
Quick review. Looks great so far. I have to dig out my notes of when I went through the same a couple month ago.
run: | | ||
if ${{ steps.get-branch.outputs.result == 'NONE' }}; then | ||
yarn install | ||
echo "AGORIC_CMD=[\"$PWD/node_modules/.bin/agoric\"]" >> $GITHUB_ENV |
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.
Is there a way we can avoid this workaround? What is it needed for anyway?
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 agoric-cli/tools integration test needs to know how to find the CLI, and it defaults to using the PATH. I didn't want to munge with the $GITHUB_PATH
file, so I used the same $AGORIC_CMD
environment variable that the agoric-sdk/scripts/registry.sh
uses.
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.
Oh I didn't see this used anywhere, so I thought it was a magic env
@@ -1,5 +1,5 @@ | |||
{ | |||
"name": "dapp-fungible-faucet-api", | |||
"name": "@agoric/dapp-fungible-faucet-api", |
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 kinda wish we used another scope for these example dapps
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.
Why? The names get replaced when people do npm create
or agoric init
.
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 guess if these packages are never published to NPM, that's fine.
api/package.json
Outdated
"dependencies": { | ||
"@endo/eventual-send": "^0.15.5", | ||
"@endo/marshal": "^0.6.9", | ||
"@agoric/dapp-fungible-faucet-ui": "^0.0.1", |
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 API having a dependency on the UI seems backwards
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 can try to flip this around, but it was this way when I arrived 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.
Yeah it's out of scope, but maybe we should have an issue to track
@@ -55,7 +57,8 @@ | |||
"eslintConfig": { | |||
"extends": [ | |||
"@agoric" | |||
] | |||
], | |||
"parser": "@typescript-eslint/parser" |
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.
👍
api/deploy.js
Outdated
// Agoric Dapp api deployment script | ||
|
||
import fs from 'fs'; | ||
import { E } from '@endo/eventual-send'; | ||
import '@agoric/zoe/exported.js'; | ||
|
||
import installationConstants from '../ui/public/conf/installationConstants.js'; | ||
import installationConstants from "@agoric/dapp-fungible-faucet-ui/public/conf/installationConstants.js"; |
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.
Oh that's the dependency. Yeah this really feels backwards
c4698b6
to
c164203
Compare
For reference, I had done something similar to dapp-card-store a couple month ago, but our approach on a some deps seem to have been different in a couple places: Agoric/dapp-card-store@main...mhofman/npm-latest |
122bc74
to
5963316
Compare
@dckc another set of dapp work for NPM compatibility during the hackathon |
I'd be inclined to mothball (archive) this dapp. I don't think it's worth maintaining. |
I'm closing this one since we're not putting more energy into dapp-fungible-faucet. The history here might be useful for someone in the future, though. |
Lightly tested, but this is the approach I'd like to take.
@sufyaankhan, please take a look at README.md for how this architecture simplifies the flow.
Recommendations appreciated.