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

Improve clarinet requirement handling #1655

Open
hugocaillard opened this issue Feb 1, 2025 · 2 comments
Open

Improve clarinet requirement handling #1655

hugocaillard opened this issue Feb 1, 2025 · 2 comments

Comments

@hugocaillard
Copy link
Collaborator

hugocaillard commented Feb 1, 2025

Context

Clarinet requires developers to manually add requirements with:

clarinet requirements add <contract principal>

Clarinet will fetch the contract on mainnet on testnet, detect all of requirements dependencies (other contract fetched by the requirements)

Caveats

  • Developers can often forget to do so
    • It's even more easy to forgot to remove a dependency that was wrongly added (or not needed anymore)
  • In the context of remote data fetching (Mainnet Execution Simulation #1503), it's possible that a contract is in the requirements (making clarinet check valid), but was actually deployed at a higher height than the once specified in the remote data settings

Ideas

  • Clarinet could aumatically detect local contract dependencies and load them, without the need to manually add or list requirements in the manifest. We could fully remove the concept of "dependencies"
  • If remote_data is enabled, clarinet should check that the mainnet/testnet dependencies are valid (available on the right network and deployed at a height lower than the one specified in the remote data settings)
    • the remote data fetching and requirements features kind of overlap (in simnet but not devnet), explore how to reconcialiate both
@obycode
Copy link
Member

obycode commented Feb 6, 2025

Agreed, I think this makes it easier for users with not much downside. Maybe clarinet can output some info about dependencies that it is pulling in whenever it adds a new contract into the deployment plan, so that way users can still notice that they are interacting with additional contracts.

@hugocaillard
Copy link
Collaborator Author

Maybe clarinet can output some info about dependencies that it is pulling in whenever it adds a new contract into the deployment plan

Good point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants