Drop use of @serializable and exit, which are deprecated and will
be removed in 2.11.