Commit Graph
9765 Commits
Author SHA1 Message Date
Mats Larsen f2ec55c8fc wip 2024-12-01 00:13:36 +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
Matt Godbolt 618b27353e Revert "Make java 2301 the default (#7137)"
This reverts commit a82a166deb.

See #7099 and CC @JuditKnoll
gh-13369
2024-11-28 08:51:19 -06:00
Mats Jun Larsen 52e27d5a37 Rewrite assembly documentation handler to controller form (#7130)
Follow-up to #7090
gh-13365
2024-11-28 22:39:10 +09:00
Steve f667fb700b Allow passing --help to compilers (#7141)
As per
https://github.com/compiler-explorer/compiler-explorer/issues/6199#issuecomment-2505980377,
allowing passing `--help` to compilers so that users can know what
options and switches are available (though part of them will be filtered
out, but still better than having nothing).
gh-13364
2024-11-28 22:37:39 +09:00
Benjamin MaxwellandMats d5a016471c Support LLVM IR filters for the output of mlir-translate (#6881)
This enables the LLVM IR filters for the output of `mlir-translate`
(with `-mlir-to-llvmir`). The filters are still disabled for `mlir-opt`
(which only outputs MLIR) as there's currently no support for MLIR
filtering.

<!-- 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!
-->

---------

Co-authored-by: Mats <mats@jun.codes>
gh-13359
2024-11-28 22:13:19 +09:00
Mats b09b027201 Add controller for site templates (#7131)
Equivalent of #7130 for site templates
gh-13354
2024-11-28 21:55:39 +09:00
Partouf 99de0f1dac hotfix diff view gh-13352 2024-11-28 10:03:19 +01:00
Steve f311fbb3e9 .NET: Set languageId for ILSpy (#7138)
The compile result of ILSpy is C# code, so use `csharp` for
highlighting.
gh-13350
2024-11-28 10:01:33 +09:00
Mats ad959c75b2 Fix incorrect default properties names (#7132)
Wondering if we should get rid of builtin.defaults.properties
alltogether. It could probably be inside compiler-explorer.*.properties.
Thoughts @mattgodbolt?

- Snowball is practically unused so I assume that this hasn't caused any
problem for anyone
- Builtin has just defaulted to the same value as sourcePath when the
`.defaults` file hasn't existed.

Fixes #7127
gh-13349
2024-11-28 07:57:23 +09:00
Matt Godbolt a82a166deb Make java 2301 the default (#7137) gh-13347 2024-11-27 12:44:12 -06:00
Patrick Quist 4615e7fb88 Don't keep possibleArguments to reduce memory footprint (#7134)
Hotfix to reduce memory footprint
gh-13342
2024-11-27 17:46:20 +01:00
Judit KnollandMats d15cb27023 Add JDK 22.0.2 and 23.0.1 (#7099)
Archive OpenJDK releases: https://jdk.java.net/archive/
https://jdk.java.net/23/

---------

Co-authored-by: Mats <mats@jun.codes>
gh-13339
2024-11-27 16:01:53 +09:00
Mats ea29a6e9d6 Separate list and load actions for source API (#7090)
This is the first PR in API consistency with more to come:

1. The source API urls have been properly defined with
`/source/:source/list` and `/source/:source/load/:language/:filename`
- These used to be two API endpoints mushed together into one `handle()`
function. They are now separate
- While it may appear from the tests that this is an API breakage,
there's currently no way to have the source API spit out responses for
stuff like `/source/moose/load/Grunkle`.
2. The frontend code calling the list api now has shared types
3. Code has been migrated to `/lib/handlers/api/source.ts`
- I've moved code here, because I would like to separate the stuff
that's under the API and the stuff that isn't (e.g., healthcheck)
- The source endpoint is currently not under /api, but I believe it
makes sense to move it.
4. GitHub is terrible at showing the diff, but the `browser.ts` file has
been removed, since it's never actually used. Our frontend only calls
`/source/builtin/...` and it never had any entries. Besides, the type
used on the frontend for the locally stored stuff is different...
gh-13329
2024-11-27 13:54:47 +09:00
jmuddnv a711eb6544 Changes for NVIDIA HPC SDK 24.11 (#7094)
Add HPC SDK 24.11 to etc/config/c.amazon.properties
Add HPC SDK 24.11 to etc/config/c++.amazon.properties
Add HPC SDK 24.11 to etc/config/fortran.amazon.properties
Add CUDA 12.6.2 to etc/config/cuda.amazon.properties
gh-13326
2024-11-26 18:47:17 -06:00
kevinjeon-g ca568c7361 Add support for the androidx.annotation library (#7125) gh-13325 2024-11-26 18:46:19 -06:00
kevinjeon-g b2b39017c0 Support system properties in the R8/D8 invocation (#7113)
This change supports JVM system property input by reordering user-input
compiler options that begin with '-D' or '-J'. The latter is an R8/D8
convention; the 'J' is stripped before being used.

Other compiler options are assumed to still apply to R8/D8.
gh-13324
2024-11-26 18:45:33 -06:00
Odysseas Georgoudis a6895467f7 add quill v7.5.0 (#7093)
Infra PR: https://github.com/compiler-explorer/infra/pull/1455
gh-13323
2024-11-26 16:57:26 -06:00
Matt Godbolt 9b9364605e Configure vyper; see #7088 and cc @chibitanaka (#7128) gh-13322 2024-11-26 16:54:53 -06:00
chibitanaka 86f439fc92 Add Vyper support (#7088)
Hello! I'm a big fan of Godbolt and use it regularly to test gas
optimizations in Solidity. However, to this day, there is no support for
Vyper, the second most popular language targeting the EVM, related issue
#4165. We at Statemind.io thought that adding Vyper support would
greatly benefit developers and security researchers, so here is our
attempt to get it working :)

This PR **is not ready** for merging, as `vyper.defaults.properties` and
`vyper.amazon.properties` are not yet defined. I have a few questions to
clarify how to integrate it on the public instance and infrastructure
repository:

Because Vyper compiler is basically a python module, I've found success
in testing multiple versions via separate `venv` environments. In my
local tests `vyper.local.properties` was the following:
```INI
compilers=vyper
compilerType=vyper

versionFlag=--version

compiler.vyper.exe=/opt/research/godbolt/venv/bin/vyper
compiler.vyper.isSemVer=true
compiler.vyper.instructionSet=evm
compiler.vyper.options=--optimize none
```

The versions tested are the latest major Vyper release 0.4.0, along with
0.3.10 and earlier 0.3.xx releases.

It appears that there is support for running python in a virtual
environment in the infra repository:

https://github.com/compiler-explorer/infra/blob/main/bin/lib/installable/python.py

However, I've had difficulties getting started with it and would greatly
appreciate any assistance. Thank you!
gh-13319
2024-11-26 16:38:40 -06:00
Luka Prebil Grintal 81d18c4c4b Add Bluesky to link sharing options and other menu (#7126)
Adds intent link for sharing a Compiler Explorer link to Bluesky. Also
adds a link to the [Compiler Explorer Bluesky
profile](https://bsky.app/profile/compiler-explorer.com) into the
`Other` menu.

<details>
<summary><b>Screenshots of the new links:</b></summary>
<img width="1239" alt="image"
src="https://github.com/user-attachments/assets/2db4a9ee-a0db-4b32-b317-a671d4744b24">
<img width="244" alt="image"
src="https://github.com/user-attachments/assets/5ebcee95-00b8-4219-b057-842f431bed92">

Shared post
<img width="628" alt="image"
src="https://github.com/user-attachments/assets/57f8c264-5590-4cef-ad00-215af5008512">
</details>

I added the `via @compiler-explorer.com` to be the same as twitter, but
since bsky does not fully support tagging yet, it gives the user a
dropdown to select the compiler explorer user, which seems kinda janky.
I left it in for now, but can remove it until bsky supports tagging
automatically.
gh-13318
2024-11-26 13:48:12 -06:00
Steve 2a55dce7fc Add support for .NET 9.0 and ILSpy (#7124)
- Adding support for .NET 9.0
- Adding support for ILSpy
- Make some changes to the compiler name so that the meaning of the
version is more cleared
- Adding missing compilers for existing .NET versions

cc: @mattgodbolt
gh-13316
2024-11-26 13:20:02 -06:00
Ofek 20b8ccaa6f Remove ICompiler, other minor type fixes (#7079) gh-13309 2024-11-25 18:36:20 +02:00
Cr0a3 636675c476 [FIX] fixed argument passing for ygen (#7120) gh-13308 2024-11-24 18:42:55 +01:00
Matt Godbolt a484cf5efe Add new sponsors! thank you! gh-13305 2024-11-23 19:02:41 -06:00
dependabot[bot] 94bc7776cd Bump cross-spawn from 7.0.3 to 7.0.6 (#7107)
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from
7.0.3 to 7.0.6.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md">cross-spawn's
changelog</a>.</em></p>
<blockquote>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.5...v7.0.6">7.0.6</a>
(2024-11-18)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>update cross-spawn version to 7.0.5 in package-lock.json (<a
href="https://github.com/moxystudio/node-cross-spawn/commit/f700743918d901eff92960e15a8dd68f87bd4176">f700743</a>)</li>
</ul>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.4...v7.0.5">7.0.5</a>
(2024-11-07)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>fix escaping bug introduced by backtracking (<a
href="https://github.com/moxystudio/node-cross-spawn/commit/640d391fde65388548601d95abedccc12943374f">640d391</a>)</li>
</ul>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.4">7.0.4</a>
(2024-11-07)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>disable regexp backtracking (<a
href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/160">#160</a>)
(<a
href="https://github.com/moxystudio/node-cross-spawn/commit/5ff3a07d9add449021d806e45c4168203aa833ff">5ff3a07</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/77cd97f3ca7b62c904a63a698fc4a79bf41977d0"><code>77cd97f</code></a>
chore(release): 7.0.6</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/6717de49ff1e5de49622488dcb9c33fb25370c85"><code>6717de4</code></a>
chore: upgrade standard-version</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/f700743918d901eff92960e15a8dd68f87bd4176"><code>f700743</code></a>
fix: update cross-spawn version to 7.0.5 in package-lock.json</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/9a7e3b2165917367f74b8365faad9873b30d7263"><code>9a7e3b2</code></a>
chore: fix build status badge</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/085268352dcbcad8064c64c5efb25268b4023184"><code>0852683</code></a>
chore(release): 7.0.5</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/640d391fde65388548601d95abedccc12943374f"><code>640d391</code></a>
fix: fix escaping bug introduced by backtracking</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/bff0c87c8b627c4e6d04ec2449e733048bebb464"><code>bff0c87</code></a>
chore: remove codecov</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/a7c6abc6fee79641d45b452fe6217deaa1bd0973"><code>a7c6abc</code></a>
chore: replace travis with github workflows</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/9b9246e0969e86656d7ccd527716bc3c18842a19"><code>9b9246e</code></a>
chore(release): 7.0.4</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/5ff3a07d9add449021d806e45c4168203aa833ff"><code>5ff3a07</code></a>
fix: disable regexp backtracking (<a
href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/160">#160</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cross-spawn&package-manager=npm_and_yarn&previous-version=7.0.3&new-version=7.0.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/compiler-explorer/compiler-explorer/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
gh-13298
2024-11-19 07:23:36 -06:00
Ofek c2c8b4e018 Silence some frontend sentry noise (monaco internal benign errors) (#7103) gh-13295 2024-11-16 12:07:41 +02:00
Mats Jun 73ee43da66 Handle site template importing asynchronously (#7089)
1. Gives a proper type to the metadata
2. Fixes a typo in `screenshot_dimentions`
3. Removes home-made partition function in favor of underscore
4. Reads file asynchronously (and consequently rest of API is async)
5. Strips the `https://godbolt.org/#` from each entry in the config file

As an added benefit this should also cut some startup time reading this
file before it's used :)
gh-13292
2024-11-15 10:03:12 +09:00
Ofek Shilon fcbfe383c8 Remove myself from contributors gh-13291 2024-11-15 00:56:44 +02:00
Ofek 4399adc523 Some minor additions to frontend typing (#7082) gh-13290 2024-11-14 17:07:51 +02:00
Ofek 717c9173ad Unify OptCodeEntry and LLVMOptInfo (#7077) gh-13289 2024-11-14 13:05:26 +02:00
Ofek b321566b09 Fix #7096: consider the rust case where an IR label can include '[' (#7098) gh-13288 2024-11-14 13:01:08 +02:00
Artem Belevich 3e9e6c9959 Fix versions of clang-17/18/19 (#7092) gh-13282 2024-11-12 21:00:01 +01:00
Partouf 1e95e058e4 fix lookupversion gh-13280 2024-11-12 18:31:22 +01:00
Mats Jun 050e135197 Remove unnecessary type assertion (#7081)
Removes an old TODO of mine :)

p-queue conditionally returns `undefined` if throwOnTimeout is not set
to true. We currently operate our own timeout check, so I haven't
changed that.

Setting timeout to undefined should give us the correct type without
affecting behavior.
https://github.com/sindresorhus/p-queue/blob/main/source/index.ts#L253
gh-13274
2024-11-12 21:30:23 +09:00
Nhat Nguyen 384d1bbe2d rename from beman_iterator to beman_iterator_interace (#7084) gh-13273 2024-11-12 12:59:05 +01:00
Artem Belevich 4d8cf9210b update CUDA compilation w/ clang (#7087)
<!-- 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-13268
2024-11-12 13:40:06 +09:00
Artem Belevich ce17f2f31c Add PTXAS versions matching newer CUDA SDK versions. (#7086)
<!-- 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-13267
2024-11-12 13:36:22 +09:00