-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: add new build_clients logic #42
Conversation
b586455
to
c300072
Compare
0749a78
to
5a225fe
Compare
2c53ccf
to
e9aad79
Compare
75ab168
to
4a3f8c5
Compare
80e406d
to
92ec38d
Compare
676960f
to
6f74c29
Compare
c9a8121
to
78fe5e8
Compare
|
||
#[derive(Debug, serde::Deserialize, Clone)] | ||
#[serde(rename_all = "kebab-case")] | ||
pub struct Network { |
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 is defined in the soroban-cli crate.
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 think we should keep our own definition. Ours is describing the format of the environments.toml
file, which already differs slightly from the definition in stellar-cli (name
vs network
), and which may deviate more in the future. Additionally, the one in stellar-cli does not derive serde::Deserialize
, and there's not really a reason for it to do so.
78fe5e8
to
3d5104c
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.
Couple of design questions.
always run `build-clients` at the end of `build`. If no `environments.toml` file is found, it's a no-op. adds integration tests at `crates/loam-cli/tests` doesn't do a lot of things, but it works! notably, it does not: - check if accounts are already created/funded - check if contracts are already created/using correct wasm hash - run `init` commands for contract - add `--env` argument to `loam build`; can only set this with `LOAM_ENV` environment variable - test non-`"production"` environment settings Co-authored-by: Willem Wyndham <[email protected]>
3d5104c
to
491ad6a
Compare
All addressed, thank youuuuuu |
Fixes #58
At the end of a
loam build
run, it will now runbuild_clients
logic. This looks for anenviroments.toml
file like the kind shown in loambuild/frontend, and automatically gets a frontend to a point where it would be ready to run. For example, running with theenvironments.toml
file shown in the newtests/it/build_clients/contracts.rs
file here, you get this output:(we might want to consider suppressing the stdout output of
soroban contract bindings typescript
by default)Still simplistic
This is a good-enough starting point, and I'd like to merge it now so other people can help with some improvements. Right now, this logic is no better than the
initialize.js
script in soroban-astro-template. Notably, it does not:init
commands for contracts #74contracts.cargo-workspace
shortcut #75staging
andproduction
, require contracts to be IDs #76