# up_trigger everything on major/minor version updates

if spell_ok "${SPELL}"; then
  local OLD_SPELL_VERSION="$(installed_version ${SPELL})" &&

  if test "${VERSION%.?}" != "${OLD_SPELL_VERSION%.?}"; then
    message "${MESSAGE_COLOR}This is a possibly incompatible update of ${SPELL}..." &&
    message "Figuring out what spells need to be recast, this may take a while.${DEFAULT_COLOR}" &&

    local dependees="$(show_up_depends ${SPELL} 1)" &&

    for each in ${dependees}; do
      up_trigger "${each}" cast_self
    done
  fi
fi
