aeternity / aeproject

Testing framework for Sophia Smart Contract development.
https://docs.aeternity.com/aeproject
ISC License
28 stars 18 forks source link

dynamically use latest major version on `init` #437

Open marc0olo opened 2 years ago

marc0olo commented 2 years ago

in the past we had latest tag for both, compiler & node. this recently lead us to a problem with SDK incompatibility to latest compiler version v7.0.1

I think it makes sense to fetch latest (major) release on project initialization. if e.g. aeproject would define 6 for node and 6 for the compiler it should replace the tags accordingly in docker-compose.yml (which we recently introduced here: https://github.com/aeternity/aeproject/pull/432)

aeproject would then use the version defined in docker-compose.yaml by default to start the environment. only if options nodeVersion or compilerVersion is provided a custom version should be used.

this way we would ensure that a user doesn't run into unforeseen problems.

@thepiwo what do you think?

thepiwo commented 2 years ago

I would like it as discussed in the other issue, but there is no such tag yet as far as I know

marc0olo commented 2 years ago

I think we won't get the tag as we discussed 😅

also I see one small issue with the other approach. in case of new releases docker wouldn't automatically download the new node version if not explicitly forced by the user.

thepiwo commented 2 years ago

yes it would, as we use pull in the env command

marc0olo commented 2 years ago

yes it would, as we use pull in the env command

ok, that's good to know. anyway, I doubt we will see tags like 6 or 7 on dockerhub based on recent discussion.

using the proposed approach here we would definitely avoid unexpected results based on implicit infrastructure changes. we'd always select the version when the project is initialized and then leave it up to the devs to update node/compiler. I actually like that