Skip to content

feat!: Use semver::Version instead of custom type#71

Merged
willemneal merged 3 commits intomainfrom
feat/use_proper_version_type
May 23, 2025
Merged

feat!: Use semver::Version instead of custom type#71
willemneal merged 3 commits intomainfrom
feat/use_proper_version_type

Conversation

@willemneal
Copy link
Member

Since Cargo.toml stores versions as strings and users will expect to be able to use them directly when passing a version, this PR uses strings as inputs and stores the versions as strings. It also uses the semver crate to validate that the input version strings and to ensure that a publish can only publish a version that is greater than the most recent one!

This also has the added benefit of handling any version type cargo supports such as prereleases!

@BlaineHeffron BlaineHeffron self-requested a review May 22, 2025 21:46
Copy link
Contributor

@BlaineHeffron BlaineHeffron left a comment

Choose a reason for hiding this comment

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

Looks good but there is a failing check.

While semver is no_std, it still requires an allocator. Furthermore wasm32v1-none doesn't support std. And the initial implementation of alloc in the soroban_sdk required the use of `extern crate std`. This was fixed in the newest version of the soroban-sdk but we need to update the loam-sdk to handle this change. So for now can ship the same allocator implementation soroban-sdk provides. Once updated we can remove it.
@willemneal willemneal force-pushed the feat/use_proper_version_type branch from 4b1dfca to 10c331b Compare May 23, 2025 00:41
@willemneal willemneal merged commit 61b4fb6 into main May 23, 2025
2 checks passed
@willemneal willemneal deleted the feat/use_proper_version_type branch May 23, 2025 05:04
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.

2 participants