2617 Commits
Author SHA1 Message Date
Patrick Quist 6fb3ab38e7 Add Game Boy emulator support using WasmBoy (#7717) 2025-05-24 18:43:41 +02:00
Matt Godbolt d2b46a7825 Handle case when the tool goes away 2025-05-21 20:12:12 -05:00
Rob Parolin a0b48fb7e0 Add Mojo compiler (#7692)
This PR adds support for the Mojo programming language.

Explicitly tested viewing the generated assembly, LLVM IR, and running
the generated executable.
2025-05-21 13:53:05 -05:00
Matt Godbolt 74e5f237eb Update all the things (#7699)
All minor updates, commander was one major update but only to support
node 20 (which we're already past).

Tests pass, everything loaded up locally.
2025-05-19 06:51:21 -05:00
narpfel 937c07c38d Show opt remarks in a view zone instead of as editor content (#7687)
Resolves #7662.

[View
zones](https://microsoft.github.io/monaco-editor/typedoc/interfaces/editor.IViewZone.html)
are rendered in the editor widget but don’t count as lines themselves.
Monaco doesn’t automatically grow them to fit their content (and doesn’t
extend the scroll area to fit them when the text is rendered without
line breaks), so the height must be calculated manually.

Additionally, this changes the remarks to be *above* the line they are
attached to. This is more intuitive in my opinion, but can be reverted
again if you prefer.

Comparison:

before:

![opt_view_before](https://github.com/user-attachments/assets/7cd34349-4a97-4da8-b3c4-ec197542fb35)

after:

![opt_view](https://github.com/user-attachments/assets/c731ae02-b626-44d7-a9a2-77743747733d)
2025-05-17 12:21:11 +03:00
Patrick Quist bd9e2d4cbc fix remote libraries listing backend and frontend (#7688) 2025-05-16 16:53:40 +02:00
narpfel c157507f72 Show source in stack usage view (#7691) 2025-05-15 20:28:34 +02:00
Abril Rincón Blanco 6ff184857d Fix conformance compiler output title not showing (#7651)
Closes
https://github.com/compiler-explorer/compiler-explorer/issues/7648

In Boostrap 5, `disabled` buttons now have `pointer-events: none`
([Changelog here](https://getbootstrap.com/docs/5.0/migration/#buttons))
which disables the `title` contents popping up.

This PR fixes it by making it a default `badge`, which keeps the same
layout as buttons, but is not clickable by default, much better than
having a `disabled` button never meant to be clicked.

It also slightly changes the padding of the buttons to give them some
breathing space, and fixes a dark background on the pink theme (Found
while testing that all themes worked properly with the `badge`)


![image](https://github.com/user-attachments/assets/a9cb3637-9540-414f-93bd-ef98b7145c7f)
2025-05-12 12:53:43 -05:00
Abril Rincón Blanco e76c78ccc0 Fix system light theme timing widget visibility (#7653)
Closes
https://github.com/compiler-explorer/compiler-explorer/issues/7647

Fixed timing widget for light system:
<img width="534" alt="Captura de pantalla 2025-05-04 a las 23 32 11"
src="https://github.com/user-attachments/assets/23ea9e4c-160c-40ab-a1f7-aa3976ba4a0b"
/>

Also made the pink theme use the default chart.js colours, as I think
they have more contrast than white-on-pink
2025-05-12 12:52:56 -05:00
Rucadi aa5c02fa70 Add Nix Language (#6198) 2025-05-11 16:07:40 -05:00
Matt Godbolt d51ec96944 Reinstate and restyle load/save button (#7642)
Not quite sure what happened here: the display: none came from change
ef7db1af1d and we can't quite work out how
it was working then.

Fixes #7641
2025-05-01 15:14:15 -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.
2025-04-26 13:36:11 -05:00
Matt GodboltandClaude 993b8ec7a7 Cleanup post bootstrap 5 (#7608)
Remove some unnecessary functions and clarify docs.

---------

Co-authored-by: Claude <noreply@anthropic.com>
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
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....
2025-04-24 14:09:02 -05:00
Matt GodboltandClaude 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>
2025-04-24 12:10:37 -05:00
Patrick Quist ad6b2e6731 Execution fixes (when using architectures that cant run) (#7588) 2025-04-22 19:31:09 +02:00
Tim HuttandMatt Godbolt 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>
2025-04-17 17:22:18 -05:00
narpfelandMatt Godbolt 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>
2025-04-17 12:25:28 -05:00
OfekandOfek Shilon 32a8e23185 Fix #7464: resolve TomSelect glitch by delaying active option setting (#7558)
<!-- 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: Ofek Shilon <oshilon@speedata.io>
2025-04-11 16:07:40 +03:00
Abril Rincón Blanco 9822030e01 Fix goldenlayout dropdowns z-index fight with Monaco's minimaps (#7478)
Fixes a z-index fight among goldenlayout's dropdowns and the editor's
minimap, which both had a z-index of 5 - Let goldenlayout's win by 1 now

Closes
https://github.com/compiler-explorer/compiler-explorer/issues/7473
2025-03-09 18:57:56 +01:00
Ofek be9b6f3bd7 Fix #7464: need both clear and clearOptions on gccdump's TomSelect (#7465) 2025-02-28 21:41:39 +02:00
Ofek e01aa3e691 Various type improvements 2025-02-26 02:07:09 +02:00
Ofek 05d390b742 Fix #7296: clearOptions instead of clear for gcc pass selector (#7451) 2025-02-25 23:36:13 +02:00
Ofek 604c46e6ec Fix #7425: Fix an edge case in asm jump-to-label (#7447) 2025-02-25 22:59:08 +02:00
Joshua BattyandMatt Godbolt b272efdb53 Add sway compiler (#7409)
Should be pretty self explanatory. I've added a corresponding PR to the
infra repo [here](https://github.com/compiler-explorer/infra/pull/1532)

Please let me know if there is anything I've done incorrectly here!
Thanks

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2025-02-24 09:38:13 -06:00
Marc Auberer 210f92cb1f [Spice] Add cast keyword (#7414) 2025-02-20 07:23:33 +00:00
Ofek d3ce34dca6 Fix #7398: call layout.init only after SiteSettings are in place (#7402) 2025-02-18 21:31:10 +02:00
Ofek 55cf8f519c Fix depracation warnings (#7395)
Sass `transparentize` is deprecated:
https://sass-lang.com/documentation/breaking-changes/color-functions/
2025-02-14 22:19:38 +02:00
Mats Jun Larsen 127c12e0bf Re-enable noShadowRestrictedNames Biome rule (#7387)
I'm not very opinionated on this, but I think it makes enough sense to
do
2025-02-13 00:43:55 +09:00
Mats Jun Larsen be1e1972c7 Re-enable noConfusingVoidType and noVoidTypeReturn Biome rules (#7372)
Re-enables these rules and fixes the one spot it was applicable. Infact,
noConfusingVoidType had zero matches (because they were fixed in #7080)
2025-02-10 16:50:31 +00:00
Mats Jun Larsen df522e9831 Re-enable useLiteralEnumMembers Biome rule (#7374)
Disabled the lint for the only match as the code is mostly ported from
cutter's graph engine.
2025-02-10 16:50:22 +00:00
Ofek 1aef3f3863 Fix default imports/exports to be ES6 conformant (#7383)
<!-- 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!
-->
2025-02-09 22:33:36 +02:00
Ofek f63cee7f9f Add missing js suffixes to imports (#7382)
Seems to be required by es6 and accepted by the current es5
2025-02-09 21:55:48 +02:00
Mats Jun Larsen 5eea63328f Migrate to Biome for linting and formatting (#7033) 2025-02-02 17:54:31 +00:00
Ofek e2fc92f420 Overhaul 'history' look (#7352)
Single tab, no diffs - single source display, no list bullets, added spacing, added syntax highlighting.
2025-02-01 21:29:29 +02:00
Spencer FrickeandMatt Godbolt e7be83e9db Fix number regex for SPIR-V parser (#7340)
I noticed things like `Int64`, `GLSL450`, and `2D` were multi-colored. This fixes them by treating all Capitalised123 things as tokens.

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2025-01-30 10:19:39 -06:00
narpfel ccd62cfc61 Parse terminal hyperlinks in command output (#7318)
Some compilers (such as `gcc` and `rustc`) support emitting hyperlinks
to the documentation for error messages and/or warnings. This PR adds a
parser for the respective `OSC 8` ANSI escape sequence (see
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda) and
makes them clickable in the output window.

For example: https://godbolt.org/z/o1v7WzPc6

For GCC, this would make `-Wreturn-type` a clickable link to
https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wno-return-type.

For Rust, this would make `E0425` a clickable link to
https://doc.rust-lang.org/error_codes/E0425.html.

Note that this also applies to execution output. A malicious program
could (when executed) produce output that contains clickable links to
anything.

Related feature requests:
* #5284 for `rustc` (`-Z terminal-urls=yes`)
* #7310 for `gcc` (`-fdiagnostics-urls=always`)
2025-01-29 10:46:17 -06:00
Matt Godbolt 9541e1e8d8 Mitigations for CL labels (#7320)
Some syntax highlighting improvement for CL asm lines like:

```as
int * moo DD  01H                       ; moo
```

and

```as
?mooz@@3PAFA DW 01H                                 ; mooz
```

where previously the DD (or DW DQ) wasn't syntax highlighted, making it
harder to spot the case where CL puts the first defined value of an
array on the same line as the label definition.

This isn't perfect, and might be fairly expensive, but helps mitigate
issue #1645, hopefully well enough to close it.

Tested locally with gcc and clang output, and then pasted into
Monarch/Monaco and tested with some CL output.
2025-01-29 10:33:22 -06:00
Waqar Ahmed e0e2420482 Improve odin codegen processing (#7228)
- Builtin runtime functions __$startup_runtime, __$cleanup_runtime, __$*
are now filtered out
- Label matching regex is fixed for odin, see OdinAsmParser class. This
ensures we filter out all labels that don't belong to the current file
- Slightly improved editor support, auto bracket closing and commenting
via keyboard shortcuts works now
- procedures within the file are automatically @require as requested by
GingerBill (odin lang creator).

There still are a lot of unused labels with data definitions that dont
get filtered out.

#7210
2025-01-06 15:49:15 -06:00
Spencer Fricke fc3f37e1f9 Add Monaco LangConfiguration to GPU languages (#7235)
I realize basic things like `ctrl`+`/` and auto complete `}` for my `{`
were missing from HLSL/GLSL/Slang

After digging, found that it was just a lack of setting
`setLanguageConfiguration` for the monaco-editor for each of them

Confirmed the config in
`node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.js` suites
the 3 languages (as they are also all derived from C based languages)
2024-12-20 08:41:18 -06:00
Ofek 97b5735c21 Opt-remarks for gcc (#7230)
![gccoptrem](https://github.com/user-attachments/assets/4662c5d1-3a4e-443b-a989-bc4dc109e90b)
2024-12-20 10:19:33 +02:00
Johel Ernesto Guerrero Peña 0a2f5f2655 feat: update grammar of Cpp2 (#7217)
This is an update to #6950.
The test cases: <https://highlight-cpp2.godbolt.org/z/Wbve44Mjv>.

<details><summary>Preview</summary>


![1734028425](https://github.com/user-attachments/assets/88b975bb-fdbb-41f8-a9b5-8a5db8706dbb)

</details>

Resolves #7153.
2024-12-13 04:08:09 -06:00
Spencer Fricke e7c16e1892 Add remaining Slang keywords (#7208)
closes
https://github.com/compiler-explorer/compiler-explorer/issues/7180

Worked with Slang developers on discord and put together a list of
keywords that should be good and when I update the Slang version in the
future can find a change list to include anything that changes then
2024-12-09 08:06:44 -06: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
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
2024-12-08 00:59:58 +09:00
Waqar Ahmed d3ef2de208 Add Odin language (#7186) 2024-12-06 17:28:47 +01: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)
2024-12-04 04:45:50 -06: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).
2024-12-02 10:41:12 +02:00
Partouf 99de0f1dac hotfix diff view 2024-11-28 10:03:19 +01:00