Browse Source

Merge remote-tracking branch 'origin/master' into monaco

dev/git-series/gccdum
Matt Godbolt 6 years ago
parent
commit
81d076b08e
  1. 4
      .idea/deployment.xml
  2. 1
      etc/config/compiler-explorer.amazon.properties
  3. 4
      etc/config/d.amazon.properties
  4. 13
      lib/compile-handler.js
  5. 3
      lib/utils.js
  6. 6
      static/thanks.html

4
.idea/deployment.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" serverName="GCC explorer" />
</project>
<component name="PublishConfigData" serverName="Compiler Explorer" />
</project>

1
etc/config/compiler-explorer.amazon.properties

@ -8,4 +8,5 @@ cacheMb=50
clientGoogleAnalyticsEnabled=true
proxyRetries=300
proxyRetryMs=500
rescanCompilerSecs=600
ravenUrl=https://8e4614f649ad4e3faf3e7e8827b935f9@sentry.io/102028

4
etc/config/d.amazon.properties

@ -13,11 +13,13 @@ compiler.gdc48.name=gdc 4.8.2
compiler.gdc52.exe=/opt/compiler-explorer/gdc5.2.0/x86_64-pc-linux-gnu/bin/gdc
compiler.gdc52.name=gdc 5.2.0
group.ldc.compilers=ldc017:ldc100:ldcbeta
group.ldc.compilers=ldc017:ldc100:ldc110:ldcbeta
group.ldc.compilerType=ldc
compiler.ldc017.exe=/opt/compiler-explorer/ldc0.17.2/ldc2-0.17.2-linux-x86_64/bin/ldc2
compiler.ldc017.name=ldc 0.17.2
compiler.ldc100.exe=/opt/compiler-explorer/ldc1.0.0/ldc2-1.0.0-linux-x86_64/bin/ldc2
compiler.ldc100.name=ldc 1.0.0
compiler.ldc110.exe=/opt/compiler-explorer/ldc1.1.0/ldc2-1.1.0-linux-x86_64/bin/ldc2
compiler.ldc110.name=ldc 1.1.0
compiler.ldcbeta.exe=/opt/compiler-explorer/ldcbeta/bin/ldc2
compiler.ldcbeta.name=ldc beta

13
lib/compile-handler.js

@ -29,6 +29,7 @@ var child_process = require('child_process'),
quote = require('shell-quote'),
_ = require('underscore-node'),
logger = require('./logger').logger,
utils = require('./utils'),
CompilationEnvironment = require('./compilation-env').CompilationEnvironment;
temp.track();
@ -163,9 +164,17 @@ function CompileHandler(gccProps, compilerProps) {
}
},
function (error) {
logger.error("Error: " + error.stack || error);
logger.error("Error", error);
if (typeof(error) !== "string") {
error = "Internal GCC explorer error: " + error.toString();
if (error.code) {
if (typeof(error.stderr) === "string") {
error.stdout = utils.parseOutput(error.stdout);
error.stderr = utils.parseOutput(error.stderr);
}
res.end(JSON.stringify(error));
return;
}
error = "Internal Compiler Explorer error: " + (error.stack || error);
}
res.end(JSON.stringify({code: -1, stderr: [{text: error}]}));
}

3
lib/utils.js

@ -53,7 +53,8 @@ function parseOutput(lines, inputFilename) {
var re = /^<source>[:(]([0-9]+)(:([0-9]+):)?[):]*\s*(.*)/;
var result = [];
eachLine(lines, function (line) {
line = line.trim().replace(inputFilename, '<source>');
line = line.trim();
if (inputFilename) line = line.replace(inputFilename, '<source>');
if (line !== "" && line.indexOf("fixme:") !== 0) {
var lineObj = {text: line};
var match = line.match(re);

6
static/thanks.html

@ -5,6 +5,12 @@
<li>Glenn</li>
<li>Alexander Guettler</li>
<li>Alejandro Lucena</li>
<li>xyz</li>
<li>Matt Weber</li>
<li>Simon Haegler</li>
<li>Jon Kalb</li>
<li>Reuben Scratton</li>
<li>Ga&euml;tan Barel</li>
<li>Zhihao Yuan</li>
<li>David Jones</li>
<li>relgukxilef</li>

Loading…
Cancel
Save