Skip to content
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

Add iospec #51

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
197 changes: 192 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ task-maker-cache = { path = "./task-maker-cache" }
task-maker-exec = { path = "./task-maker-exec" }
task-maker-lang = { path = "./task-maker-lang" } # needed only by typescriptify
task-maker-format = { path = "./task-maker-format" }
task-maker-iospec = { path = "./task-maker-iospec" }

# Logging and setting up the global logger
log = "0.4"
Expand Down
5 changes: 5 additions & 0 deletions src/tools/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ use task_maker_rust::tools::task_info::main_task_info;
use task_maker_rust::tools::typescriptify::main_typescriptify;
use task_maker_rust::tools::worker::main_worker;

use task_maker_iospec::tools::*;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really like wildcard imports in general, maybe here it's fine, but my feelings about them are not great.
Apart from the obvious "they bring more than what is actually needed", I dislike them because it makes reading the code without an IDE with "Go to definition" support pretty much impossible (especially when more wildcards are used in the same file).

I don't want to ban them (there are still few good use cases, like for "prelude"s), but I always try to avoid them.

(I mention this here, and skip all the following instances of it)


fn main() {
let base_opt = Opt::parse();
base_opt.logger.enable_log();
Expand All @@ -30,6 +32,9 @@ fn main() {
Tool::Booklet(opt) => main_booklet(opt, base_opt.logger),
Tool::FuzzChecker(opt) => main_fuzz_checker(opt),
Tool::AddSolutionChecks(opt) => main_add_solution_checks(opt, base_opt.logger),
Tool::IospecCheck(opt) => iospec_check::do_main(opt, &mut std::io::stderr()),
Tool::IospecGen(opt) => iospec_gen::do_main(opt, &mut std::io::stderr()),
Tool::IospecGenAll(opt) => iospec_gen_all::do_main(opt, &mut std::io::stderr()),
Tool::InternalSandbox => return task_maker_rust::main_sandbox(),
}
.nice_unwrap()
Expand Down
Loading