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

Remove lock file from template and update sdk version #1500

Merged
merged 10 commits into from
Aug 5, 2024
Merged

Remove lock file from template and update sdk version #1500

merged 10 commits into from
Aug 5, 2024

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Jul 29, 2024

Fixes #1498

What

Remove the Cargo.lock file from init template and update sdk version to v21 without specifying a minor/patch version.

Why

We shouldn't be too prescriptive about the dependencies that folks use, such as providing a Cargo.lock file. Cargo will generate a lock file for them at the point in time they generate their template. This will hopefully prevent us from creating any unexpected inconsistencies such as out of sync ed25519-dalek versions (as was reported).

The CLI should always be encouraging use of the latest SDK, no matter the versions of examples. The CLIs job is to setup a workspace ready to go, and if we've lagged on updating examples we gotta get on that rather than keep the CLI on a past version.

We don't need to specify minor versions for the SDK version. Cargo will select the latest available on the first run.

Close #1498

@leighmcculloch leighmcculloch marked this pull request as ready for review July 29, 2024 22:07
@leighmcculloch leighmcculloch enabled auto-merge (squash) July 29, 2024 22:17
@leighmcculloch
Copy link
Member Author

A nodejs test is failing in the e2e tests.

@Ifropc
Copy link
Contributor

Ifropc commented Jul 31, 2024

@willemneal should this be closed? This PR also includes version bump for soroban-sdk

chadoh added a commit to AhaLabs/system-test that referenced this pull request Jul 31, 2024
The system-test started failing in
stellar/stellar-cli#1500 because it finally
updated the version of `soroban-examples` to use a version that includes
stellar/soroban-examples#314. The previous
`invoke.ts` logic assumed that the variable would be a Symbol, but the
variable has been changed to a String.

I don't want to break every project that still uses `system-test` with a
stale `soroban-examples` hash, so here's what I did:

- dynamically define `contract` using `import()`, using a `@ts-ignore`
  directive because this can error if `stellar-sdk` doesn't include a
  `contract` export.
- if `contract` is there, then we don't need to know the type of the
  argument. It could be a Symbol or a String or anything else.
- non-`contract` logic path stays unchanged, assuming `Symbol`
leighmcculloch pushed a commit to stellar/system-test that referenced this pull request Jul 31, 2024
The system-test started failing in
stellar/stellar-cli#1500 because it finally
updated the version of `soroban-examples` to use a version that includes
stellar/soroban-examples#314. The previous
`invoke.ts` logic assumed that the variable would be a Symbol, but the
variable has been changed to a String.

I don't want to break every project that still uses `system-test` with a
stale `soroban-examples` hash, so here's what I did:

- dynamically define `contract` using `import()`, using a `@ts-ignore`
  directive because this can error if `stellar-sdk` doesn't include a
  `contract` export.
- if `contract` is there, then we don't need to know the type of the
  argument. It could be a Symbol or a String or anything else.
- non-`contract` logic path stays unchanged, assuming `Symbol`
@leighmcculloch leighmcculloch enabled auto-merge (squash) August 1, 2024 21:20
@chadoh chadoh enabled auto-merge (squash) August 5, 2024 18:16
@chadoh chadoh merged commit 7902caf into main Aug 5, 2024
26 checks passed
@chadoh chadoh deleted the i1498 branch August 5, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

contract init: incompatible versions of soroban-sdk & soroban-token-sdk
4 participants