← Back to team overview

ubuntu-accomplishments-contributors team mailing list archive

Re: Maintaining State


Although I have nothing againist (2) and would consider it as part of
refining the API, I an unsure about the problem involved in (1).

Considering the case of a just-validated accomplishment I have to
admit that I fail to see why the number of unlocked accomplishments
should anyhow depend on whether the scripts are being run or not.
My point is that, apart from how the dependency checking is
implemented now, in theory it is possible to determine the number of
newly unlocked accomplishments without caring about the state
(running/not). This is not possible using our current implementation,
but I consider it that way: whenever a trophy gets validated, the
daemon should check which accomplishments have just been unlocked by
the fact od that trophy being validated, and report them to the user.

Maybe I am missing something, but I just have a feeling we are doing
something wrong, as unlocking trophies is done in two phases (when
scripts are run and when asc file is got), which will always lead to
race conditions. Shouldn't we do that in one place, and thus avoid
using all there global variables used as hints left by run_scripts?

Follow ups