MCPcopy Create free account
hub / github.com/ExtropyIO/SolanaBootcamp / compile

Function compile

homeworks_rust/src/verify.rs:121–139  ·  view source on GitHub ↗

Compile the given Exercise and return an object with information about the state of the compilation

(
    exercise: &'a Exercise,
    progress_bar: &'b ProgressBar,
)

Source from the content-addressed store, hash-verified

119// Compile the given Exercise and return an object with information
120// about the state of the compilation
121fn compile<'a, 'b>(
122 exercise: &'a Exercise,
123 progress_bar: &'b ProgressBar,
124) -> Result<CompiledExercise<'a>, ()> {
125 let compilation_result = exercise.compile();
126
127 match compilation_result {
128 Ok(compilation) => Ok(compilation),
129 Err(output) => {
130 progress_bar.finish_and_clear();
131 warn!(
132 "Compiling of {} failed! Please try again. Here's the output:",
133 exercise
134 );
135 println!("{}", output.stderr);
136 Err(())
137 }
138 }
139}
140
141fn prompt_for_completion(exercise: &Exercise, prompt_output: Option<String>) -> bool {
142 let context = match exercise.state() {

Callers 3

compile_onlyFunction · 0.85
compile_and_testFunction · 0.85

Calls 1

compileMethod · 0.80

Tested by

no test coverage detected