## What
Adds [Revive's Resolc](https://github.com/paritytech/revive) compiler
for compiling Solidity and Yul (Solidity IR) to RISC-V and PolkaVM
assembly.
### Main Additions
- [x] Implement new `ResolcCompiler`
- [x] Implement Yul language definition and config for Monaco
- [x] Add Resolc as a compiler for the Solidity and Yul languages
- The `ResolcCompiler` handles both kinds of language input
- [x] Implement initial `PolkaVMAsmParser` (no source mappings)
- [x] Enable viewing LLVM IR in a supplementary view
- [x] Implement a new LLVM IR backend option for toggling between
optimized and unoptimized ll
- Affects non-resolc files ([see
commit](606bab9a59))
- Disabled by default
- (Enable by setting `this.compiler.supportsIrViewOptToggleOption =
true` in a compiler's constructor)
- The compiler's `getIrOutputFilename()` will receive the LLVM IR
backend options
### CE Infra
Accompanying CE Infra PR:
https://github.com/compiler-explorer/infra/pull/1855
## Overall Usage
### Steps
(See screenshots)
* Choose between two input languages:
* Solidity
* Yul (Solidity IR)
* Choose a Resolc compiler
* View assembly:
* PolkaVM assembly (if enabling "Compile to binary")
* RISC-V (64 bits) assembly
* View intermediate results:
* Optimized LLVM IR (if enabling "Show Optimized" in the LLVM IR view)
* Unoptimized LLVM IR
### Notes
Source mappings currently only exist between:
- Yul and RISC-V
- Yul and LLVM-IR
## Screenshots
<img width="1502" height="903" alt="CE Yul RISC-V LLVM IR"
src="https://github.com/user-attachments/assets/7503b9b5-0f2c-4ddf-9405-669e4bdcd02d"
/>
<img width="1502" height="903" alt="CE Solidity PolkaVM"
src="https://github.com/user-attachments/assets/eeb51c99-3eaa-4dda-b13c-ac7783e66cb8"
/>
---------
Co-authored-by: Matt Godbolt <matt@godbolt.org>
This adds support for the LLVM IR view for Swift, based on what other
LLVM based compilers do.
I tested it on my machine and it seems to work well, including with the
demangler. I'm not sure what `minIrArgs` is though, I added it because
it was there for other languages.
Co-authored-by: Nathan SALAUN <nathan.salaun@sofia.dev>
Resolves#2837
This is a small change to slightly alter the foreground color of
`variable.predefined` tokens in dark themes to improve legibility. These
tokens look fine in the light theme, but for some reason monaco defines
them as exactly the same color in vs-dark, which causes serious contrast
issues. This PR's change to increase contrast is particularly relevant
in diff views where the diff highlights could previously make tokens
nearly invisible, but the new color also makes these tokens easier to
read all-around. My goal for selecting the color was to try to match the
same sort of "feel" that the these tokens have in the light theme.
Images (the assembly is different because I have a different compiler on
my local machine, and I took the before screenshots from the main
website):
| Theme | Before | After |
|--------|--------|--------|
| Light (unchanged) | <img width="450" height="259" alt="image"
src="https://github.com/user-attachments/assets/67a9d986-0e9a-4be5-bee2-1bb967e9aed6"
/> | <img width="449" height="258" alt="image"
src="https://github.com/user-attachments/assets/17ed3978-bfd3-4bbf-9266-ccafb63a6e95"
/> |
| Dark/Dark+ | <img width="448" height="263" alt="image"
src="https://github.com/user-attachments/assets/189d96b7-9e74-4dda-90ac-9ef6a403d46e"
/> | <img width="443" height="260" alt="image"
src="https://github.com/user-attachments/assets/f2fd46dc-ffa0-4092-b080-d448ee627110"
/> |
| One Dark | <img width="450" height="259" alt="image"
src="https://github.com/user-attachments/assets/470b95b3-fc97-47c8-9fd9-76466de6b3f7"
/> | <img width="446" height="258" alt="image"
src="https://github.com/user-attachments/assets/e4244da5-ee39-46ea-a8f2-a924a121ff7d"
/> |
I also experimented with lowering the insert diff highlight opacity
slightly on top of the token color change. That does further help with
contrast, but it also makes the vibrance of insertion highlights
different than deletion highlights and so rather than change those too I
just figured I would leave them alone and try to make the minimal
possible change.
## Summary
- Removes misleading error log in Java bytecode parser for legitimate
compiler behavior
- Some Java-family compilers (Clojure, Kotlin) generate initial bytecode
instructions without source line mappings
- The code already handles this correctly; the error log was spurious
## Context
Issue #2986 has been open since 2021 with error logs about "Skipping
over instruction even though currentSourceLine == -1". After analyzing
the code path and compiler behavior:
1. **The "error" is actually expected behavior**: When compilers
generate bytecode with LineNumberTables that don't start at instruction
0, the initial instructions legitimately have no source line mappings
2. **The code handles this correctly**: These instructions are displayed
without source associations, which is the right behavior
3. **No functional issues**: After 3+ years, no users have reported
actual problems related to this
As @frankleonrose noted in the issue, this is legitimate compiler
output, not a CE bug.
## Test plan
- [x] TypeScript type checking passes
- [x] Linting passes
- [x] Java-specific tests pass (10/10)
- [x] Related tests pass (77/77)
Closes#2986🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
Adds optional AI-powered duplicate detection using Claude API to
eliminate false positives from string similarity matching. The AI
analyzes candidate groups with strict rules and only confirms true
duplicates.
## Problem
The tag-stripping improvement (#8175) reduced false positives
significantly, but string similarity still produces noise:
- Different assemblers grouped together: "fasm", "YASM", "AsmX" (all
different tools)
- Unrelated features: "language tooltips" vs "language detection"
(different features)
- Specific vs general requests: "EWARM" vs "ARM execution" (specific
toolchain vs general support)
**Before AI filtering:** 63 groups with ~60% false positive rate
## Solution
### Two-phase detection:
1. **Broadphase:** String similarity (fast, high recall) creates
candidate groups
2. **AI Refinement:** Claude Sonnet 4 applies strict rules to confirm
duplicates
### Strict AI rules:
- ✓ **Duplicates:** Same tool with spelling/version variants ("NumPy" =
"numpy", "GCC 13" = "GCC 13.1")
- ✗ **NOT duplicates:** Different named tools ("fasm" ≠ "YASM"), related
features ("tooltips" ≠ "detection")
### Features:
- Optional `--use-ai` flag (requires `ANTHROPIC_API_KEY` in `.env` file)
- Adjustable confidence threshold with `--ai-confidence` (default: 0.7)
- AI reasoning included in markdown reports for transparency
- Graceful fallback if API key not available
## Results
Testing on 843 open CE issues:
| Phase | Groups | Quality |
|-------|--------|---------|
| Broadphase (string similarity) | 63 | ~40% accurate |
| AI filtering | 5 | **100% accurate** |
### Confirmed duplicates found:
1. Forth language requests (identical)
2. Documentation out-of-date reports (#5937 + #4906)
3. objdump tool requests (#4633 + #3139)
4. Haskell vector library requests
5. Make/webpack build issues (same bug)
### False positives eliminated:
- ✗ fasm/YASM/AsmX (different assemblers)
- ✗ Language tooltips vs detection (different features)
- ✗ ARM vs EWARM execution (general vs specific)
- ✗ Lua vs LUAU (related but different languages)
- ✗ OpenBLAS vs OpenSSL (different libraries)
## Cost Analysis
- 63 groups × ~400-500 tokens/group ≈ 25-30k tokens per run
- Cost: **~$0.15 per run** with Sonnet 4 (based on actual usage)
- Runs only when `--use-ai` flag is used
- Very affordable for occasional duplicate detection
## Configuration
Create `.env` file in `etc/scripts/gh_tool/`:
```bash
ANTHROPIC_API_KEY=sk-ant-...
```
The `.env` file is gitignored for security.
## Example Usage
```bash
# Standard detection (no AI)
uv run gh_tool find-duplicates /tmp/report.md
# AI-powered detection
uv run gh_tool find-duplicates /tmp/report.md --use-ai
# Adjust AI confidence threshold
uv run gh_tool find-duplicates /tmp/report.md --use-ai --ai-confidence 0.8
```
## Dependencies Added
- `anthropic>=0.40.0` - Claude API SDK
- `python-dotenv>=1.0.0` - Environment variable management
## Test Plan
- [x] All existing tests pass
- [x] Tested on 843 real CE issues with 100% accuracy
- [x] Graceful fallback when API key not available
- [x] AI reasoning included in markdown reports
- [x] Code passes ruff linting
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
The "Adding a new compiler to the live site" section was outdated,
referencing deprecated bash scripts in update_compilers/ directory.
Updated to reference the current YAML-based configuration system:
- References ce_install tool instead of old scripts
- Points to bin/yaml/*.yaml configuration files
- Links to infra repo documentation (ce_install_yaml.md,
installing_compilers.md)
- Provides concrete installation command examples
- Updates terminology (non-free instead of install_nonfree_compilers.sh)
Fixes#5937🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
Fixes the duplicate issue detection algorithm to strip `[TAGS]` from
issue titles before calculating similarity. This eliminates massive
false-positive groups caused by shared tag prefixes like `[LIB REQUEST]`
or `[COMPILER REQUEST]`.
## Problem
The previous implementation would create groups of 98+ completely
unrelated issues just because they shared common tag prefixes. For
example:
- `[LIB REQUEST] Add ULib Library`
- `[LIB REQUEST] musl vs glibc`
- `[REQUEST] Float explorer support`
- `[REQUEST] Support logging in`
These would all be grouped together despite being completely different
requests.
## Solution
- Strip `[TAGS]` before calculating text similarity using a compiled
regex pattern
- Compare only the actual content: "Add ULib Library" vs "musl vs glibc"
→ low similarity ✓
## Additional Changes
- Added `ruff` as a project dependency for consistent code quality
- Fixed linting issues (unused imports, updated to `datetime.UTC`)
- Updated tests to reflect new tag-stripping behavior
## Results
Testing on actual CE issues shows dramatic improvement:
- **Before**: 83 groups, with Group 1 containing 98 unrelated issues
(98% false positives)
- **After**: 63 groups, with Group 1 containing 2 legitimate "Forth"
duplicates (actual duplicates)
Most groups are now legitimate duplicates like:
- Three "Problem with [opcode]" bugs
- Two TI ARM compiler requests
- Multiple MSVC version requests
## Test Plan
- [x] All existing tests pass
- [x] Tested on real CE issue data showing 20+ group reduction
- [x] Code passes ruff linting and formatting
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
Fixes#8172
Fixes
[COMPILER-EXPLORER-DXM](https://compiler-explorer.sentry.io/issues/COMPILER-EXPLORER-DXM)
## Problem
Sentry issue COMPILER-EXPLORER-DXM has accumulated **7,018+
occurrences** with essentially no diagnostic information:
- Error: `CustomEvent: Event 'CustomEvent' (type=unhandledrejection)
captured as promise rejection`
- No stacktrace
- Safari-specific (Safari 26.0 on macOS)
- No actionable information to debug the issue
## Root Cause
Safari sometimes rejects promises with `CustomEvent`/`Event` objects
instead of Error objects. Our `unhandledrejection` handler in
`static/sentry.ts:110-122` converts non-Error rejections to Error
objects using:
```typescript
const errorMessage = typeof reason === 'string' ? reason
: `Non-Error rejection: ${JSON.stringify(reason)}`;
```
When `JSON.stringify()` is called on Event objects, it returns `{}`
because Event properties are **non-enumerable**. This loses all valuable
diagnostic information like:
- `event.type` - the event type
- `event.target` - what triggered the event
- `event.detail` - custom data for CustomEvents
## Evidence
- [Sentry JavaScript SDK Issue
#2210](https://github.com/getsentry/sentry-javascript/issues/2210) -
Documents the exact same problem
- [WebKit Bug #150358](https://bugs.webkit.org/show_bug.cgi?id=150358) -
Promise rejection event handling
- Multiple Safari 16.3+ reports of CustomEvent rejections
## Solution
Extract meaningful properties from Event/CustomEvent objects **before**
stringifying:
1. **Add type guard**: `isEventLike()` to detect Event/CustomEvent
objects
2. **Extract properties**: `formatEventRejection()` to get `type`,
`target`, `detail`
3. **Cleaner code**: Refactor with ternary chain and modern TypeScript
patterns
4. **Better diagnostics**: Use `Object.assign()` for type-safe property
addition
### Before
```
Non-Error rejection: {}
```
### After
```
Event rejection: type="unhandledrejection", target="Window", detail={...}
```
## Impact
This will allow us to:
1. ✅ Identify the actual source of these Safari rejections
2. ✅ Determine if they're from CE code, third-party libraries, or
browser extensions
3. ✅ Decide if they need fixing or should be filtered out
4. ✅ Get actionable diagnostic information instead of empty objects
## Test Plan
- ✅ TypeScript type checking passes
- ✅ Linter passes with auto-formatting
- ✅ Related tests pass
- ✅ Pre-commit hooks pass
- Manual testing: Wait for Safari users to trigger these errors and
verify we now get useful diagnostic info in Sentry
## Code Review Notes
The fix operates at the **right layer** - transforming Events into
meaningful Error messages at the point of rejection, before Sentry sees
them. This is different from Sentry's `ExtraErrorData` integration which
operates on already-serialized errors.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
Implements automated detection of potential duplicate issues using
GitHub Actions.
## Implementation Details
- Uses `wow-actions/potential-duplicates@v1` action
- Triggers on issue `opened` and `edited` events
- Configured with **90% similarity threshold** to minimize false
positives
- Automatically adds `potential-duplicate` label and comment with links
to similar issues
## Rationale for 90% Threshold
Based on manual testing with the `gh_tool` CLI:
- 85% threshold produced too many false positives from template-based
matches
- True duplicates typically have 90%+ similarity
- Uses Damerau-Levenshtein distance algorithm (same as manual tool)
## Testing
- ✅ YAML syntax validated
- ✅ Pre-commit hooks passed (lint + ts-check)
- ✅ Created `potential-duplicate` label in repository
- Manual testing of similar configuration showed good results at 90%
threshold
## Dependencies
- Depends on #8166 (add-gh-tools-cli branch) being merged first
- This PR adds the automation layer on top of the manual tooling
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude <noreply@anthropic.com>
This PR adds a new Python CLI tool for automating GitHub repository
management tasks.
## Overview
The initial implementation provides duplicate issue detection using text
similarity analysis. This is the first step toward automating repository
triage tasks.
## Features
- **Click-based CLI** with subcommands for future extensibility
- **find-duplicates command** for detecting duplicate issues using text
similarity
- Uses **gh CLI** for GitHub API access (no token management needed)
- Text similarity using `difflib.SequenceMatcher` (ratio-based
algorithm)
- Configurable similarity threshold (default: 0.6)
- Progress bar for long-running comparisons
- Age filtering support (`--min-age` parameter)
- Standard Python src-layout with **uv** for dependency management
- **Comprehensive test suite** with pytest (integrated into CI)
## Project Structure
```
etc/scripts/gh_tool/
├── src/gh_tool/ # Main package
│ ├── cli.py # Click-based CLI interface
│ └── duplicate_finder.py # Core duplicate detection logic
├── tests/ # Test suite
│ └── test_duplicate_finder.py
├── docs/ # Documentation
│ ├── TRIAGE-CRITERIA.md # Triage guidelines from manual review
│ └── PHASE1-FINDINGS.md # Historical analysis of 855 issues
├── pyproject.toml # Package configuration
└── README.md # Usage documentation
```
## Usage
```bash
cd etc/scripts/gh_tool
uv sync
uv run gh_tool find-duplicates /tmp/report.md
```
**Options:**
- `--threshold FLOAT` - Similarity threshold 0-1 (default: 0.6)
- `--state {all,open,closed}` - Issue state to check (default: open)
- `--min-age DAYS` - Only check issues older than N days (default: 0)
- `--limit INTEGER` - Maximum number of issues to fetch (default: 1000)
- `--repo TEXT` - GitHub repository in owner/repo format (default:
compiler-explorer/compiler-explorer)
**Example:**
```bash
# Find high-confidence duplicates in open issues
uv run gh_tool find-duplicates /tmp/report.md --threshold 0.85
# Check all issues older than 30 days
uv run gh_tool find-duplicates /tmp/report.md --state all --min-age 30
```
## Testing
The tool includes comprehensive test coverage:
- Unit tests for similarity calculation
- Integration tests for duplicate detection
- Edge case handling (transitive grouping, age filtering, threshold
sensitivity)
- Report generation validation
**Run tests:**
```bash
cd etc/scripts/gh_tool
uv run pytest -v
```
Tests are integrated into CI and run on every push.
## Documentation
- **`README.md`**: Complete usage guide with examples
- **`docs/TRIAGE-CRITERIA.md`**: Comprehensive triage guidelines
developed during manual review of 22+ issues
- **`docs/PHASE1-FINDINGS.md`**: Historical analysis context from
initial 855 issue review
## CI Integration
The tool is integrated into the GitHub Actions workflow:
- `uv` is installed via `astral-sh/setup-uv@v6`
- Tests run automatically on every push
- Ensures tool remains functional as codebase evolves
## Next Steps
Future enhancements planned for follow-up PRs:
- GitHub Action for automatic duplicate detection on new issues
- Additional automation tools (upstream health checker, label validator,
etc.)
- Automated triage reports
## Changes in this PR
- ✅ Core duplicate detection implementation
- ✅ Comprehensive test suite (192 lines)
- ✅ CI integration
- ✅ Complete documentation
- ✅ Example triage criteria and findings
---------
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
Fixes the issue where the "Edit on Compiler Explorer" link in embedded
iframes doesn't update with the current code state, staying as "/"
instead of including the serialized state.
## Changes
- Refactored `Sharing` class into a base class `SharingBase` that
handles state tracking and embedded link updates
- `Sharing` class now extends `SharingBase` and adds the full sharing UI
features
- Created `initialiseSharing()` function that instantiates the
appropriate class based on embedded mode
- Updated `main.ts` to use the new initialization function
- Updated `history.ts` to use `SharingBase.filterComponentState()`
instead of `Sharing.filterComponentState()`
## Testing
- TypeScript compilation passes (`npm run ts-check`)
- Linting passes (`npm run lint`)
- Tests pass (`npm run test-min`)
- Manual browser testing confirms embedded links now update correctly
Closes#8097🤖 Generated with [Claude Code](https://claude.ai/code)
---------
Co-authored-by: Claude <noreply@anthropic.com>
- bump pQueue:
https://github.com/sindresorhus/p-queue/releases/tag/v9.0.0
- throwOnTimeout is removed (and is always `true`)
- 0 is not a valid timeout, so, updated tests to pass a big number (no
normal code path assumes 0)
- happy dom: breaking changes: removed commonjs, new jest; nothing
affects us
We changed version strategies ~2 months ago to include this leading zero
(in preparation for a future 1.0), reflecting that change here so it
doesn't confuse people.