fn to_compile_mode(intent: UserIntent) -> CompileMode
Converts UserIntent to CompileMode for root units.
UserIntent
CompileMode