Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Support supplying ink! version in URL #427

Open
cmichi opened this issue Oct 5, 2022 · 1 comment
Open

Support supplying ink! version in URL #427

cmichi opened this issue Oct 5, 2022 · 1 comment
Labels
enhancement New feature or request priority-high

Comments

@cmichi
Copy link
Collaborator

cmichi commented Oct 5, 2022

We should add support for supplying an ink! version to be used for the playground in the URL. This is necessary to allow links to the playground remain working, independent of us introducing breaking changes in new ink! releases. Generated permalinks should also contain this version. It's also needed for #428.

I suggest to have a URL route a la https://ink-playground.substrate.io/v3.3.1/ and have the playground start up with a Cargo.toml template for that ink! version. Following semver we would only need to have templates for MINOR and MAJOR versions.

@cmichi cmichi added the enhancement New feature or request label Oct 5, 2022
@achimcc
Copy link
Contributor

achimcc commented Oct 5, 2022

Thanks for the suggestion. I have to check how we can implement this, we currently build a docker image for Smart Contract compilation which contains all the cached artifacts which are required for compiling a Smart Contract:

https://github.com/paritytech/ink-playground/blob/main/compiler/Dockerfile#L14

Then later on we use this image to compile the Smart Contract with --offline flag:

https://github.com/paritytech/ink-playground/blob/main/crates/sandbox/src/build_command.rs#L134

I'd assume that the support for all ink! version either requires us to keep caching of all ink! versions in one Docker image, or to provide Docker images for all different ink! versions for compilation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request priority-high
Projects
None yet
Development

No branches or pull requests

2 participants