Commit Graph

10104 Commits

Author SHA1 Message Date
Matt Godbolt
6151f28b34 Add TOML migration proposal document
This commit adds a detailed proposal for migrating Compiler Explorer's
configuration system from .properties files to TOML format. It includes:

- Analysis of current configuration system limitations
- Benefits of using TOML
- An audit of array usage patterns in current config files
- A phased migration approach
- Sample conversions showing how properties map to TOML
- Implementation considerations and timeline

The proposal addresses issues raised in #7150 and #7341 regarding
configuration readability and hierarchical inheritance.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
gh-14603
2025-04-26 23:21:16 -05:00
Matt Godbolt
b29fa95c05 Reinstate the 'latest' msvc gh-14602 2025-04-26 18:38:46 -05:00
Matt Godbolt
54e2dae21f Add comprehensive Configuration.md documentation (#7626)
This PR adds a detailed Configuration.md document that comprehensively
explains the Compiler Explorer configuration system. It covers:

- Configuration file structure and hierarchical loading
- Property types and automatic conversions
- List separators and specialized formats
- Group inheritance and compiler configuration
- Variable substitution mechanisms
- Advanced features like remote compilers and property debugging

Additionally, it updates all related documentation to reference this
central document for configuration details, reducing duplication and
ensuring consistency.

This document will serve as the foundation for future configuration
system improvements by providing clear documentation of the current
implementation.
gh-14601
2025-04-26 18:12:58 -05:00
Matt Godbolt
53493262cc Install more recent MS compilers (#7620)
Built using the instructions from
https://github.com/compiler-explorer/infra/pull/1589

Fixes up the "latest" and assumes the "Pre" we used to have are no
longer "pre" and instead makes the latest the latest released version.

Ulzii from MS has suggested there's new compilers coming, so I thought
I'd blow the cobwebs off the process so I can add the new ones when they
drop.

Will test in winstaging.
gh-14597
2025-04-26 14:23:39 -05:00
Matt Godbolt
04bcf21900 Bump to latest sentry; preload etc (#7617)
New node sentry prefers some node.js "preload" nonsense. I use this
"hack" to avoid having to make a lock-step change to the runner: tested
locally and then deployed to staging and tested there with both
server-side and client-side errors.
gh-14591
2025-04-26 13:36:11 -05:00
Matt Godbolt
cf7ef2aa3b Minor updates 20240424 (#7609) gh-14582 2025-04-25 21:33:49 -05:00
Detjon Mataj
c79e41f77a Remove dependency on request and replace it with node's builtin fetch (#6800)
resolves #5289
gh-14579
2025-04-25 21:24:07 -05:00
Marc Poulhiès
81de0528b2 Add native x86_64 GCC 15.1.0 (#7577)
refs https://github.com/compiler-explorer/compiler-explorer/issues/7549

---------

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
gh-14573
2025-04-25 20:37:05 +02:00
Matt Godbolt
993b8ec7a7 Cleanup post bootstrap 5 (#7608)
Remove some unnecessary functions and clarify docs.

---------

Co-authored-by: Claude <noreply@anthropic.com>
gh-14563
2025-04-24 18:41:55 -05:00
Matt Godbolt
e6de1495df Fix the embedded iframe buttons. Note to future selves: try and avoid… (#7606)
… styles as code indicators ... mea culpa
gh-14560
2025-04-24 15:06:45 -05:00
Matt Godbolt
82eff66c49 Handle items that don't exist in embedded mode; fix iframe generation (#7605)
Checked locally. Have no idea how the heck the quotes got changed....
gh-14557
2025-04-24 14:09:02 -05:00
Matt Godbolt
9e5fd3d377 Update Bootstrap5Migration.md with completed tasks and issue references
- Mark documentation update tasks as complete
- Add a comprehensive documentation section for custom component implementations
- Document key changes between Bootstrap 4 and 5 for each component type
- Add sections on event handling, CSS class changes, and special integration notes
- Track remaining tasks with GitHub issues (#7602, #7603, #7604)
- Update references from "beta site" to "live site"

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
gh-14551
2025-04-24 12:42:09 -05:00
Matt Godbolt
637564f389 Migrate to Bootstrap 5 (#7582)
This PR completes the migration from Bootstrap 4 to Bootstrap 5.3.5
following the plan outlined in
[docs/Bootstrap5Migration.md](https://github.com/compiler-explorer/compiler-explorer/blob/mg/bootstrap5/docs/Bootstrap5Migration.md).

## Migration Process

We followed a phased approach as documented in the migration plan:

1. **Phase 1: Dependency Updates and Basic Setup**
   - Updated Bootstrap from 4.6.2 to 5.3.5
   - Added @popperjs/core dependency (replacing Popper.js)
   - Updated Tom Select theme from bootstrap4 to bootstrap5

2. **Phase 2: Global CSS Class Migration**
   - Updated directional utility classes (ml/mr → ms/me)
- Updated floating utility classes (float-left/right → float-start/end)
   - Updated text alignment classes (text-left/right → text-start/end)

3. **Phase 3: HTML Attribute Updates**
- Updated data attributes to use Bootstrap 5 prefixes (data-bs-toggle,
data-bs-target, etc.)
   - Fixed tab navigation issues

4. **Phase 4: JavaScript API Compatibility Layer**
   - Created bootstrap-utils.ts compatibility layer
- Updated component initialization for modals, dropdowns, popovers, etc.

5. **Phase 5: Component Migration**
- Updated and tested specific components (modals, dropdowns, toasts,
etc.)
   - Fixed styling issues in cards and button groups

6. **Phase 6: Form System Updates**
   - Updated form control classes to Bootstrap 5 standards
   - Updated checkbox/radio markup patterns
   - Simplified input groups

7. **Phase 7: Navbar Structure Updates**
   - Updated navbar structure with container-fluid
   - Fixed responsive behavior

8. **Phase 8: SCSS Variables and Theming**
   - Added custom CSS fixes for navbar alignment
   - Verified theme compatibility

9. **Phase 9: Accessibility Improvements**
   - Updated sr-only to visually-hidden
   - Added proper ARIA attributes
   - Enhanced screen reader support

## Key Changes

- No more jQuery dependency in Bootstrap 5
- New prefix for data attributes (data-bs-*)
- Improved accessibility with ARIA attributes
- Updated positioning classes (start/end instead of left/right)
- Simplified input group structure

## Test Plan

1. **Navigation Testing**
   - Verify all dropdown menus open and close properly
   - Test mobile menu responsiveness
   - Check tab navigation in settings dialog

2. **Component Testing**
- Verify all modals open and close correctly (settings, share,
load/save)
   - Test tooltips and popovers
   - Check form controls in different dialogs

3. **Layout Testing**
   - Test responsiveness on different screen sizes
   - Verify proper alignment of elements
   - Check dark mode compatibility

4. **Specific Features to Test**
   - Compiler selection and options
   - Share dialog functionality
   - Settings dialog
   - Tree view (IDE mode)
   - Font selection dropdown

5. **Browser Testing**
   - Test in Chrome, Firefox, Safari
   - Test in mobile browsers

## Note on Further Improvements

After this migration is stable, we could consider Phase 12: removing
jQuery dependency entirely, as Bootstrap 5 no longer requires it. This
would be a separate effort.

---------

Co-authored-by: Claude <noreply@anthropic.com>
gh-14550
2025-04-24 12:10:37 -05:00
Artem Belevich
8232fbae8b [CUDA] update ptxas and clang compilers with recent CUDA SDK versions. (#7593) gh-14545 2025-04-24 07:58:34 -05:00
Tim Hutt
976576f57d Add extra PATH to Sail compiler so it can find Z3 (#7598)
The Sail compiler needs a copy of the Z3 SMT solver to compile Sail
code, and it includes one in its `bin` directory, but it doesn't
automatically look in the same directory for it; it needs to be on the
`PATH`. This adds the `bin` directory to the `PATH` so it should be able
to find it.
gh-14544
2025-04-24 07:57:12 -05:00
Marc Poulhiès
fb058d96a5 Update default.a68
Algol68 frontend has again changed some syntax, updating the example to match latest changes.
gh-14543
2025-04-24 09:47:16 +02:00
sarahhorvath
8580944136 Fix typo in README.md (#7599) gh-14538 2025-04-23 22:19:53 -05:00
Marc Poulhiès
d1073529e6 Update default.a68
Follow latest developments and update the default program.
gh-14528
2025-04-23 21:54:42 +02:00
Matt Godbolt
03fb43066a More library hacking notes (cc @partouf in case I made any obvious blunders) gh-14524 2025-04-23 10:51:05 -05:00
Patrick Quist
afdea17163 fix sway std path and build command (#7597) gh-14523 2025-04-23 15:53:49 +02:00
Matt Godbolt
c3ca289a05 Specifically allow OPTIONS for browser preflight CORS checks. (#7596)
Google AI suggested too (independently, I did this first then searched
and got:

---

1. Using Middleware
A middleware function can intercept OPTIONS requests and set the
appropriate CORS headers.

```js
app.use(function(req, res, next) {
  res.header("Access-Control-Allow-Origin", "*");
  res.header("Access-Control-Allow-Methods", "GET,PUT,POST,DELETE,OPTIONS");
  res.header("Access-Control-Allow-Headers", "Content-Type, Authorization");
  if (req.method === 'OPTIONS') {
    res.sendStatus(200);
  } else {
    next();
  }
});
```
---

Tested locally with curl on GET, OPTIONS, and POST and correctly lets
OPTIONS return an empty CORS block, etc. And the site works too :)

---------

Co-authored-by: Mats Jun Larsen <mats@jun.codes>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
gh-14516
2025-04-22 21:29:04 -05:00
Hana Dusíková
558d04ff71 add clang -fimplicit-constexpr branch (#7591) gh-14508 2025-04-22 13:59:44 -05:00
许荣东
ae83e50777 Add RapidJSON C++ library (#7530)
related issue:
https://github.com/compiler-explorer/compiler-explorer/issues/6942

Co-authored-by: Matt Godbolt <matt@godbolt.org>
gh-14507
2025-04-22 13:58:53 -05:00
narpfel
355d49ec63 [c2rust]: allow passing arguments to clang (#7583)
To pass arguments to `clang` (such as `-std=...`), `--` must be used to
separate these arguments from the arguments to `c2rust`:

```console
$ ./c2rust-transpile --help
transpile 0.20.0
[...]
USAGE:
    c2rust-transpile [OPTIONS] [COMPILE_COMMANDS]... [-- <EXTRA_CLANG_ARGS>...]
```

However, when doing this, the input file must be passed *before* the
`--`. Also, when libraries are enabled, the include and link flags must
be passed to `clang` (but duplicate `--` are not allowed).

Example for passing command line arguments:
https://godbolt.org/z/eqfa3T7WY
Example for activating a library: https://godbolt.org/z/srh55Y1hY
gh-14506
2025-04-22 13:55:17 -05:00
Jamie
4256d8437d [swift]: add 6.1 arm release compiler (#7578)
adds a config entry for cross compiling to arm for the 6.1 release
compiler. necessary infra changes added in
https://github.com/compiler-explorer/infra/pull/1564. tested that the
new config should work by manually adding the flags here:
https://swift.godbolt.org/z/EPrsbKPf4.
gh-14505
2025-04-22 13:54:35 -05:00
Andy Soffer
45af54f180 Make the Bronto Refactor Tool available for C++ compilations (#7555)
"Bronto Refactor" is a tool that reads annotations in C++ source code
and generates edits based on those annotations. For CE specifically, it
outputs a copy of the primary file with the modifications applied.
Documentation can be found
[here](https://github.com/brontosource/bronto/blob/main/include/bronto/bronto.hpp)
and will also be made available at http://brontosource.dev in a nicer
format before this PR is merged.

I've attached a screenshot which hopefully conveys the idea.

One question I have is about how to actually deliver the tool. It is not
publicly available, but we do want folks to be able to play around with
it. We're happy to have you build it from source or we can deliver a
prebuilt binary, whatever is preferable.

This is my first time contributing here. I think I've got everything set
up appropriately (including sibling PR
https://github.com/compiler-explorer/infra/pull/1569 to the infra
repository) but please let me know if I'm missing anything.


<img width="1723" alt="BrontoRefactorToolScreenshot"
src="https://github.com/user-attachments/assets/cd605358-b7f2-49e8-9845-b6f3056fa4ef"
/>
gh-14504
2025-04-22 13:48:57 -05:00
Patrick Quist
ad6b2e6731 Execution fixes (when using architectures that cant run) (#7588) gh-14501 2025-04-22 19:31:09 +02:00
Radu Nichita
814c346098 Add beman.any_view library (#7580)
Add beman.inplace_vector library trunk version - #7579 
Infra PR - https://github.com/compiler-explorer/infra/pull/1579
Beman Issue - https://github.com/bemanproject/any_view/issues/10

Tested these changes on my laptop running Ubuntu 22.04

Signed-off-by: Radu Nichita <radunichita99@gmail.com>
gh-14499
2025-04-22 07:58:06 -05:00
jaheikk
4a4316f146 Update Qt 6.9.0 (#7589)
Qt 6.9.0 release in c++.amazon.properties

infra PR here: https://github.com/compiler-explorer/infra/pull/1581
gh-14498
2025-04-22 07:54:03 -05:00
Johan Engelen
2394a80944 Add LDC 1.40.1 and make it the default D compiler (#7587)
infra: https://github.com/compiler-explorer/infra/pull/1580
gh-14494
2025-04-21 11:50:01 -05:00
narpfel
ae21fbbffc Make default Rust code compatible with 2024 edition (#7581) gh-14485 2025-04-20 04:52:25 +00:00
narpfel
8f08dae192 Add description and URL for cs50 library (#7584) gh-14484 2025-04-20 04:49:46 +00:00
Matt Godbolt
f493348115 Maybe resurrect coverage? gh-14483 2025-04-19 23:01:06 -05:00
Matt Godbolt
20048616da Migrate to express 5 (#7572)
Main changes:
- type checker cares about the return value (`void`) of handlers, so no
more `return res.send("...")` as that returns `express` type.
- regexes on slugs no longer supported, but we weren't really using them
in any meaningful way. The two places that had to be updated:
- `/clientstate/:clientstate64` - now uses a regex directly and tests added (thanks @partouf for spotting #4844)
- `/bits/:bits.html` - was some `\w+` but I believe that's unnecessary
for the same reasons
- actually call the Sentry handler. I don't know if this actually worked
before but the API checks suggest not.
gh-14474
2025-04-19 14:34:41 -05:00
Matt Godbolt
6400235a18 Drop dependency on fs-extra (we removed it a while back) gh-14469 2025-04-19 13:56:20 -05:00
Ofek
2d74bb24aa Fix #7573: Handle catchswitch, catchret and cleanupret LLVM-IR block terminators (#7574) gh-14464 2025-04-18 06:39:16 +03:00
Tim Hutt
d1d0883a86 Add support for the Sail language (#7304)
This adds support for the [Sail
language](https://github.com/rems-project/sail) - a DSL for defining
ISAs.

It's not quite ready but I need some help. These are the main remaining
issues:

1. When you "link to binary" it does disassemble the binary properly,
but the syntax highlighting and line numbers are broken.


![image](https://github.com/user-attachments/assets/2f4fe12c-49b4-4b26-9cb0-7e1666a7b3a2)

2. If you try to execute the code without a `function main() -> unit =
...` then it gives this error in the compiler output:

```
Internal Compiler Explorer error: Error: spawn /tmp/compiler-explorer-compiler2025025-31052-c8gern.pf8t/model.c EACCES
    at ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:483:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Compiler returned: -1
```

This is weird - it should give a linker with an undefined reference to
`zmain`.

3. Sail compiles to C, and then I added extra steps to compile that to
binary (if you select `Execute the code`), but as you can see I had to
move the binary back over the C file, so in this case `model.c` is
actually an ELF file. It works but that seems very weird. There is a
`getExecutableFilename()` method I could override, but doing that seems
to make it even more confused.

4. I also had to have a fake flag for `binary` because the `filters`
don't seem to get set correctly when passed to `runCompiler()`. E.g.
`buildExecutable()` doesn't pass them at all. Not sure what is going on
there. Seems to work though.

Any help appreciated!

PS: Sail is a cool language. It has lightweight dependent type for
integers and bit vectors, which I haven't demonstrated in the examples
yet, but they're neat.

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
gh-14462
2025-04-17 17:22:18 -05:00
narpfel
98c91227fa Fix go-to label with position-independent code (#7522)
Resolves #7521.

With this PR, `@...` suffixes are included in the clickable area for
go-to label.

This also affects PowerPC, where `@...` suffixes are a bit more common
(`@ha` and `@l` will also be marked as clickable).

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
gh-14448
2025-04-17 12:25:28 -05:00
Vlad Serebrennikov
697d69f456 Enable binary support for Clang (assertions) 2.8 and 3.0 (#7523)
This PR accompanies
https://github.com/compiler-explorer/clang-builder/pull/84.
Those new build of Clang 2.8 and 3.0 should be capable of compiling a
C++ hello world that can be successfully executed.
No other changes should be necessary, because new builds should be
compatible with the old ones.

Co-authored-by: Vlad Serebrennikov <serebrennnikov.vladislav@gmail.com>
gh-14446
2025-04-17 12:05:35 -05:00
Matt Godbolt
3b7599d817 Update chart and copy webpack (#7570)
Very uncontentious bumps...
gh-14436
2025-04-15 13:27:05 -05:00
jmuddnv
57edf13d76 Changes for NVIDIA HPC SDK 25.3 (#7520)
Add nvc 25.3 to etc/config/c.amazon.properties
Add nvc++ 25.3 to etc/config/c++.amazon.properties
Add nvfortran 25.3 to etc/config/fortran.amazon.properties
Add CUDA 12.8.1 to etc/config/cuda.amazon.properties
gh-14431
2025-04-15 11:23:56 -05:00
Radu Nichita
1e13b5afae Add beman.inplace_vector library trunk version (#7568)
Add beman.inplace_vector library trunk version -
https://github.com/compiler-explorer/compiler-explorer/issues/7567
Infra PR - https://github.com/compiler-explorer/infra/pull/1574


Tested these changes on my laptop running Ubuntu 22.04

Signed-off-by: Radu Nichita <radunichita99@gmail.com>
gh-14428
2025-04-15 10:49:49 -05:00
Wouter Deconinck
01a7452163 Add spdlog also to c++ (#7565)
I'm so sorry for the follow-up PR. In #7532 I had just changed all files
that refer to spdlog according to a
[search](https://github.com/search?q=repo%3Acompiler-explorer%2Fcompiler-explorer%20spdlog&type=code),
but it seems that doesn't return c++.amazon.properties. Weird... (GitHub
probably only indexes the first 2000 lines or so).

In any case, this PR adds the same lines as in #7532 to
`etc/config/c++.amazon.properties` as well. Again, apologies this didn't
get included in a single PR.
gh-14427
2025-04-15 10:36:02 -05:00
Matt Godbolt
58fec88694 Add a little more clarity on how libraries work gh-14426 2025-04-15 10:34:06 -05:00
Mats Jun Larsen
5e2937fdf9 Configure packageManager field to enable corepack compatability (#7534) gh-14422 2025-04-15 04:10:18 +00:00
Matt Godbolt
6801d7b9a9 Update latest everything (minor only) (#7564) gh-14419 2025-04-14 16:01:11 -05:00
Adrien Bertrand
9e7808b13c Add (e)z80-clang compilers. (#7546)
These clang + LLVM backends are not upstreamed but [a community
effort](https://github.com/CE-Programming/llvm-project/), so it's a bit
customized.

This requires https://github.com/compiler-explorer/infra/pull/1566

_Edit: tested locally, works fine._
gh-14416
2025-04-14 15:17:39 -05:00
Allison Piper
1dc33c1080 Add CCCL 2.8.1, 2.8.2. (#7545)
<!-- 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: Matt Godbolt <matt@godbolt.org>
gh-14411
2025-04-14 13:01:07 -05:00
Wouter Deconinck
cb43499411 fix: add newer spdlog versions (#7532)
This PR adds the newer versions of `spdlog` from
https://github.com/compiler-explorer/infra/pull/1558.
gh-14409
2025-04-14 12:23:50 -05:00
Thomas Padioleau
f91cd3cb6d Add Kokkos 4.5.01 and 4.6.00 (#7556)
Related to https://github.com/compiler-explorer/infra/pull/1570.
gh-14408
2025-04-14 12:14:30 -05:00