Skip to content

Commit

Permalink
Adds verbose logging to LFortranCLIAccessor to debug CI issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dylon committed Nov 19, 2024
1 parent e56494b commit 6c47831
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: ls -l server/test/bin/lfortran
- run: npm test
6 changes: 4 additions & 2 deletions server/src/lfortran-accessors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export class LFortranCLIAccessor implements LFortranAccessor {
let stdout: string = "{}";

try {
console.debug("Writing JSON to [%s]: %s", this.tmpFile.name, text);
fs.writeFileSync(this.tmpFile.name, text);

let lfortranPath = settings.compiler.lfortranPath;
Expand All @@ -119,6 +120,7 @@ export class LFortranCLIAccessor implements LFortranAccessor {
} else {
stdout = response.stdout.toString();
}
console.debug("Read JSON from [%s]: %s", this.tmpFile.name, stdout);
} catch (compileError: any) {
stdout = compileError.stdout;
if (compileError.signal !== null) {
Expand All @@ -134,8 +136,8 @@ export class LFortranCLIAccessor implements LFortranAccessor {
}

async showDocumentSymbols(uri: string,
text: string,
settings: ExampleSettings): Promise<SymbolInformation[]> {
text: string,
settings: ExampleSettings): Promise<SymbolInformation[]> {
const flags = ["--show-document-symbols"];
const stdout = await this.runCompiler(settings, flags, text);
let results;
Expand Down

0 comments on commit 6c47831

Please sign in to comment.