@andersbakken/fisk 4.0.53 → 4.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3044,7 +3044,7 @@ class Compile extends EventEmitter__default["default"] {
3044
3044
  let outputFileName;
3045
3045
  let hasDashO = false;
3046
3046
  let hasDashX = false;
3047
- let sourceFile;
3047
+ let sourcePath;
3048
3048
  for (let i = 0; i < args.length; ++i) {
3049
3049
  // console.log(i, args[i]);
3050
3050
  switch (args[i]) {
@@ -3125,21 +3125,21 @@ class Compile extends EventEmitter__default["default"] {
3125
3125
  break;
3126
3126
  }
3127
3127
  if (args[i][0] !== "-") {
3128
- if (sourceFile) {
3129
- console.log("Multiple source files", sourceFile, args[i]);
3128
+ if (sourcePath) {
3129
+ console.log("Multiple source files", sourcePath, args[i]);
3130
3130
  throw new Error("More than one source file");
3131
3131
  }
3132
- sourceFile = args[i];
3132
+ sourcePath = args[i];
3133
3133
  args[i] = path__default["default"].join(dir, "sourcefile");
3134
3134
  }
3135
3135
  break;
3136
3136
  }
3137
3137
  }
3138
- if (!sourceFile) {
3138
+ if (!sourcePath) {
3139
3139
  throw new Error("No sourcefile");
3140
3140
  }
3141
3141
  if (!hasDashX) {
3142
- switch (path__default["default"].extname(sourceFile)) {
3142
+ switch (path__default["default"].extname(sourcePath)) {
3143
3143
  case ".C":
3144
3144
  case ".cc":
3145
3145
  case ".cpp":
@@ -3183,7 +3183,7 @@ class Compile extends EventEmitter__default["default"] {
3183
3183
  args.unshift(isClang ? "objective-c++" : "objective-c++-cpp-output");
3184
3184
  break;
3185
3185
  default:
3186
- throw new Error(`Can't determine source language for file: ${sourceFile}`);
3186
+ throw new Error(`Can't determine source language for file: ${sourcePath}`);
3187
3187
  }
3188
3188
  args.unshift("-x");
3189
3189
  }
@@ -3194,8 +3194,8 @@ class Compile extends EventEmitter__default["default"] {
3194
3194
  args.push("-Wno-stdlibcxx-not-found");
3195
3195
  }
3196
3196
  if (!hasDashO) {
3197
- const suffix = path__default["default"].extname(sourceFile);
3198
- outputFileName = output = sourceFile.substring(0, sourceFile.length - suffix.length) + ".o";
3197
+ const suffix = path__default["default"].extname(sourcePath);
3198
+ outputFileName = output = sourcePath.substring(0, sourcePath.length - suffix.length) + ".o";
3199
3199
  args.push("-o", outputFileName);
3200
3200
  }
3201
3201
  // debug = true;
@@ -3205,7 +3205,7 @@ class Compile extends EventEmitter__default["default"] {
3205
3205
  if (!fs.existsSync("/usr/bin/as")) {
3206
3206
  this.emit("stderr", "as doesn't exist");
3207
3207
  }
3208
- console.log(`Compiling source file: ${sourceFile}\n${[compiler, ...args].join(" ")}`);
3208
+ console.log(`Compiling source file: ${sourcePath}\n${[compiler, ...args].join(" ")}`);
3209
3209
  // const env = Object.assign({ TMPDIR: dir, TEMPDIR: dir, TEMP: dir }, process.env);
3210
3210
  const proc = child_process__default["default"].spawn(compiler, args, {
3211
3211
  /*env: env, */ cwd: dir // , maxBuffer: 1024 * 1024 * 16
@@ -3268,13 +3268,13 @@ class Compile extends EventEmitter__default["default"] {
3268
3268
  });
3269
3269
  }
3270
3270
  catch (err) {
3271
- console.error("Got an error processing outputs for", sourceFile, err);
3272
- assert__default["default"](sourceFile !== undefined, "Must have sourceFile");
3271
+ console.error("Got an error processing outputs for", sourcePath, err);
3272
+ assert__default["default"](sourcePath !== undefined, "Must have sourcePath");
3273
3273
  const errorExitEvent = {
3274
3274
  exitCode: 110,
3275
3275
  files: [],
3276
3276
  error: err.toString(),
3277
- sourceFile
3277
+ sourcePath
3278
3278
  };
3279
3279
  this.emit("exit", errorExitEvent);
3280
3280
  }
@@ -3285,8 +3285,8 @@ class Compile extends EventEmitter__default["default"] {
3285
3285
  if (exitCode === null) {
3286
3286
  exitCode = 111;
3287
3287
  }
3288
- assert__default["default"](sourceFile !== undefined, "Must have sourceFile4");
3289
- const exitEvent = { exitCode, files, sourceFile };
3288
+ assert__default["default"](sourcePath !== undefined, "Must have sourcePath4");
3289
+ const exitEvent = { exitCode, files, sourcePath };
3290
3290
  this.emit("exit", exitEvent);
3291
3291
  });
3292
3292
  }
@@ -3730,7 +3730,7 @@ process.on("message", (msg) => {
3730
3730
  id: msg.id,
3731
3731
  files: event.files,
3732
3732
  exitCode: event.exitCode,
3733
- sourceFile: event.sourceFile
3733
+ sourcePath: event.sourcePath
3734
3734
  });
3735
3735
  }
3736
3736
  else {
@@ -3740,7 +3740,7 @@ process.on("message", (msg) => {
3740
3740
  id: msg.id,
3741
3741
  files: event.files,
3742
3742
  exitCode: event.exitCode,
3743
- sourceFile: event.sourceFile
3743
+ sourcePath: event.sourcePath
3744
3744
  });
3745
3745
  }
3746
3746
  if (destroying && !compiles.size) {