In stellar contract init we are currently ignoring the workspace Cargo.toml that is included in the frontend template. We also did not want to blindly overwrite the existing, base Cargo.toml file with the one from the template. This issue is proposing to update stellar contract init so that when a user passes in --frontend-template the CLI will give them an option for any conflicting files if they want to overwrite them with the FE template version or not.
The main motivation for this change is so that loam init can expect that the workspace Cargo.toml file that is in the loam frontend template is the one that will be used. The current stellar contract init implementation does not include the frontend template's Cargo.toml file. We had to do some workaround to replace soroban-sdk with loam-sdk and add loam-subcontract-core in https://github.com/loambuild/loam/pull/120/files so that loam init could use soroban contract init under the hood, and still work in creating a loam project.
This came from this conversation: https://github.com/loambuild/loam/pull/120#discussion_r1681790077
In
stellar contract init
we are currently ignoring the workspace Cargo.toml that is included in the frontend template. We also did not want to blindly overwrite the existing, base Cargo.toml file with the one from the template. This issue is proposing to updatestellar contract init
so that when a user passes in--frontend-template
the CLI will give them an option for any conflicting files if they want to overwrite them with the FE template version or not.The main motivation for this change is so that
loam init
can expect that the workspace Cargo.toml file that is in the loam frontend template is the one that will be used. The currentstellar contract init
implementation does not include the frontend template's Cargo.toml file. We had to do some workaround to replacesoroban-sdk
withloam-sdk
and addloam-subcontract-core
in https://github.com/loambuild/loam/pull/120/files so thatloam init
could usesoroban contract init
under the hood, and still work in creating a loam project.