Commit Graph
10189 Commits
Author SHA1 Message Date
Matt GodboltandClaude 9150f2feea Refactor Google shortener resolve method for improved maintainability
Split the large resolve() method into smaller, focused methods:
- extractFragment(): handles URL fragment extraction
- hasDynamoDbConfigured(): checks DynamoDB availability
- tryDynamoDbLookup(): handles DynamoDB lookup with error handling
- fallbackToGoogleShortener(): handles Google API fallback

Added comprehensive unit tests for the utility methods covering various URL formats and edge cases.

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

Co-Authored-By: Claude <noreply@anthropic.com>
gh-14942
2025-05-26 13:07:04 -05:00
Matt GodboltandClaude 911cf6134d Add metrics and warnings for Google shortener DynamoDB lookups
- Add Prometheus counters for successful DynamoDB hits and misses
- Log warnings when links are not found in DynamoDB (expected to be comprehensive)
- Track fallback usage to Google URL shortener for monitoring purposes

These metrics will help identify missing data in DynamoDB and monitor
the transition from Google URL shortener to our own storage.

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

Co-Authored-By: Claude <noreply@anthropic.com>
gh-14940
2025-05-26 12:59:18 -05:00
Matt GodboltandClaude 93c533251e Migrate Google shortener from SQLite to DynamoDB
- Replace SQLite database with DynamoDB for Google link resolution
- Add awsProps to ServerDependencies and pass through component hierarchy
- Configure googleLinksDynamoTable property in AWS config files
- Maintain backwards compatibility with fallback to Google service
- Update tests to accommodate new awsProps parameter

This change prepares for the retirement of goo.gl by storing link
mappings in DynamoDB instead of SQLite, while keeping the Google
service fallback until August 2025.

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

