pub struct CompileConfig {
pub program: String,
pub args: Vec<String>,
pub version_args: Vec<String>,
pub workspace: PathBuf,
pub timeout: Duration,
}Expand description
A tool to compile or type-check with.
The three constructors cover what US-0804 names. Anything else is
CompileConfig::new.
Fields§
§program: StringThe program to run.
args: Vec<String>The arguments that perform the check.
version_args: Vec<String>The arguments that make it print its version, e.g. --version.
workspace: PathBufThe directory to run in, and the only one the checker may read.
timeout: DurationHow long the check may run before it is killed.
Implementations§
Source§impl CompileConfig
impl CompileConfig
Sourcepub fn new(
program: impl Into<String>,
args: impl IntoIterator<Item = impl Into<String>>,
workspace: impl Into<PathBuf>,
) -> Self
pub fn new( program: impl Into<String>, args: impl IntoIterator<Item = impl Into<String>>, workspace: impl Into<PathBuf>, ) -> Self
A tool invocation, with the default timeout and --version as the
version command.
Sourcepub fn cargo(workspace: impl Into<PathBuf>) -> Self
pub fn cargo(workspace: impl Into<PathBuf>) -> Self
cargo check --all-targets.
check rather than build: it type-checks without linking, which is
several times faster and is the whole of what this checker claims.
Sourcepub fn tsc(workspace: impl Into<PathBuf>) -> Self
pub fn tsc(workspace: impl Into<PathBuf>) -> Self
tsc --noEmit.
--noEmit because a checker may not write to the workspace, and tsc
writes JavaScript unless told not to.
Sourcepub fn versioned_by(
self,
args: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn versioned_by( self, args: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Ask for the version some other way than --version.