* Different uncaughtException handling
We've seen some uncaught exceptions where the process exits before logs are apparently flushed. This hopefully addresses that. Also start up sentry earlier, and catch top level exits differently.
With ref to winstonjs/winston#1504 (comment) and https://nodejs.org/api/process.html#event-uncaughtexception
- latest sentry, tar-stream, which, some yamljs versions
- latest eslint-* stuff
- latest webpack manifest
- Applies all the automatic fixes for newer lint rules
- Bump the webpack version
applies new tslint stuff
* Show an estimate for PNG export size
* Prettier ignore a line
* Puggify
Co-authored-by: Matt Godbolt <matt@godbolt.org>
Co-authored-by: Matt Godbolt <matt@godbolt.org>
If we don't have a `.git` directory during build, then don't try and run `git` commands to get e.g. history and last changed for policy files and changelog.
Closes#4497
* Fix type of tool id
Observed through the debugger it seems the tool id is a `string`, which leads to all sorts of downstream complaints comparing strings to ints when converting tools.js to ts (see #4166)
* Add tools to CE Options
* Fixings
* Fix#4469
Errors now look like:
```
Internal Compiler Explorer error: Error: Internal error running asm parser:
./dump-and-parse.sh: line 4: /usr/local/bin/asm-parser: No such file or directory
at CEAsmParser.parseAsmExecResult (/home/matthew/dev/ce/compiler-explorer/lib/external-parsers/base.ts:77:19)
at CEAsmParser.objdumpAndParseAssembly (/home/matthew/dev/ce/compiler-explorer/lib/external-parsers/base.ts:101:21)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async DefaultCompiler.objdump (/home/matthew/dev/ce/compiler-explorer/lib/base-compiler.ts:414:31)
at async Promise.all (index 0)
at async DefaultCompiler.checkOutputFileAndDoPostProcess (/home/matthew/dev/ce/compiler-explorer/lib/base-compiler.ts:1356:16)
at async /home/matthew/dev/ce/compiler-explorer/lib/base-compiler.ts:2236:41
at async run (/home/matthew/dev/ce/compiler-explorer/node_modules/p-queue/dist/index.js:163:29)
Compiler returned: -1
```
which at least gives context on why the parsing failed. And per discussion with @partouf we'll blow up at construction time if the file isn't there, which means the above is more to cover "what if the tool dies".
* Separate shareable tool type from server ITool
I realised we were using the "Tool" on both client and server, but the client only has the JSON-able data of Tool, not the interface/object Tool (now renamed to `ITool`).
* Fix tests
Observed through the debugger it seems the tool id is a `string`, which leads to all sorts of downstream complaints comparing strings to ints when converting tools.js to ts (see #4166)
* Add assert and unwrap utilities
* Playing around with diagnostics
* lib/assert diagnostic implementation
* Remove temporary testing stuff
* Reset package-lock.json to before I messed with it
* Further refinements and integration
* Added licence and removed an obsolete eslint directive
* TS-ify logger
Also redoes some pretty nasty morgan workarounds in favour of an actual real stream.
* Fix tests. and actually write some
* Formatting
* Add clarifying comment
This provides a simple interface for build scripts that want to pre-run
the webpack and ts-compile steps (e.g. when producing a container
image) ahead of time rather, without requiring them to copy the current
set of commands needed for each part and hope they don't change.
Fixes https://github.com/compiler-explorer/compiler-explorer/issues/3287