Skip to content

Separate EnvBase testutils functions into a separate trait #1570

@leighmcculloch

Description

@leighmcculloch

We should break EnvBase up into two traits, one that is non-testutils functionality, and one that is testutils functionality.

So that when dependencies import the soroban-env-host with testutils enabled, or not enabled, the function set of EnvBase doesn't change, which requires upstream dependencies to propogate the testutils feature upwards.

This issue was encountered in stellar/rs-soroban-sdk#1476:

Features on traits, like EnvBase, inherently create situations where dependencies can get stuck in situations where they are incompatible because another dep might be dependent on the trait in the opposite state. We should probably revisit EnvBase's liberal use of features, breaking it up into separate traits. Rust features should always be, where possible, additively compatible.

cc @stellar/contract-committers @fnando

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions