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

[fontc] --emit-ir=false leads to TasksFailed([(Be(Font), "IO failure")]) #224

Closed
anthrotype opened this issue Mar 30, 2023 · 3 comments · Fixed by #225 or #261
Closed

[fontc] --emit-ir=false leads to TasksFailed([(Be(Font), "IO failure")]) #224

anthrotype opened this issue Mar 30, 2023 · 3 comments · Fixed by #225 or #261

Comments

@anthrotype
Copy link
Member

fontc has an --emit-ir flag which is true by default, however it doesn't seem to be possible to disable it.
I tried --no-emit-r or --emit-ir=false but didn't work. Passing --emit-ir does nothing different than not passing one at all, since the default is already true.

Should the default be false maybe? Or maybe it can be true but use clap's ArgAction::SetFalse?

@anthrotype
Copy link
Member Author

If I set the default_value = false, then I get another error:

$ cargo run -p fontc -- --source resources/testdata/static.designspace
    Finished dev [unoptimized + debuginfo] target(s) in 0.13s
     Running `target/debug/fontc --emit-ir --source resources/testdata/static.designspace`
2023-03-30T16:30:52.628124Z: ThreadId(1): ERROR: Be(Font) failed Be(IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" }))
Error: TasksFailed([(Be(Font), "IO failure")])

@rsheeter
Copy link
Contributor

https://stackoverflow.com/questions/60458705/how-do-i-specify-a-boolean-command-line-flag-using-clap seems to support the theory bools need to default false and then get turned on by flag. That's annoying because Google best practice is to avoid negative flags but this seemingly leads you directly there, e.g. we would make the arg no_ir, default false, if you pass it we don't emit ir.

@anthrotype anthrotype reopened this Mar 30, 2023
@anthrotype anthrotype changed the title [fontc] --emit-ir flag is always true, can't disable from command line [fontc] --emit-ir=false leads to TasksFailed([(Be(Font), "IO failure")]) Mar 30, 2023
@anthrotype
Copy link
Member Author

keeping open until we fix the TasksFailed([(Be(Font), "IO failure")]) error that is uncovered by using --emit-ir=false (see #224 (comment))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants