Skip to content
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

put local sdks into the .soroban directory and attempt to link to them #122

Merged
merged 5 commits into from
Jul 7, 2023

Conversation

kalepail
Copy link
Contributor

@kalepail kalepail commented Jul 6, 2023

No description provided.

@kalepail kalepail requested a review from paulbellamy July 6, 2023 20:01
@kalepail kalepail marked this pull request as ready for review July 6, 2023 20:10
"setup": "./initialize.sh ${NETWORK:-futurenet} && npm install",
"clean": "rm -rf .next .soroban .soroban-example-dapp node_modules target",
"reset": "npm run clean && npm run setup",
"postinstall": "rm -rf ./.soroban/crowdfund-contract && rm -rf ./.soroban/abundance-token && ./target/bin/soroban contract bindings typescript --wasm ./target/wasm32-unknown-unknown/release/soroban_crowdfund_contract.wasm --id $(cat ./.soroban-example-dapp/crowdfund_id) --output-dir ./.soroban/crowdfund-contract --network $(cat ./.soroban-example-dapp/network) --contract-name crowdfund-contract && ./target/bin/soroban contract bindings typescript --wasm ./target/wasm32-unknown-unknown/release/abundance_token.wasm --id $(cat ./.soroban-example-dapp/abundance_token_id) --output-dir ./.soroban/abundance-token --network $(cat ./.soroban-example-dapp/network) --contract-name abundance-token"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including the rm of any existing contract sdks due to this bug stellar/stellar-cli#752

@paulbellamy paulbellamy merged commit 1dab5f8 into main Jul 7, 2023
5 checks passed
@paulbellamy paulbellamy deleted the local-sdks-as-npm-deps branch July 7, 2023 15:35
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"postinstall": "./target/bin/soroban contract bindings typescript --wasm ./target/wasm32-unknown-unknown/release/soroban_crowdfund_contract.wasm --id $(cat ./.soroban-example-dapp/crowdfund_id) --output-dir ./node_modules/crowdfund-contract --network $(cat ./.soroban-example-dapp/network) --contract-name crowdfund-contract && ./target/bin/soroban contract bindings typescript --wasm ./target/wasm32-unknown-unknown/release/abundance_token.wasm --id $(cat ./.soroban-example-dapp/abundance_token_id) --output-dir ./node_modules/abundance-token --network $(cat ./.soroban-example-dapp/network) --contract-name abundance-token"
"setup": "./initialize.sh ${NETWORK:-futurenet} && npm install",
"clean": "rm -rf .next .soroban .soroban-example-dapp node_modules target",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove target? If I set up a symlink to local soroban in target/bin, this blows it away, and I'm not sure it gives much benefit.

chadoh added a commit to AhaLabs/soroban-example-dapp that referenced this pull request Jul 20, 2023
Roll back stellar#122, but
keep `crowdfund-contract` and `abundance-token` in
`optionalDependencies`.

As I worked with the old version in earnest, iterating on a local copy
of the CLI and generating new JS libs over and over, the two-step
generate-to-.soroban, then install-to-node_modules wasn't working very
well. Probably because the new library wasn't being added until the
`postinstall` step, and the dependencies are optional.

Generating directly to `node_modules` feels dirty, but it works
consistently. At least in this version, you can still see the
dependencies listed in the `optionalDependencies` section, so they're
not quite as surprising/mysterious.
chadoh added a commit to AhaLabs/soroban-example-dapp that referenced this pull request Jul 20, 2023
Roll back stellar#122, but
keep `crowdfund-contract` and `abundance-token` in
`optionalDependencies`.

As I worked with the old version in earnest, iterating on a local copy
of the CLI and generating new JS libs over and over, the two-step
generate-to-.soroban, then install-to-node_modules wasn't working very
well. Probably because the new library wasn't being added until the
`postinstall` step, and the dependencies are optional.

Generating directly to `node_modules` feels dirty, but it works
consistently. At least in this version, you can still see the
dependencies listed in the `optionalDependencies` section, so they're
not quite as surprising/mysterious.
chadoh added a commit to AhaLabs/soroban-example-dapp that referenced this pull request Jul 21, 2023
Roll back stellar#122, but
keep `crowdfund-contract` and `abundance-token` in
`optionalDependencies`.