Co-Authored-By: Claude <noreply@anthropic.com>
gh-14938
2025-05-26 12:45:57 -05:00
Matt Godbolt 93386faeec Fix google-tests.ts to match updated error message
The test was expecting 'Missing location url in null' but the implementation
now returns 'Missing location url' after the recent improvement to error messages.
gh-14935
2025-05-25 16:11:31 -05:00
Matt Godbolt f1262d614c Merge remote-tracking branch 'origin/main' into mg/google_est_mort 2025-05-25 15:56:47 -05:00
Spencer Fricke c2a02c7d8f Update Khronos Logos (#7726) gh-14932 2025-05-25 16:12:33 +00:00
Patrick Quist 7f393e6763 Refactor objdump execution to use BaseObjdumper class (#7715) gh-14928 2025-05-25 17:21:01 +02:00
Matt Godbolt 85a0ae55ef Improve error message for missing Location header
Remove confusing null value reference in error message as suggested
by code review feedback.
2025-05-24 21:59:08 -05:00
Matt Godbolt 8a73c47e94 Fix NULL value comparison in SQLite database
Use JavaScript null instead of string 'NULL' for proper comparison
with SQLite NULL values. Update TypeScript types accordingly.
gh-14923
2025-05-24 21:57:46 -05:00
Matt GodboltandClaude 2950e53f1d Add optional SQLite database support for Google URL shortener
- Update ShortLinkResolver to accept optional SQLite database path
- First check database for fragment lookup before falling back to Google
- Return 404 if expanded_url is 'NULL' in database
- Refactor resolve method to use async/await instead of raw promises
- Add googleShortLinkSqlitePath configuration property support

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

Co-Authored-By: Claude <noreply@anthropic.com>
gh-14921
2025-05-24 21:49:08 -05:00
Patrick Quist b99653804c Update SupportedEmulators.md gh-14916 2025-05-24 19:29:25 +02:00
Patrick Quist 6fb3ab38e7 Add Game Boy emulator support using WasmBoy (#7717) gh-14915 2025-05-24 18:43:41 +02:00
narpfel 91a2d58aa2 Make 2024 the default edition for Rust >= 1.85 (#7649)
Resolves #7472.
gh-14897
2025-05-23 03:01:26 +02:00
Rob Parolin f7f5ddc32c [Mojo] Removing 25.3.0 release from live site. (#7711)
Removing the Mojo 25.3.0 release from the live site due to mismatch of
command lines for dumping llvm-ir and asm. The nightly functions
correctly.
gh-14884
2025-05-22 11:30:57 -05:00
Matt Godbolt 8772251b40 Fix up mojo config. 25.3 fails; so made nightly the default. cc @rparolin re: #7692 gh-14881 2025-05-21 20:19:23 -05:00
Matt Godbolt d2b46a7825 Handle case when the tool goes away 2025-05-21 20:12:12 -05:00
Matt GodboltandClaude 8106ccdad9 Fix static URL double slash issue in CDN asset paths (#7709)
## Summary
Fix production CDN loading issues where URLs like
`https://static.ce-cdn.net//vendor.v57...css` (double slash) were being
generated when the `staticUrl` config has a trailing slash.

## Root Cause
PR #7681 refactored static asset handling and replaced
`urljoin(staticRoot, path)` with `${staticRoot}/${path}` string
interpolation, losing URL normalization that `urljoin` provides.

## Changes
- Replace string interpolation with `urljoin()` in
`createDefaultPugRequireHandler()`
- Add comprehensive tests covering all trailing slash scenarios
- Maintain full backward compatibility with existing configurations

## Test plan
- [x] All existing tests pass
- [x] Added 4 new test cases for static URL handling with various slash
scenarios
- [x] Verified TypeScript compilation and linting
- [x] Tested production CDN scenario where
`staticUrl=https://static.ce-cdn.net/`

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

Co-authored-by: Claude <noreply@anthropic.com>
gh-14880
2025-05-21 17:27:06 -05:00
jmuddnv 64f9a94d9c Changes for NVIDIA HPC SDK 25.5 (#7706)
Add nvc 25.5 to etc/config/c.amazon.properties
       Add nvc++ 25.5 to etc/config/c++.amazon.properties
       Add nvfortran 25.5 to etc/config/fortran.amazon.properties
       Add CUDA 12.9 to etc/config/cuda.amazon.properties
gh-14877
2025-05-21 16:21:26 -05:00
Matt Godbolt a5903c0867 Fix issues introduced in #7681 (#7707)
- healthcheck got accidentally unwired
- CSP was accidentially "done" (was a TODO)
gh-14876
2025-05-21 16:20:51 -05:00
David Spickett 5eb02b5737 Assembly: Add new GNU AS versions for Arm and AArch64 (#7705)
Follow up to
https://github.com/compiler-explorer/compiler-explorer/pull/7540.

Fixes #7528

Last time I tried this, the 14.2.0 GCC builds were still using 2.38 for
Arm and AArch64, now there are 15.1.0 builds and those both use 2.44.

Which I have confirmed locally:
$
/opt/compiler-explorer/arm64/gcc-15.1.0/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-as
--version
GNU assembler (GNU Binutils) 2.44

$
/opt/compiler-explorer/arm/gcc-15.1.0/arm-unknown-linux-gnueabihf/bin/arm-unknown-linux-gnueabihf-as
--version
GNU assembler (GNU Binutils) 2.44

While I'm here, I added 2.38 to Arm since it was missing. From the GCC
13.2.0 build:
$
/opt/compiler-explorer/arm/gcc-13.2.0/arm-unknown-linux-gnueabihf/bin/arm-unknown-linux-gnueabihf-as
--version
GNU assembler (GNU Binutils) 2.38
gh-14872
2025-05-21 13:54:04 -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.
gh-14871
2025-05-21 13:53:05 -05:00
Spencer Fricke a154c7d514 Update SPIR-V and Slang version (#7676)
Update the online version for SPIR-V and Slang compilers for the Vulkan
309 SDK to correspond with
https://github.com/compiler-explorer/infra/pull/1611
gh-14869
2025-05-21 13:11:53 -05:00
Matt Godbolt f94ff8332a Refactor: Split app.ts into smaller modules (#7681)
## Summary
This PR significantly improves maintainability by breaking up the 880+ line monolithic app.ts file into smaller, focused modules with proper testing. The code is now organized into dedicated modules under the lib/app/ directory, making the codebase more maintainable and testable.

## Key changes
- Extract functionality into modules under lib/app/ directory:
  - Command-line handling (cli.ts)
  - Configuration loading (config.ts)
  - Web server setup and middleware (server.ts)
  - Core application initialization (main.ts)
  - URL handlers, routing, rendering, and controllers
- Add comprehensive unit tests for all new modules
- Make compilationQueue non-optional in the compilation environment
- Improve separation of concerns with dedicated interfaces
- Ensure backward compatibility with existing functionality
- Maintain cross-platform compatibility (Windows/Linux)

## Benefits
- Improved code organization and modularity
- Enhanced testability with proper unit tests
- Better separation of concerns
- Reduced complexity in individual files
- Easier maintenance and future development

This refactoring is a significant step toward a more maintainable codebase while preserving all existing functionality.
gh-14865
2025-05-20 17:53:24 -05:00
Patrick Quist ac4642283c fix pascal execution (#7695)
Fixes #7224
gh-14860 gh-14854
2025-05-20 13:19:31 +02:00
Patrick Quist 447737db5b add ld info to CompilationInfo for tools (#7697)
Fixes #7306
gh-14853
2025-05-20 13:15:27 +02:00
Marc Auberer 48d93569a6 [Spice] Add version 0.22.2 (#7689)
Infra PR: https://github.com/compiler-explorer/infra/pull/1620
gh-14848
2025-05-19 13:54:40 -05:00
aneshlya 5e036fb062 Add ISPC v1.27.0 (#7694)
Adding ISPC v1.27.0. Related change
https://github.com/compiler-explorer/infra/pull/1622
gh-14847
2025-05-19 13:53:59 -05:00
Ilya Baryshnikov f9c3355c6d Add GHC 9.8.4, 9.10.2 and 9.12.2 (#7686)
[issues#7671](https://github.com/compiler-explorer/compiler-explorer/issues/7671)
[infra#1617](https://github.com/compiler-explorer/infra/pull/1617)
gh-14846
2025-05-19 13:53:19 -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.
gh-14837
2025-05-19 06:51:21 -05:00
Miguel Ojeda e1f11b6436 Rust 1.87.0 (#7698) gh-14828 2025-05-18 13:53:40 +00: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)
gh-14826
2025-05-17 12:21:11 +03:00
Patrick Quist bd9e2d4cbc fix remote libraries listing backend and frontend (#7688) gh-14813 2025-05-16 16:53:40 +02:00
narpfel c157507f72 Show source in stack usage view (#7691) gh-14806 2025-05-15 20:28:34 +02:00
Andrew Kvapil 10691b6225 Install recent Kotlin (#7690) gh-14801 2025-05-15 17:04:05 +00:00
kevinjeon-g 3fcd74ffa8 Add kotlinx.coroutines to Kotlin (#7685) gh-14794 2025-05-14 08:27:21 -05:00
Matt Godbolt c34a299b1c Claudisms gh-14791 2025-05-13 20:32:59 -05:00
Matt Godbolt da1ff6dc98 Update vitest instructions for claude gh-14780 2025-05-13 16:59:07 -05:00
Partouf ca5e088d1f skip stdver matching gh-14777 2025-05-13 21:58:58 +02:00
Matt Godbolt fcfa918155 Explain Britishness gh-14776 2025-05-13 14:50:03 -05:00
kevinjeon-g ff8fd43e1f Update Makefile --webpack-content to --static (#7683)
<!-- 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-14770
2025-05-13 12:50:59 -05:00
Matt Godbolt ad8b991a0c Fix npm run check (not that I think anyone uses it?) gh-14764 2025-05-13 11:41:48 -05:00
Matt Godbolt d7330ce3d5 (re-)support comma separation for languages gh-14747 2025-05-12 14:46:34 -05:00
Matt Godbolt 07d1f7aa50 webpack content -> static gh-14746 2025-05-12 13:33:00 -05:00
Matt Godbolt 1dab667564 Support hostnameForLogging too, more out of date refences gh-14745 2025-05-12 12:59:57 -05:00
narpfel 703b13ae01 Fix Rust edition argument parser (#7652)
* For `nightly` Rust (and 1.88+), the output format of `--help` was
changed in https://github.com/rust-lang/rust/pull/140152.
This PR changes the parser to parse the new format, so that edition
overrides are selectable for `nightly` Rust. Note the `<>`:
  ```
          --edition <2015|2018|2021|2024|future>
Specify which edition of the compiler to use when
compiling code. The default is 2015 and the latest
                          stable edition is 2024.
  ```
* Rust <= 1.34 (and >= 1.31) support the 2018 edition, but the help
message only includes `--edition` in verbose mode.
gh-14744
2025-05-12 12:54:48 -05: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)
gh-14743
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
gh-14742
2025-05-12 12:52:56 -05:00
Abhilash Majumder 4649b3dd0e Add PTX as a separate module from assembler (#7615) gh-14741 2025-05-12 12:51:03 -05:00
Matt GodboltandClaude 54c942ba76 Replace nopt with commander.js for argument parsing (#7673)
- Replace nopt with commander.js for better command-line argument parsing
- Add automatic help generation with detailed descriptions
- Maintain backward compatibility with existing arguments
- Remove unused nopt dependency from package.json

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
gh-14740
2025-05-12 12:49:28 -05:00
Mosè GiordanoandValentin Churavy 1e07e16758 Adapt Julia wrapper to v1.12 (#7634)
This is needed for https://github.com/JuliaLang/julia/issues/58286.

CC @vchuravy.

---------

Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com>
gh-14739
2025-05-12 12:44:10 -05:00