From 366add6304f4cda525323970c2caedadc932c19f Mon Sep 17 00:00:00 2001 From: Matt Godbolt Date: Mon, 10 Jun 2019 22:56:42 -0500 Subject: [PATCH] Temporarily disable java (see #1438) --- lib/compilers/java.js | 6 +++--- lib/languages.js | 13 +++++++------ test/java-tests.js | 22 +++++++++++++--------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/lib/compilers/java.js b/lib/compilers/java.js index de5a514d4..132993ed6 100644 --- a/lib/compilers/java.js +++ b/lib/compilers/java.js @@ -88,7 +88,7 @@ class JavaCompiler extends BaseCompiler { filters.binary = true; return [ - '-Xlint:all', + '-Xlint:all' ]; } @@ -233,7 +233,7 @@ class JavaCompiler extends BaseCompiler { // They are all assigned to the previous explicit line number, // because the line consists of multiple instructions. while (currentInstr < method.instructions.length && - method.instructions[currentInstr].instrOffset !== instrOffset ) { + method.instructions[currentInstr].instrOffset !== instrOffset) { if (currentSourceLine !== -1) { // instructions without explicit line number get assigned the last explicit/same line number @@ -262,7 +262,7 @@ class JavaCompiler extends BaseCompiler { if (currentSourceLine !== -1) { // Assign remaining instructions to the same source line - while (currentInstr + 1 < method.instructions.length){ + while (currentInstr + 1 < method.instructions.length) { currentInstr++; method.instructions[currentInstr].sourceLine = currentSourceLine; } diff --git a/lib/languages.js b/lib/languages.js index 58b85b817..e77b337e7 100644 --- a/lib/languages.js +++ b/lib/languages.js @@ -101,12 +101,13 @@ const languages = { extensions: ['.hs', '.haskell'], alias: [] }, - java: { - name: 'Java', - monaco: 'java', - extensions: ['.java'], - alias: [] - }, + // Temporarily disabled: see #1438 + // java: { + // name: 'Java', + // monaco: 'java', + // extensions: ['.java'], + // alias: [] + // }, ocaml: { name: 'OCaml', monaco: 'ocaml', diff --git a/test/java-tests.js b/test/java-tests.js index 84c2d4478..22b98e8bc 100644 --- a/test/java-tests.js +++ b/test/java-tests.js @@ -30,6 +30,11 @@ const fs = require('fs-extra'); const utils = require('../lib/utils'); const properties = require('../lib/properties'); +// TODO!!! +return; // Temporarily disabled: see #1438 +// TODO!!! + + chai.use(chaiAsPromised); chai.should(); @@ -58,13 +63,13 @@ function testJava(baseFolder, ...classNames) { text: match[2], source: { line: parseInt(match[1]), - file: null, + file: null } }; } return { text: line, - source: null, + source: null }; }); @@ -73,14 +78,13 @@ function testJava(baseFolder, ...classNames) { }; const processed = compiler.processAsm(result); - processed.should.deep.equal(expectedSegments) + processed.should.deep.equal(expectedSegments); } - describe("Basic compiler setup", function () { - it("Should not crash on instantiation", function() { - new JavaCompiler(info, ce) + it("Should not crash on instantiation", function () { + new JavaCompiler(info, ce); }); @@ -95,7 +99,7 @@ describe("Basic compiler setup", function () { } }); - describe("Forbidden compiler arguments", function() { + describe("Forbidden compiler arguments", function () { it("JavaCompiler should not allow -d parameter", () => { const compiler = new JavaCompiler(info, ce); compiler.filterUserOptions(['hello', '-d', '--something', '--something-else']).should.deep.equal( @@ -155,7 +159,7 @@ describe("javap parsing", () => { it("should handle errors", () => { const result = { - asm: '', + asm: '' }; compiler.processAsm(result).should.deep.equal([ @@ -165,7 +169,7 @@ describe("javap parsing", () => { it("Parses simple class with one method", () => { return Promise.all([ - testJava('test/java/square', 'javap-square'), + testJava('test/java/square', 'javap-square') ]); });