Commit Graph
9801 Commits
Author SHA1 Message Date
Mats Larsen fa4d034ff7 Replace ts-node with tsx gh-13545 2024-12-09 20:36:39 +09:00
Mats Jun Larsen 64397a3895 Use latest version of nodejs 18 in minimum build (#7206) gh-13544 2024-12-09 20:36:24 +09:00
Matt Godbolt 9ebc778c3b Rename per @junlarsen feedback gh-13537 2024-12-09 10:21:56 +00:00
Matt Godbolt 63c2ce7808 Reimplement shell splitting (#7202)
Takes the bones of shell-split and makes it handle lots of situations
without throwing exceptions, and using modern-ish typescript/javascript
stuff.

Adds lots more tests too.

Removes unneeded package dependencies.

Changes from before: escaping a pipe character `moo \\# hello` would
drop the `# hello` part (?) that is, I updated the test that did:
```ts
expect(splitArguments('hello \\#veryfancy etc')).toEqual(['hello', '\\']);
```
to be the more sane expectation of `['hello', '\\#veryfancy']`.

Everything else I could think of (unterminated strings, escapes etc) I
kept the same. And added tests for.

Hopefully addresses #7201 without breaking any reasonable use of the
code (though @partouf raises fair concerns about this.)
gh-13536
2024-12-09 04:20:38 -06:00
Waqar Ahmed d7f92bdb59 Improve odin codegen processing (#7204)
- support library code filter
- disable demangling, its not needed for odin
- support LLVM IR

<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE
IT
Thanks for taking the time to improve CE. We really appreciate it.
Before opening the PR, please make sure that the tests & linter pass
their checks,
  by running `make check`.
In the best case scenario, you are also adding tests to back up your
changes,
  but don't sweat it if you don't. We can discuss them at a later date.
Feel free to append your name to the CONTRIBUTORS.md file
Thanks again, we really appreciate this!
-->
gh-13534
2024-12-09 12:14:40 +09:00
Matt Godbolt 02951a20db Unify types for tool args (#7199)
- Uses strings across the board in the UI part (no functional change
here from before; all state is the same as it was before).
- Sends _arrays_ in the POST, using the same `splitArguments` code as
the backend.
- Backend _still supports_ strings (though doesn't advertise), also
using same `splitArguments`.
- Moves `splitArguments` into common utils, and rephrases to avoid
unnecessary use of underscore and ES2021+ code.

Tested locally:
- with both old and new client code (ran new backend and old webcode to
show sending strings still works)
- with creating and removing tool windows (checked with `ldd` locally)
- with various strings on the client `moo foo "this is bad" #moo` and
even "error" things like `this is "badger` (with a missing close quote).
All works as you'd expect

Happy to break the "move the splitArguments" code into a separate PR if
that'd be easier to review separately.

Fixes #7195
gh-13527
2024-12-07 14:44:42 -06:00
Mats Jun Larsen c256b922f7 Migrate site templates to yaml config (#7189)
Does some winter cleaning on the site-template stuff :)

1. Migrated away from the custom conf format to plain old yaml
2. Made the images and image files match with the name from the yaml
file. (It's not a problem to have spaces in file paths, nor urls so I
don't see why we shouldn't)
3. Updated the relevant documentation

There is a small breakage in the api response for the meta field. It now
returns `{"screenshot_dimensions":{"width":1000,"height":800}}` which I
believe is a lot more useful than
`{"meta.screenshot_dimensions":"1000x800"}`

Besides, I don't believe this endpoint has any third-party consumers
that rely on the metadata since it's a rarely known feature anyways
gh-13522
2024-12-08 00:59:58 +09:00
Matt Godbolt 16a64df23f Add a warning about lack of Windows support. (#7198)
![image](https://github.com/user-attachments/assets/bfdad410-77b2-4fc5-8a6d-87b861f35b0a)
 See #7194
gh-13519
2024-12-07 07:09:41 -06:00
Spencer Fricke d4aedf3f4d Add SPIR-V Cross to production (#7197)
I added SPIRV-Cross support in
https://github.com/compiler-explorer/compiler-explorer/pull/7056 and
with the Infra changes in
https://github.com/compiler-explorer/infra/pull/1475 we can have it up
online

(note, the `spirv-reflect` needed a fix to the command line args which
means will have to wait until next SDK to add it here)
gh-13516
2024-12-07 04:34:51 -06:00
Mats Jun Larsenanddependabot[bot] 7ae92831d2 Bump path-to-regexp and express (#7191)
Manual application of #7187 in order to get secrets or something? deploy
failed anyways

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
gh-13514
2024-12-07 01:59:08 +09:00
Mats Larsen 0d7d5dfc43 Remove unused body-parser dependency gh-13511 2024-12-07 01:50:28 +09:00
Atharva Rai a3c64dc4dc Remove body-parser dependency (#7176)
This PR addresses issue #7158 by removing the body-parser dependency in
favor of express.json() and other built-in middleware functionalities
provided by Express.js.
gh-13510
2024-12-07 01:47:06 +09:00
Partouf 3aff85a216 odin fixes gh-13507 2024-12-06 17:29:16 +01:00
Waqar Ahmed d3ef2de208 Add Odin language (#7186) gh-13506 2024-12-06 17:28:47 +01:00
Matt Godbolt b679a2dcb3 Reinstate our friends at Intel. gh-13492 2024-12-05 15:35:26 +00:00
Steve 77bbd0b6dc Make the argument parsing more robust (#7185)
Instead of skipping the exactly the last option, skip all options after
the input filename.

Otherwise, in some cases there can be options like `-Wl` and etc. being
passed to the compiler and cause build failures.
gh-13491
2024-12-05 08:13:28 -06:00
Thomas Padioleau 5bf922db95 Add Kokkos 4.4.01 and 4.5.00 (#7183)
Related to https://github.com/compiler-explorer/infra/pull/1473.
gh-13485
2024-12-04 10:31:14 -06:00
Mats Jun Larsen 6566759c75 Hotfix static max age header (#7182)
Good catch @mattgodbolt
gh-13483
2024-12-04 08:13:22 -06:00
Matt Godbolt 271a698025 Add -Xclang to 2998 gh-13480 2024-12-04 14:01:06 +00:00
Spencer Fricke 05f86a38dd Add preliminary Slang support (#7151)
Part of
https://github.com/compiler-explorer/compiler-explorer/issues/2331 and
similar to [my GLSL
change](https://github.com/compiler-explorer/compiler-explorer/pull/6883)

[Slang](https://shader-slang.com/) is a GPU focused shading language
that has been worked on for years. Last week [The Khronos
Group](https://www.khronos.org/news/press/khronos-group-launches-slang-initiative-hosting-open-source-compiler-contributed-by-nvidia)
will now be running the project as open governance. The latest [Vulkan
SDK](https://www.lunarg.com/lunarg-releases-vulkan-sdk-1-3-296-0-for-windows-linux-macos/)
has also added a build of `Slangc` (slang compiler).

This change adds support for Slang (the language) as a front end with
`Slangc` (the compiler) as the only compiler. Slang can be used for
things like GLSL/HLSL, but that is for a future PR.

I am in contacts with people on the Slang development and plan to
support things for Slang as well as the other GPU related shading
languages

--- 

of course, screen shots as well


![image](https://github.com/user-attachments/assets/c9f6460b-b779-4ff5-b0bb-5a7eff543de1)


![image](https://github.com/user-attachments/assets/b2dbdd5a-c031-4110-ab9d-ed76b9881ad8)
gh-13476
2024-12-04 04:45:50 -06:00
James Touton 287b2e4564 Added p2998 (#7175)
See:

* https://github.com/compiler-explorer/clang-builder/pull/77
* https://github.com/compiler-explorer/compiler-workflows/pull/30
* https://github.com/compiler-explorer/infra/pull/1472
gh-13474
2024-12-04 04:18:17 -06:00
kevinjeon-g 6296e9064d Support OpenJDK output for Android Java (#7122)
This change adds OpenJDK as an output compiler for Android Java,
beginning with 11.0.2. This change also updates java.ts to allow for
input libraries, by parsing library paths and passing them into the
javac invocation as '-cp \<path\>:\<path\>:...'.

This is intended to simplify the process of inspecting javac output when
Android Java is already selected so that a user doesn't have to switch
to the Java compiler option. This also allows a user to view javac
output with Android libraries.
gh-13473
2024-12-04 19:11:11 +09:00
Mosè Giordano 8fad88c8b6 Add julia v1.11.2 (#7174)
Companion PR to https://github.com/compiler-explorer/infra/pull/1471
gh-13467
2024-12-03 05:02:39 -06:00
Patrick Quist d5cfdc6e4d Add alias for long lost msvc id (#7170) gh-13465 2024-12-02 21:59:52 +01:00
Marc Poulhiès 872e870b08 gccbpf: disable C++ (#7161)
Older g++ versions were kind of working (by chance) for the BPF target.
With more recent, it's broken, so was not enabled. Having only "old"
compilers available in C++, but not in C is confusing, and not really
useful => hidding the existing C++ compilers.

fixes #7116

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
gh-13464
2024-12-02 21:15:23 +01:00
Marc Poulhiès c4d9ec7416 Readd powerpc64 GNAT 11.2 compiler (#7173)
The compiler was incorrectly reinstalled after I probably forgot to
correct end #3701.

Fixes #7168

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
gh-13463
2024-12-02 21:14:27 +01:00
Matt Godbolt 2dd0704dc6 Add a sleep util (#7172) gh-13458 2024-12-02 18:22:14 +01:00
Matt Godbolt 2d09b92b6a Separate filenames for llvm IR in rust (#7171)
Rust compilers output to fixed-named intermediate files. When running a
regular compiler with `--emit-llvm` _and_ an IR view on the same source,
the outputs fight.

This ensures the intermediate files for IR are named differently.

Thanks @bjorn3

Closes #7012
gh-13457
2024-12-02 18:47:28 +02:00
Partouf adac88b9a0 more aliasses gh-13454 2024-12-02 17:10:39 +01:00
Ofek e113d4b0d4 Fix #3203: Apply the workaround suggested by OP (#7164)
Adding a switch to all MSVC compilations that specifies the charset
seems good enough.
gh-13443
2024-12-02 12:25:49 +02:00
Ofek 89b3fab772 Fix #5052: cleanup ghost compilers (#7166)
Some janitorial work. Unclear what is the status of TOIT
gh-13438
2024-12-02 11:36:36 +02:00
Matt Godbolt 8a22159203 Update sponsors gh-13437 2024-12-02 09:23:55 +00:00
Ofek b75542bfac Fix #3264: move emitShortLinkEvent from editor-pane to main window (#7163)
When settings are set to emit-short-link upon ctrl+S, managing the logic
in `Editor` is problematic since the editor may lose focus and not
receive the event.

Also logically this is a cross-site event, and doesn't belong in any
particular editor (there can be multiple).
gh-13434
2024-12-02 10:41:12 +02:00
Steve 13eabd6d04 .NET: Fix the redundant options in some cases (#7152)
#7143 accidentally broke the compilation for mono as it would pass an
unnecessary option `--parallalism 1` to `mono`. Missed this in my local
test as the result of mono was cached.
This option is only used by Crossgen2 and NativeAOT.
gh-13428
2024-12-01 02:58:45 -06:00
Mats Jun Larsen 630015c3f3 Remove addStaticHeaders and contentPolicyHeader functions (#7159)
Stops passing these functions around and instead configures the headers
by chaining express handlers
gh-13427
2024-12-01 16:22:41 +09:00
github-actions[bot]andCompiler Explorer Bot e8cfc2f2ee [bot] Update browsers list (#7162)
Automatic run of `npm run-update-browerslist` which needs to
 be done periodically to keep in-date.
See
[here](https://github.com/browserslist/browserslist#browsers-data-updating)
for more details.

Co-authored-by: Compiler Explorer Bot <mattgodbolt@users.noreply.github.com>
gh-13426
2024-12-01 10:08:32 +09:00
Mats Jun Larsen e03f3d058c Remove old shortener path (#7160)
This has been dangling as a TODO from @mattgodbolt since 2021. Running
the following Athena query:

```sql
SELECT COUNT(*) as reqs, uri, date
from cloudfront_logs
WHERE uri LIKE '/shortener%'
GROUP BY date, uri
```

Yields about 8-20 requests per day. I think this is an insignificant
enough amount of traffic to justify removing it now.
gh-13425
2024-12-01 10:07:45 +09:00
Mats Jun Larsen fba4ba672a De-couple formatter from http server (#7155)
This patch decouples the formatting logic (which is used by the
clang-format feature) from the http API logic.

This is done with the new FormattingService populates the formatters
from the config, and wraps formatter execution. This way, both the http
controller and the clang-format functionality can use it, reducing tight
coupling.
gh-13417
2024-11-30 12:14:11 +09:00
Mats Jun Larsen 3b695d0469 Hoist healthcheck router above logging middleware (#7157)
Fixes #7156
gh-13412
2024-11-30 11:49:26 +09:00
Mats Jun Larsen 09adb2795a Add re-usable middleware functions to http server (#7154)
Just add the headers you want to the handler list :)

It's basically the addStaticHeaders function again, but this time more
composable. End goal is to replace that function and all its uses with
this as I go with the api improvements

This technically also fixes a cors regression from earlier patches
gh-13408
2024-11-30 11:37:57 +09:00
Nuclear_Bomb 1f7ff7fe97 Add library option (#7091)
Infra PR: https://github.com/compiler-explorer/infra/pull/1454
gh-13397
2024-11-29 11:05:30 +01:00
Steve 1e02873328 Remove the restrictions on compiler options (#7143)
Follow up to #7141

As per
https://github.com/compiler-explorer/compiler-explorer/pull/7141#issuecomment-2506116434,
remove the restrictions on compiler options.

cc: @junlarsen
gh-13393
2024-11-28 15:52:14 -06:00
Matt Godbolt 6fa1dede79 Add lfortran and a slightly hacky path to clang (#7149)
Advice sought: I didn't want to plumb through a whole new compiler flag
for `clang` so used a top-level one for `fortran` in the form of a
`ceProp` (which doesn't cascade through all the groups etc). I think
this is _ok_ but ugly and surprising (To me...) and I wonder if we
should actually consider making each compiler's `ceProps` use the same
logic as the logic in the discovery process with parent properties
etc...or not. (cc @partouf in case I've missed something obvious!)
gh-13392
2024-11-28 15:51:51 -06:00
Miguel Ojeda 31c2d4a05d Rust 1.83.0 (#7148)
Infra: https://github.com/compiler-explorer/infra/pull/1468.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
gh-13389
2024-11-28 11:52:22 -06:00
Thirumalai Shaktivel d5ccd7cf20 [feat] Add LFortran as a new fortran compiler (#7119)
Details:
LFortran is a modern open-source (BSD licensed) interactive Fortran
compiler built on top of LLVM. See, https://lfortran.org for more
details.
 There was an interest in the community to add the compiler into the 
 Compiler Explorer: https://github.com/lfortran/lfortran/issues/623. 
 So, this PR adds it.

LFortran is in alpha (the source code compiles to binary and execute. 
 But, users are expected that their code can break). It can emits AST, 
 ASR, LLVM, C, C++, WAT, Julia, Fortran, etc. It has multiple backend
 like LLVM (default), C, C++, x86, WASM, fortran and mlir. 
 For more options run `--help`.

Changes in this PR:
- Add LFortran as a new Fortran compiler.
- `-g` options is enabled by default in `optionsForFilter`. Providing an
option
to disabling it helps other compilers (that doesn't have complete
support for
 debug information) to compile successfully
gh-13386
2024-11-28 10:45:01 -06:00
Mats Jun Larsen 0c51a94d14 Move site-templates loader file (#7146)
File doesn't have anything to do with the http server anymore
gh-13384
2024-11-29 01:18:21 +09:00
Mats Jun Larsen 788e576762 Add controller for healthcheck endpoint (#7145)
Follow up to building separate express routers for each domain. Now
handles the healthcheck in a separate controller
gh-13381
2024-11-29 01:06:50 +09:00
Mats Jun Larsen eb45763ff0 Add correct types to healthcheck endpoints (#7144)
Removes the any types and properly types the option
gh-13376
2024-11-29 00:24:04 +09:00
Mats Jun Larsen b29a0809ad Introduce HttpController interface for http routers (#7142)
By requiring controllers to declare their own routes, we ensure
consistency between tests and the actual server
gh-13373
2024-11-29 00:12:06 +09:00
Mats Jun Larsen a895b7b365 Add kotlin 2.0.10, 2.0.20, and 2.0.21 compilers (#7133)
Points to the latest JDK in #7099 

Infra PR: https://github.com/compiler-explorer/infra/pull/1466
gh-13372
2024-11-29 00:09:41 +09:00