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

remove cache messages from compiler output #95

Merged
merged 1 commit into from
Jun 9, 2024
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
28 changes: 25 additions & 3 deletions pgetinker/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,37 @@ public function getOutput($raw = false)
if($raw)
return implode("\n", $this->output);

return str_replace("/opt/emsdk/upstream/emscripten/cache/sysroot", "/***", implode("\n", $this->output));
$filtered = [];

foreach($this->output as $text)
{
// skip cache messages
if(strpos($text, "cache") === 0)
continue;

$filtered[] = str_replace("/opt/emsdk/upstream/emscripten/cache/sysroot", "/***", $text);
}

return implode("\n", $filtered);
}

public function getErrorOutput($raw = false)
{
if($raw)
return implode("\n", $this->errors);

return str_replace("/opt/emsdk/upstream/emscripten/cache/sysroot", "/***", implode("\n", $this->errors));
$filtered = [];

foreach($this->errors as $text)
{
// skip cache messages
if(strpos($text, "cache") === 0)
continue;

$filtered[] = str_replace("/opt/emsdk/upstream/emscripten/cache/sysroot", "/***", $text);
}

return implode("\n", $filtered);
}

public function getHtml()
Expand Down Expand Up @@ -648,7 +670,7 @@ public function build()
Storage::disk("local")->deleteDirectory($this->workingDirectory);

Log::info("Compile: finished successfully");

$this->output[] = "Compiled Successfully";
return true;
}

Expand Down
3 changes: 2 additions & 1 deletion resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ class PGEtinker

compileSuccessHandler(data)
{
this.compilerOutputPanel.setContent(data.stderr);
console.log(data);
this.compilerOutputPanel.setContent(data.stdout + data.stderr);
this.playerPanel.setHtml(data.html);
this.compiling = false;
}
Expand Down