Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
partouf committed May 14, 2024
1 parent 4e5a64b commit 9697bb4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions lib/buildenvsetup/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,24 @@ import path from 'path';

import _ from 'underscore';

import {CompilerInfo} from '../../types/compiler.interfaces.js';
import {LibraryVersion} from '../../types/libraries/libraries.interfaces.js';
import {CompilationEnvironment} from '../compilation-env.js';
import {logger} from '../logger.js';
import * as utils from '../utils.js';

import type {BuildEnvDownloadInfo} from './buildenv.interfaces.js';

export class BuildEnvSetupBase {
protected compiler: any;
protected env: any;
protected compiler: CompilerInfo;
protected env: CompilationEnvironment;
protected compilerOptionsArr: string[];
public compilerArch: string | false;
protected compilerTypeOrGCC: any;
public compilerSupportsX86: boolean;
public defaultLibCxx: string;

constructor(compilerInfo, env) {
constructor(compilerInfo: CompilerInfo, env: CompilationEnvironment) {
this.compiler = compilerInfo;
this.env = env;

Expand All @@ -54,7 +56,7 @@ export class BuildEnvSetupBase {
}

protected props(propName: string, def?: any): any {
return this.env.compilerProps(this.compiler.langId, 'buildenvsetup.' + propName, def);
return this.env.compilerProps.get(this.compiler.lang, 'buildenvsetup.' + propName, def);
}

Check warning on line 60 in lib/buildenvsetup/base.ts

View check run for this annotation

Codecov / codecov/patch

lib/buildenvsetup/base.ts#L59-L60

Added lines #L59 - L60 were not covered by tests

async initialise(execCompilerCachedFunc) {
Expand Down
10 changes: 6 additions & 4 deletions lib/external-parsers/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import fs from 'fs';
import path from 'path';

import type {ParsedAsmResult} from '../../types/asmresult/asmresult.interfaces.js';
import {CompilerInfo} from '../../types/compiler.interfaces.js';
import type {TypicalExecutionFunc, UnprocessedExecResult} from '../../types/execution/execution.interfaces.js';
import type {ParseFiltersAndOutputOptions} from '../../types/features/filters.interfaces.js';
import {CompilationEnvironment} from '../compilation-env.js';
import {logger} from '../logger.js';
import {maskRootdir} from '../utils.js';

Expand All @@ -15,10 +17,10 @@ export class ExternalParserBase implements IExternalParser {
private readonly objdumperPath: string;
private readonly parserPath: string;
private readonly execFunc: TypicalExecutionFunc;
private compilerInfo;
private envInfo;
private compilerInfo: CompilerInfo;
private envInfo: CompilationEnvironment;

Check warning on line 21 in lib/external-parsers/base.ts

View check run for this annotation

Codecov / codecov/patch

lib/external-parsers/base.ts#L20-L21

Added lines #L20 - L21 were not covered by tests

constructor(compilerInfo, envInfo, execFunc: TypicalExecutionFunc) {
constructor(compilerInfo: CompilerInfo, envInfo, execFunc: TypicalExecutionFunc) {

Check warning on line 23 in lib/external-parsers/base.ts

View check run for this annotation

Codecov / codecov/patch

lib/external-parsers/base.ts#L23

Added line #L23 was not covered by tests
this.compilerInfo = compilerInfo;
this.envInfo = envInfo;
this.objdumperPath = compilerInfo.objdumper;
Expand All @@ -31,7 +33,7 @@ export class ExternalParserBase implements IExternalParser {
}

protected props(propName: string, def: any): any {
return this.envInfo.compilerProps(this.compilerInfo.langId, 'externalparser.' + propName, def);
return this.envInfo.compilerProps.get(this.compilerInfo.lang, 'externalparser.' + propName, def);
}

Check warning on line 38 in lib/external-parsers/base.ts

View check run for this annotation

Codecov / codecov/patch

lib/external-parsers/base.ts#L35-L38

Added lines #L35 - L38 were not covered by tests
private getParserArguments(filters: ParseFiltersAndOutputOptions, fromStdin: boolean): string[] {
Expand Down

0 comments on commit 9697bb4

Please sign in to comment.