golem icon indicating copy to clipboard operation
golem copied to clipboard

golem::upgrade()

Open ColinFay opened this issue 3 years ago • 1 comments

If you work again on an old app that has been built with an older version of {golem}, it could be nice to be able to "upgrade" to newest features (for example new version of run_dev, etc.)

Check for :

  • dev folder
  • app_config
  • inst/golem-config
  • app_ui & app_server
  • old deprecated functions like golem::js()

ColinFay avatar Jul 28 '21 10:07 ColinFay

Happy to work on this thing because I keep pulling the dev version for golem for my own Apps quite often!!!

But I might need a bit of an outline on how you'd like this to be structured @ColinFay . Specifically,

  1. dev folder, app_config: simply replacing new file versions with old file version should do the trick I think
  2. inst/golem-config: could be tricky; make a diff, and only add new fields from new golem version, not changing other fields; still the App may not be that "old" and, for whatever reasons, the user might delete fields on purpose yet golem::upgrade() would identify them as missing and erroneously add them back again...
  3. app_ui and app_server: would not touch those at all, because that is something App specific? I am probably confused here ...
  4. deprecated stuff e.g. golem::js(): a lookup-table of deprecated stuff (with version numbers) may be needed to check this explicitly but one may want this implemented at the very end, since a namespace error a-la "coudl not find function XXX" is thrown anyway ...

Maybe a list of deprecated features (across versions) should be made for 1. and 2. , and golem::upgrade can check for the old version to make the exchange specific. This really depends on how feature-rich you want the functionality to be.

That said, having a list of added features/deprecations somewhere in a yaml/json file might be useful for golem in general and one could start building such from this issue onwoards.

What do you think?

ilyaZar avatar Mar 28 '23 14:03 ilyaZar