Commit Graph
28 Commits
Author SHA1 Message Date
Mats Larsen bb6d374566 Apply automatic fixes 2024-11-10 13:46:36 +09:00
Ofek f6438f9c4d Store times in numbers only (#7023)
Also fixes #4655
2024-10-26 18:43:59 +03:00
Ofek 2df8d32758 Tsify #6 (#6941)
Another tsification batch. 347 to go and I'm running out of easy fixes
:(
2024-10-22 21:41:44 +03:00
Ofek f5f00606f8 Tsifications galore (#6916)
Still mostly mindless numb work, one rename that touched many files
(`getArgumentParser` -> `getArgumentParserCls`), and a few real
improvements.
The goal is to be able to turn on `noImplicitAny` for the project, to
enforce higher code quality. 600 violations to go.
2024-10-01 12:26:46 +03:00
Patrick Quist b8325cf0c6 eslint root setting and fixes (#6307) 2024-04-16 21:26:53 +02:00
Matt Godbolt 7ba2635029 Check for non-string values in exec's env (#6087)
- warns
- fixes the case I found
2024-02-04 17:53:48 -06:00
Patrick Quist 68efdcbd97 transform paths given through options.ldPath (#6086) 2024-02-04 16:51:46 -06:00
Matt Godbolt 01b7992ada Fix nsjail environment variables that need mapping to destination paths (#6084)
Maps env vars just like we map everything else, to catch all cases where
"app dir" is an input to jailed processes, the jailed process only sees
the "right" path (`/app/something`).

Tested locally and fixes the dot net "read only `/nosym`" thing while
keeping the `/nosym` behaviour etc
2024-02-04 13:53:50 -06:00
Matt Godbolt c26a2924fc Add more typings (#6082) 2024-02-04 13:33:19 -06:00
Matt Godbolt 613d7f688a Unify the way tmp dir is used (#6052)
Instead of having several globals, set via environment variables,
explicitly set the "correct" env var if passed `--tmpDir` and then
consistently use it in the rest of the program.

See @apmorton's comments in #1707
2024-01-28 18:50:46 -06:00
J. Ryan Stinnett e7b22b41be Limit exec streams to max string length (#5898)
Some operations set `exec`'s `maxOutput` to a value larger than the max
string length. This change ensures we always cap output to the engine's
string limit (currently 512 MB in recent Node versions).

This also tweaks handling when reaching the string limit to ensure
adding the "truncated" message itself does not send us beyond the limit.
2023-12-23 17:54:46 -06:00
Patrick Quist 49252efa92 Execution hotfix (#5659) 2023-10-26 20:46:32 +02:00
Jeremy Rifkin fb147126e8 Fix WSL for systems that don't have windows paths (#5480)
Attempt to fix #5476. As far as I can tell `process.env.winTmp` is
needed just for windows executables and WslVcCompiler. It should be
possible to just ignore the exec error and continue. If for some reason
the user doesn't have windows paths in their WSL but does want to run
windows executables they can pass `-tmpDir`.
2023-09-16 15:59:26 -04:00
Jorge Lopez a90dfab5f5 Add a line break before kill (#5258)
A fix for
https://github.com/compiler-explorer/compiler-explorer/issues/5233
2023-07-15 10:37:01 -05:00
Guo Ci 701301642e resolve #4330 (#5196)
#4330
2023-07-03 15:07:26 -04:00
Jeremy Rifkin ddb4ed8c05 Improve the type of ExecutionOptions.env (#5206) 2023-06-28 08:15:24 -04:00
Jeremy Rifkin d907f34bdc Fix handling when the opt output is truncated (#5189)
Fixes #2984
2023-06-21 21:26:55 -04:00
Jeremy Rifkin 910d69f233 Turn on @typescript-eslint/await-thenable (#5131) 2023-06-11 18:09:35 -04:00
Jeremy f8409da979 Add a backend unwrapString 2023-05-23 16:49:22 -04:00
Matt Godbolt 6d367c10d3 Misc discovery and execution cache tweaks (#5073)
- use async file access when looking for llc
- don't use the random customCwd in the cache hash
- don't lookup "log cache accesses" in props every access
- turn on compiler cache access logging in discovery mode
- error on missing wine executable config
- atomically cache on disk file cache
2023-05-22 22:40:09 -05:00
Patrick Quist 7d192ccde1 add properties and test for cewrapper (#4761) 2023-03-18 11:46:27 +01:00
Mats Jun LarsenandMatt Godbolt 633eb82d18 Transition to ECMAScript Modules (#4780)
Makes the Compiler Explorer app, and all the tooling ESM compatible.
Things that have been done:

1. The package.json has `type: module` now
2. All relative imports have a .js ending
3. All directory imports are now directory/index.js to comply with ESM
standards
4. Dependency node-graceful is now imported into tree, because the
package is broken under esm
5. Dependency p-queue has been bumped to 7.x with ESM support
6. Dependency profanities has been bumped to 3.x with ESM support
7. Webpack config is now both ESM and CommonJS compatible
8. Non-ESM compatible imports have been rewritten
9. ESLint configuration has been tweaked to not fail on .js imports
10. Mocha is now hacked together and ran with ts-node-esm
11. Webpack is now hacked together and ran with ts-node-esm
12. Webpack config is now ESM compatible, so that it can be used in the
dev server
13. Cypress code still runs commonjs, and has been excluded from the
tsconfig
14. All sinon mock tests have been commented out, because sinon module
mocks do not work with ESModules (because ESModules are immutable)

A lot of tests are now giving warnings/errors to stdout, yet still pass.
Docenizer codegenerator scripts have been updated, but I did not re-run
them, and instead just changed their code.

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-02-27 18:06:38 -06:00
Jeremy Rifkin 384c297906 Fix trailing comma issue (#4775)
Make trailing commas more consistent throughout the project, fixes
config conflict between eslint and prettier. Resolves an oversight in
#4766.
2023-02-26 12:21:35 -05:00
Jeremy Rifkin 2b06c69111 Turn some auto-fixable eslint rules back on (#4766)
This PR turns comma-dangle and indent eslint rules on for lib/. These
are rules inherited from the eslint config for static/, this PR just
makes things more consistent. Also turned
@typescript-eslint/no-var-requires back on while I was here.
2023-02-23 17:16:17 -05:00
Matt Godbolt 749319f791 Slightly more controversial bumpings (#4503)
- 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
2022-12-28 11:42:14 -06:00
Jeremy RifkinandMatt Godbolt e13fe4a2f9 Mg/props ts (#4340)
* WIP

* Type changes to the property getter

* Finish getting types working for properties.ts

* Reduce type casts in exec.ts

* Format files

* Remove old comment

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2022-11-26 13:56:04 -05:00
Matt Godbolt c363d1a07d Port @trxcllnt improvements to awaiting (#4220)
* Port @trxcllnt improvements to awaiting

* More async improvements
2022-10-31 22:38:23 -05:00
Patrick Quist 8334d96bf3 tsify exec.js (#4026) 2022-09-06 20:22:28 +02:00