charpente icon indicating copy to clipboard operation
charpente copied to clipboard

upgrade_dependency

Open DivadNojnarg opened this issue 5 years ago • 5 comments

This function should look for the latest version on CDN and download file if the tag are differents. Moreover, it is better to keep a copy of old deps in a backup folder. Upgrading rarely works without issues ...

DivadNojnarg avatar Sep 04 '20 08:09 DivadNojnarg

Yes you're right, not an easy task though. Should the dependency back-up be kept outside the inst directory? This could quickly become heavy with files that are not used in the package and should not be installed/downloaded by users.

JohnCoene avatar Sep 04 '20 09:09 JohnCoene

We could create a temp file and ask the user if if wants to save it: we can put a command in the console to copy and paste

DivadNojnarg avatar Sep 04 '20 09:09 DivadNojnarg

Comparing version is going to be complex: packages follow different rules and we can't check all of them:

  • 3.0.0-rc.6 (admin-lte)
  • 1.0.0-alpha.7 (tabler)
  • 5.0.0-alpha1 (bootstrap)
  • 16.0.0-experimental-def3445 (react) (we very unlikely want react but we may imagine other doing like this)

Maybe we reject alpha/beta/rc versions. What do you think @JohnCoene?

Otherwise I suggest to overwrite everything instead of writing an exotic script and ask for confirmation like in devtools or usethis ...

DivadNojnarg avatar Sep 04 '20 15:09 DivadNojnarg

upgrade rename to update to allow downgrade option (possible during development)

DivadNojnarg avatar Sep 04 '20 16:09 DivadNojnarg

Argh. Hard to tell what's best here.

JohnCoene avatar Sep 04 '20 16:09 JohnCoene