stellar / soroban-example-dapp

End-to-End Example Soroban Dapp
Apache License 2.0
1.05k stars 853 forks source link

initialize.sh compiles in /target folder but then is looking in /target-tiny #58

Closed esteblock closed 1 year ago

esteblock commented 1 year ago

What did you do?

./initialize.sh sandbox

What did you expect to see?

Contracts deploy sucessfully

What did you see instead?

got the following result:

Deploy the token contract
Build the crowdfund contract
cargo fmt --all
cargo build --target wasm32-unknown-unknown --release

---

Finished release [optimized] target(s) in 34.23s
cd target/wasm32-unknown-unknown/release/ && \
    for i in *.wasm ; do \
        ls -l "$i"; \
    done
-rwxrwxr-x 2 user user 8731 nov 16 hh:hh soroban_crowdfund_contract.wasm
Deploy the crowdfund contract
error: reading file target-tiny/wasm32-unknown-unknown/release/soroban_crowdfund_contract.wasm: No such file or directory (os error 2)

This is because in initialize.sh line 53 is calling make build and not `make

I think that for example porpose, needs to stay as make build and hence, change in initialize.sh to look into /targetfolder, and not into /target-tiny folder

esteblock commented 1 year ago

I saw that this was added here: https://github.com/stellar/soroban-example-dapp/pull/44/

However stills calls to make build and not make build-optimized

If we wanna use make build-optimizedwe also need to add on the instructions to Install Rust nightly

https://soroban.stellar.org/docs/tutorials/build-optimized

esteblock commented 1 year ago

As is intend to be for begginers, I suggest not to use optimizing builds. Created PR

paulbellamy commented 1 year ago

Makes sense, especially given https://github.com/stellar/soroban-tools/pull/236

paulbellamy commented 1 year ago

Closed in https://github.com/stellar/soroban-example-dapp/pull/60