From: Dima K. <no...@di...> - 2014-07-06 04:41:58
|
Jeff Backus <jef...@gm...> writes: > On Sat, Jul 05, 2014 at 12:07:08AM -0700, Dima Kogan wrote: >>Arnout Engelen <ar...@bz...> writes: >>> >>> Is anyone aware of any applications that solve this tension >>> gracefully? >>> I.e. by prompting users on upgrade, perhaps telling them what changed and >>> asking them whether they want to accept that change in their configuration? > > Unfortunately, this is a lot easier for most programs, as they have a > very finite "config domain", whereas Notion's config domain is not very > finite due to fact that options are variables set via Lua scripts. We > might be able to better automate handling changes to the config domain > if we used a "config manager" or similar construct. i.e. instead of: > focuslist_insert_delay = 5 > do: > conf_manager('focuslist_insert_delay', 5) > which would allow us to better track how a user is configuring Notion > and to notify them of useful changes specific to their use-case. > > Another option might be to provide the user with a way to dump the Lua > namespace and compare it against the "new hotness". Not very graceful, > or user-friendly, though. I'm not sure conf_manager helps you here. If a user isn't using the defaults, but sets their own variable value, then us changing the defaults has no effect. If the user IS using the defaults, then they will not have "x=5" or "conf_manager('x',5)" lines, and they would see the change. There's much to say about all this, but it sounds very tricky to make large changes like this without breaking the config of at least somebody, so I'm inclined to mostly keep things the way they are and simply announce breaking changes with clear instructions on how to move back to the way things were. >>Anybody got better ideas? > > Actually, a simple way we might be able to approximate Debian's NEWS > files on a distro-independent basis is to maintain a similar file gets > tucked away somewhere on the system. When Notion starts, it check > ~/.notion to for the file. If it doesn't exist or differs then Notion > could display the contents of the system-wide one then save a copy in > ~/.notion, similar to what happens with the welcome message for new > users. > > If we gzip or bzip2 the file, it should be pretty small and a binary > comparison should be pretty quick. Plus, it wouldn't be dependent on > version numbers (i.e. supports installing from git), as long as we were > diligent about updating it as we hack away at the codebase. > > The location of the system-wide file may need to be a compile option to > allow flexibility distro to distro and source installs. I dunno, just a > thought. Sounds reasonable. It could work exactly like the welcome message: shown just once. |