-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(cli): reorganize main.rs and split workers #8495
Conversation
} | ||
DenoSubcommand::Types => { | ||
let types = get_types(flags.unstable); | ||
if let Err(e) = write_to_stdout_ignore_sigpipe(types.as_bytes()) { | ||
eprintln!("{}", e); | ||
std::process::exit(1); | ||
} | ||
return; | ||
std::process::exit(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fine for now, but ideally we would architect it so that exit
is not called deeper inside the system
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, I'm still looking for proper patterns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Factored out
init_v8_flags
,init_logger
andget_subcommand
frommain
function.Also
Worker
was removed in favor of moving logic toMainWorker
andWebWorker
respectively.
Towards #8381