Commit Graph

240 Commits

Author SHA1 Message Date
Patrick Quist
f38834bb59 Add CE Library Wizard documentation (#8581) 2026-04-08 11:01:31 +02:00
Matt Fowles Kulukundis
93a5a224bb Update API.md (#8574) 2026-03-21 21:22:22 +01:00
Patrick Quist
6b1ff666f2 cmake support for asm (#8575) 2026-03-21 21:21:40 +01:00
Patrick Quist
ee3e261bb3 Make libs= property optional via auto-discovery (#8552) 2026-03-11 21:40:54 +01:00
Partouf
e6f50e59a7 nsjail documentation 2026-02-20 12:54:12 +01:00
Matt Godbolt (bot acct)
f692962005 docs: note Go convention for cross-arch point release updates (#8475)
Some languages like Go update cross-architecture compiler IDs in-place
when new patch releases come out (e.g. `386_gl124` moves from 1.24.2 to
1.24.13). This documents it as an accepted exception to the general rule
that compiler IDs must not change meaning.

Discovered while reviewing #8462.

*(I'm Molty, an AI assistant acting on behalf of @mattgodbolt)*

🤖 Generated by LLM (Claude, via OpenClaw)

Co-authored-by: mattgodbolt-molty <mattgodbolt-molty@users.noreply.github.com>
2026-02-16 13:58:44 -06:00
Matt Godbolt (bot acct)
cef3a56049 docs: document compiler ID stability rules (#8474)
Adds a section to `AddingACompiler.md` explaining that compiler IDs are
permanent and must not be removed or reassigned. This is a common
mistake in version-bump PRs where contributors replace existing entries
with newer patch releases instead of adding alongside them.

The new section covers:
- Why IDs must be stable (shortlinks, saved sessions, embeds)
- The correct approach when adding newer versions (add, don't replace)
- Using `alias` as a fallback when a compiler genuinely can't be kept
- The same rule applying to infra install targets
- The rare exception for lesser-used languages with involved maintainers

🤖 Generated by LLM (Claude, via OpenClaw)

Co-authored-by: mattgodbolt-molty <mattgodbolt-molty@users.noreply.github.com>
2026-02-16 10:53:20 -06:00
Partouf
f50b519ef5 Expand IDE mode docs with Ctrl+S, tab behaviour, and compiler notes
Add sections covering Ctrl+S file inclusion behaviour (including the
filename dialog), tab stacking in IDE mode, CMake language requirements
and CMakeLists.txt prerequisite, and a note about adding compilers from
the tree view.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:26:23 +01:00
Victor Vianna
42decbab41 Add documentation about IDE mode (#8466) 2026-02-14 19:14:59 +01:00
Artem Belevich
76dc4b0ca5 Add += append syntax for string properties. (#8387)
Introduce a += operator in property file parsing that appends values to
existing string properties. This allows splitting long property values
across multiple lines for improved readability.

Example:
  group.compilers=comp1:comp2:comp3
  group.compilers+=:comp4:comp5:comp6

Error handling:
- Logs error and skips if += is used on an undefined property
- Logs error and skips if += is used on a non-string property

Includes unit tests for the new functionality.

<!-- 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!
-->
2026-02-02 20:02:38 -06:00
Matt Godbolt
226edbec58 docs: reference compile_commands.json community tool (#8427)
Add a note in AddingACompiler.md pointing to pseyfert's
[compilecommands_to_compilerexplorer](https://github.com/pseyfert/compilecommands_to_compilerexplorer)
tool, which generates `.local.properties` from `compile_commands.json`.

Closes #953

🤖 Generated by LLM (Claude, via OpenClaw)
2026-02-01 12:31:29 -06:00
Matt Godbolt
ddb0266645 Convert propscheck.py to TypeScript/Vitest tests (#8404)
## Summary

Replaces the Python `propscheck.py` validation script with TypeScript
code that:
- Uses a testable validator module (`lib/properties-validator.ts`)
- Has comprehensive unit tests (71 tests in
`test/properties-validation-tests.ts`)
- Integrates with the existing property loading infrastructure
- Runs as part of the normal test suite

## Changes

- **New validator module** (`lib/properties-validator.ts`):
- Raw file validation: duplicate keys, empty list elements, typos,
suspicious paths
  - Orphan detection: compilers, groups, formatters, tools, libraries
  - Cross-file duplicate compiler ID detection
  - Disabled allowlist support (`# Disabled: id1 id2`)
- Invalid property format detection (leverages `parseProperties()` with
new `collectErrors` option)
  - Missing compilers list detection for language files

- **Property library enhancement** (`lib/properties.ts`):
- Added `collectErrors` option to `parseProperties()` for structured
error collection

- **New npm script**: `npm run test:props` for quick property validation
  - Set `CHECK_LOCAL_PROPS=true` to include `.local.properties` files

- **Updated references**:
  - CI workflow no longer calls propscheck.py
  - Pre-commit hook uses `npm run test:props`
  - CE Properties Wizard uses the new validation

- **Removed**: `etc/scripts/util/propscheck.py` and `propschecktest.py`

## Test plan

- [x] All 71 unit tests pass
- [x] Integration tests validate real config files
- [x] `npm run test:props` works standalone
- [x] CE Properties Wizard validation works
- [x] CI passes

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

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:03:00 -05:00
Patrick Quist
b7a44e62b5 Add /noscript/clientstate/ endpoint for noscript mode (#8385) 2026-01-18 16:46:29 +01:00
Matt Godbolt
44e84356c2 Update to add compilers easier 2025-11-10 11:11:29 -06:00
Matt Godbolt
daae03566c Update compiler installation documentation to reference YAML config (#8177)
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>
2025-10-07 16:28:15 -05:00
Ofek
00ee2fc8b0 Initial support for binary/binary-obj in msvc (#8165) 2025-10-06 18:00:53 +03:00
Patrick Quist
72b717d09b Update WindowsNative.md 2025-10-04 16:37:04 +02:00
Partouf
d9d58ff67f update windows doc some more 2025-10-04 16:33:18 +02:00
Partouf
85b0bfce94 update windows doc a little 2025-10-04 16:15:36 +02:00
Patrick Quist
16af4186ad CE Properties Wizard: Interactive tool for adding compilers (#7934) 2025-10-04 12:11:58 +02:00
Patrick Quist
774325dbd0 Update Compiler-Args-Debugging.md 2025-08-11 20:50:04 +02:00
Patrick Quist
64c842e3f6 rename 2025-08-11 20:45:30 +02:00
Partouf
6391946056 compiler-args-app documentation 2025-08-11 20:42:40 +02:00
Matt Godbolt
50ec53d0e7 Add comprehensive Cypress E2E tests for Claude Explain feature (#7751)
- Add comprehensive test suite covering all Claude Explain functionality:
  - Basic pane opening and consent flow
  - no-ai directive detection
  - API interactions and error handling
  - Options/customization features
  - Caching behavior and persistence
  - Compilation state handling
  - State persistence across page loads

- Fix caching bug in explain-view.ts:
  - Cache was incorrectly implemented as instance variable, losing cached explanations when panes were closed/reopened
  - Made cache static to persist across all pane instances (matches consent persistence pattern)
  - Fixes failing "Caching and reload" Cypress test
  - Aligns implementation with documented behavior: "shared across all explain views in the session"

- Add test utilities and helpers:
  - Monaco editor content manipulation using clipboard events
  - Claude Explain specific helpers moved to test file
  - General utilities remain in utils.ts

- Performance optimizations:
  - Clear Cypress intercepts in afterEach to prevent O(n²) degradation
  - Use :visible selectors to avoid GoldenLayout template elements
  - Proper mock setup timing to prevent race conditions

- Add comprehensive README with lessons learned and best practices

All tests use fake test data (test_first, focus_a, etc.) to clearly distinguish from production values and prevent accidental API calls.
2025-08-05 16:42:48 -05:00
Matt Godbolt
c29ad46f3a [Not Live; disabled by default] Add Claude Explain feature for AI-powered assembly explanations (#7749)
Add Claude Explain feature for AI-powered code explanations

This PR introduces Claude Explain, a new feature that provides AI-powered explanations of compiler output directly within Compiler Explorer.

Key features:

Claude Explain functionality:
  - New explain view pane
  - Explains compiler output with full context of source code and compilation output
  - Configurable audience level and explanation type
  - Response caching to improve performance and reduce API calls
  - Usage statistics display showing requests used and token counts

User experience:
  - Consent flow on first use explaining data handling and privacy
  - AI disclaimer banner warning about potential LLM inaccuracies
  - Respects "no-ai" directive in source code for users who don't want AI processing

Privacy and security:
  - Data sent to Anthropic's Claude API as documented in privacy policy
  - No data used for model training
  - Clear consent required before first use
  - Support for opting out via "no-ai" directive

The feature is marked as beta and can be enabled via configuration.

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-05 09:31:48 -05:00
Matt Godbolt
ef264acace Update to Privacy Policy (#7983)
A whole bunch of changes I've been meaning to make:
- Clarify things and put the TLDR at the top
- Remove my own darn address etc (after checking this is OK)
- Clarifying the goo.gl situation
- Paving the way for the explain feature
2025-08-02 16:20:20 -05:00
Patrick Quist
f70ab79be4 Add new /api/tools/<language> API endpoint (#7950) 2025-07-27 13:47:06 +02:00
Mats Jun Larsen
d147341663 Serve all static asset files over the CDN (#7795) 2025-06-28 14:01:36 +02:00
Matt Godbolt
23fad10939 Unit testing the frontend (#7829)
This adds some unit tests for the front end.

- configures "frontend tests" as a unit tests in `static/tests`,
removing the old cypress-requiring "unit" tests
- hack enough of a DOM  to get things working
- port motd and id tests
- *adds* a golden layout checks  (see #7807)
- Updates READMEs etc

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-06-19 08:46:57 -05:00
Patrick Quist
bbe966f115 Update API doc to AI's liking (#7771) 2025-06-18 14:23:14 +02:00
Patrick Quist
d3b67fcd5e Update API documentation for missing endpoints (fixes #4395) (#7821) 2025-06-17 09:56:57 +02:00
Patrick Quist
b99653804c Update SupportedEmulators.md 2025-05-24 19:29:25 +02:00
Patrick Quist
6fb3ab38e7 Add Game Boy emulator support using WasmBoy (#7717) 2025-05-24 18:43:41 +02: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
Matt Godbolt
1dab667564 Support hostnameForLogging too, more out of date refences 2025-05-12 12:59:57 -05:00
Matt Godbolt
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>
2025-05-12 12:49:28 -05:00
Matt Godbolt
fac3bf59c1 Documentation improvements (#7672)
This PR includes various documentation improvements:

- Fix grammar in README.md introduction
- Update Node.js version references to consistently indicate 'Node.js 20
or higher'
- Enhance macOS installation and setup guide with detailed instructions
- Fix broken link in API.md
- Fix formatting inconsistencies in WhatIsCompilerExplorer.md

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-11 16:46:05 -05:00
partouf
2597939d56 short osx readme 2025-05-08 17:23:48 +02: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.
2025-04-26 18:12:58 -05:00
Matt Godbolt
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 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>
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>
2025-04-24 12:10:37 -05:00
Matt Godbolt
03fb43066a More library hacking notes (cc @partouf in case I made any obvious blunders) 2025-04-23 10:51:05 -05:00
Matt Godbolt
58fec88694 Add a little more clarity on how libraries work 2025-04-15 10:34:06 -05:00
Patrick Quist
26c6f8eb95 Update SupportedEmulators.md 2025-04-08 18:12:04 +02:00
Stephen Heumann
5a72fa0659 Add support for ORCA/C (#7368)
[ORCA/C](https://github.com/byteworksinc/ORCA-C) is a C compiler that
natively runs on and targets the Apple IIGS. ORCA/C and the programs it
generates can be run on modern Linux systems by using an emulation tool
called [Golden Gate](https://goldengate.gitlab.io).

This adds support for ORCA/C (run via Golden Gate) in Compiler Explorer.
It uses its own assembly format and objdumper (provided by Golden Gate),
so support for those is added. An extra configuration option was also
added to support execution via an emulator, bypassing the usual check
that executables can run natively. Asm docs for the WDC 65C816 processor
were also added.

ORCA/C and Golden Gate are not Free Software, but their rights holders
have given permission for them to be used on Compiler Explorer. Tarballs
for them can be supplied privately. See infra PR:
compiler-explorer/infra#1521

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2025-02-18 10:28:10 -06:00
Mats Jun Larsen
bcd6394435 Ensure that content type for formatting requests is JSON (#7327)
Ideally I'd add a middleware or something else that requires JSON, but I
suppose this is fine for now.

cc @dkm
2025-01-29 10:46:56 -06:00
Alex Sweet
a0bdab9f13 Set demanglerType=win32 in Windows sample props (#7270) 2025-01-15 06:35:28 +01:00