golem
golem copied to clipboard
golem::upgrade()
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()
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,
- dev folder,
app_config
: simply replacing new file versions with old file version should do the trick I think -
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 yetgolem::upgrade()
would identify them as missing and erroneously add them back again... -
app_ui
andapp_server
: would not touch those at all, because that is something App specific? I am probably confused here ... - 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?