As I worked with the old version in earnest, iterating on a local copy
of the CLI and generating new JS libs over and over, the two-step
generate-to-.soroban, then install-to-node_modules wasn't working very
well. Probably because the new library wasn't being added until the
`postinstall` step, and the dependencies are optional.

Generating directly to `node_modules` feels dirty, but it works
consistently. At least in this version, you can still see the
dependencies listed in the `optionalDependencies` section, so they're
not quite as surprising/mysterious.
chadoh added a commit to AhaLabs/soroban-example-dapp that referenced this pull request Jul 21, 2023
Roll back stellar#122, but
keep `crowdfund-contract` and `abundance-token` in
`optionalDependencies`.

As I worked with the old version in earnest, iterating on a local copy
of the CLI and generating new JS libs over and over, the two-step
generate-to-.soroban, then install-to-node_modules wasn't working very
well. Probably because the new library wasn't being added until the
`postinstall` step, and the dependencies are optional.

Generating directly to `node_modules` feels dirty, but it works
consistently. At least in this version, you can still see the
dependencies listed in the `optionalDependencies` section, so they're
not quite as surprising/mysterious.
chadoh added a commit to AhaLabs/soroban-example-dapp that referenced this pull request Aug 8, 2023
Roll back stellar#122, but
keep `crowdfund-contract` and `abundance-token` in
`optionalDependencies`.

As I worked with the old version in earnest, iterating on a local copy
of the CLI and generating new JS libs over and over, the two-step
generate-to-.soroban, then install-to-node_modules wasn't working very
well. Probably because the new library wasn't being added until the
`postinstall` step, and the dependencies are optional.

Generating directly to `node_modules` feels dirty, but it works
consistently. At least in this version, you can still see the
dependencies listed in the `optionalDependencies` section, so they're
not quite as surprising/mysterious.
chadoh added a commit to AhaLabs/soroban-example-dapp that referenced this pull request Aug 8, 2023
Roll back stellar#122, but
keep `crowdfund-contract` and `abundance-token` in
`optionalDependencies`.

As I worked with the old version in earnest, iterating on a local copy
of the CLI and generating new JS libs over and over, the two-step
generate-to-.soroban, then install-to-node_modules wasn't working very
well. Probably because the new library wasn't being added until the
`postinstall` step, and the dependencies are optional.

Generating directly to `node_modules` feels dirty, but it works
consistently. At least in this version, you can still see the
dependencies listed in the `optionalDependencies` section, so they're
not quite as surprising/mysterious.
paulbellamy pushed a commit that referenced this pull request Aug 11, 2023
* build: directly generate js libs to node_modules

Roll back #122, but
keep `crowdfund-contract` and `abundance-token` in
`optionalDependencies`.

As I worked with the old version in earnest, iterating on a local copy
of the CLI and generating new JS libs over and over, the two-step
generate-to-.soroban, then install-to-node_modules wasn't working very
well. Probably because the new library wasn't being added until the
`postinstall` step, and the dependencies are optional.

Generating directly to `node_modules` feels dirty, but it works
consistently. At least in this version, you can still see the
dependencies listed in the `optionalDependencies` section, so they're
not quite as surprising/mysterious.

* build: try adding back optionalDeps

* build: update node; use preinstall and local deps

* Update package-lock.json

* work around a bug in the binding gen

---------

Co-authored-by: Chad Ostrowski <[email protected]>
maxymkotko added a commit to maxymkotko/Soroban-dApp that referenced this pull request Dec 13, 2023
* build: directly generate js libs to node_modules

Roll back stellar/soroban-example-dapp#122, but
keep `crowdfund-contract` and `abundance-token` in
`optionalDependencies`.

As I worked with the old version in earnest, iterating on a local copy
of the CLI and generating new JS libs over and over, the two-step
generate-to-.soroban, then install-to-node_modules wasn't working very
well. Probably because the new library wasn't being added until the
`postinstall` step, and the dependencies are optional.

Generating directly to `node_modules` feels dirty, but it works
consistently. At least in this version, you can still see the
dependencies listed in the `optionalDependencies` section, so they're
not quite as surprising/mysterious.

* build: try adding back optionalDeps

* build: update node; use preinstall and local deps

* Update package-lock.json

* work around a bug in the binding gen

---------

Co-authored-by: Chad Ostrowski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants