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

Disallow prints in all crates #664

Merged
merged 1 commit into from
Oct 5, 2023
Merged
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
2 changes: 2 additions & 0 deletions airgen/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! Compilation from powdr machines to AIRs

#![deny(clippy::print_stdout)]

use std::collections::BTreeMap;

use ast::{
Expand Down
2 changes: 2 additions & 0 deletions analysis/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(clippy::print_stdout)]

mod block_enforcer;
mod macro_expansion;
mod vm;
Expand Down
2 changes: 2 additions & 0 deletions asm_to_pil/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(clippy::print_stdout)]

use ast::asm_analysis::AnalysisASMFile;
use number::FieldElement;
use romgen::generate_machine_rom;
Expand Down
2 changes: 2 additions & 0 deletions asm_utils/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! Common crate for generalized assembly handling.

#![deny(clippy::print_stdout)]

use ast::{Argument, FunctionOpKind, Register};

pub mod ast;
Expand Down
2 changes: 2 additions & 0 deletions ast/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(clippy::print_stdout)]

use itertools::Itertools;
use log::log_enabled;
use number::FieldElement;
Expand Down
2 changes: 2 additions & 0 deletions backend/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(clippy::print_stdout)]

#[cfg(feature = "halo2")]
mod halo2_impl;
mod pilstark;
Expand Down
3 changes: 3 additions & 0 deletions compiler/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! The main powdr lib, used to compile from assembly to PIL

#![deny(clippy::print_stdout)]

use std::ffi::OsStr;
use std::fs;
use std::io::BufWriter;
Expand Down Expand Up @@ -320,6 +322,7 @@ fn write_commits_to_fs<T: FieldElement>(
log::info!("Wrote commits.bin.");
}

#[allow(clippy::print_stdout)]
pub fn inputs_to_query_callback<T: FieldElement>(inputs: Vec<T>) -> impl Fn(&str) -> Option<T> {
move |query: &str| -> Option<T> {
let items = query.split(',').map(|s| s.trim()).collect::<Vec<_>>();
Expand Down
2 changes: 2 additions & 0 deletions executor/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//! Tooling used for execution of compiled programs

#![deny(clippy::print_stdout)]

pub mod constant_evaluator;
pub mod witgen;
2 changes: 2 additions & 0 deletions halo2/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(clippy::print_stdout)]

pub(crate) mod aggregation;
pub(crate) mod circuit_builder;
pub(crate) mod circuit_data;
Expand Down
2 changes: 2 additions & 0 deletions importer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(clippy::print_stdout)]

mod module_loader;
mod path_canonicalizer;
mod powdr_std;
Expand Down
2 changes: 2 additions & 0 deletions linker/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(clippy::print_stdout)]

use std::iter::once;

use analysis::utils::parse_pil_statement;
Expand Down
2 changes: 2 additions & 0 deletions number/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! Numerical types used across powdr

#![deny(clippy::print_stdout)]

#[macro_use]
mod macros;
mod bn254;
Expand Down
2 changes: 2 additions & 0 deletions parser/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! Parser for powdr assembly and PIL

#![deny(clippy::print_stdout)]

use ast::parsed::asm::ASMProgram;
use lalrpop_util::*;

Expand Down
2 changes: 2 additions & 0 deletions parser_util/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! Utils used with different lalrpop parsers

#![deny(clippy::print_stdout)]

pub mod lines;

#[derive(Debug)]
Expand Down
2 changes: 2 additions & 0 deletions pil_analyzer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(clippy::print_stdout)]

pub mod pil_analyzer;

use std::path::Path;
Expand Down
1 change: 1 addition & 0 deletions pilopt/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! PIL-based optimizer
#![deny(clippy::print_stdout)]

use std::collections::{BTreeMap, HashSet};

Expand Down
2 changes: 2 additions & 0 deletions riscv/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//! A RISC-V frontend for powdr
#![deny(clippy::print_stdout)]

use std::{
collections::BTreeMap,
ffi::OsStr,
Expand Down
2 changes: 2 additions & 0 deletions type_check/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(clippy::print_stdout)]

use std::{collections::BTreeMap, marker::PhantomData};

use ast::{
Expand Down
Loading