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

Move printing errors to nargo_cli #1537

Closed
kevaundray opened this issue Jun 5, 2023 · 2 comments · Fixed by #1598
Closed

Move printing errors to nargo_cli #1537

kevaundray opened this issue Jun 5, 2023 · 2 comments · Fixed by #1598
Labels
enhancement New feature or request nargo Noir's CLI development tool

Comments

@kevaundray
Copy link
Contributor

Problem

Currently errors are printed in noirc_driver to stdout, which is counter-intuitive for a crate that should be a library.

Happy Case

We can move the printing of errors to nargo_cli instead

Alternatives Considered

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@kevaundray kevaundray added the enhancement New feature or request label Jun 5, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Jun 5, 2023
@kevaundray kevaundray added the nargo Noir's CLI development tool label Jun 5, 2023
@ghost
Copy link

ghost commented Jun 5, 2023

I will take care of it. Do I need to remove the printing from those places, right?

let main = match self.main_function() {
Ok(m) => m,
Err(e) => {
println!("cannot compile a program with no main function");
return Err(e);
}
};

let error = reporter::report(files, &err.into(), file, options.deny_warnings);
reporter::finish_report(error as u32)?;

Try introducing a new error type.

@kevaundray
Copy link
Contributor Author

@f01dab1e

I will take care of it. Do I need to remove the printing from those places, right?

Those print lines can stay for now, its mostly just about removing the error printing in noirc_driver and having the caller do the printing.

Try introducing a new error type.

Yeah I think we need to think about the Diagnostic and CustomDiagnostic types and whether the caller needs to have a FileManager.

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request nargo Noir's CLI development tool
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant