Commit Graph
182 Commits
Author SHA1 Message Date
Patrick Quist 863c704361 first bits of compiler interface (#4378) 2023-01-23 20:25:14 -06:00
Matt Godbolt f276f73dab First pass at making compile.js into TS (#4313) 2022-11-22 07:27:43 -06:00
Jeremy Rifkin c2b3829883 Add stdout to the compilation error result (#4278) 2022-11-11 18:15:42 +01:00
Patrick Quist a8aff93241 compilertype not found should be fatal (#4059) 2022-09-20 07:59:36 -05:00
Leonard Mosescu 5a0e67b257 Update compiler.exe when resolving relative paths (#3998)
As discussed in #3996, this fixes a divergence in semantics between relative and absolute compiler paths
2022-08-29 07:43:50 -05:00
Rubén Rincón Blanco 16dca9d307 Bring back old behaviour of 404 on missing compiler (#3981) 2022-08-25 21:51:10 +02:00
Mats Larsen 540981ccef Port lib/languages.js to TypeScript (#3740) 2022-06-24 14:14:32 +02:00
Jeremy Rifkin ca7ebb4583 Updated site templates (#3767)
- Better naming of functions in existing templates
- Added LLVM Ir and Preprocessor templates
- Improved screenshot generation script
- Improved config file format (now the full URL can just be copied in instead of manually trimming the `https://godbolt.org/#`)
- Added `docs/AddingASiteTemplate.md`
2022-06-12 13:38:12 -04:00
Jeremy Rifkin 4c2fe0a5ba Site templates feature (#3747)
* Baseline for the ui

* Backend system / frontend baseline

* Automated screenshot generation / integration

* added copyright

* Style improvements

* Reworked config / integrated images into webpack

* Added tree ide template and updated the screenshot generation script

* Added screenshots for each theme

* Updated screenshots to use embed mode and hide the site header

* Added test case, removed leftover console.log

* Renamed /api/getSiteTemplates to /api/siteTemplates

* Renamed site template type
2022-06-09 16:52:45 -04:00
Matt Godbolt f2c1e0bd31 The Grand Reformat (#3643)
* The Grand Reformat

- everything made prettier...literally
- some tweaks to include a few more files, including documentation
- minor changes to format style
- some tiny `// prettier-ignore` changes to keep a few things the way we like them
- a couple of super minor tweaks to embedded document types to ensure they format correctly
2022-05-09 23:13:50 -05:00
Rubén Rincón Blanco f19bebcf4f Add 405 handlers for API endpoints (#3620) 2022-05-06 18:56:33 +02:00
RabsRincon 40fe769459 Set comma-dangle to always in server code and es5 in client code 2022-04-26 05:26:48 +02:00
Matt Godbolt 21b764f392 Unify comma configuration; and apply format to some files. (#3559) 2022-04-25 18:22:11 -05:00
Jeremy Rifkin 74efcfa754 Preprocessor output panel (#3330) 2022-02-11 15:42:41 +01:00
Yusuf Bham 41853b4a8c Fixes check for empty request body (#3350)
Check `req.body` being empty in addition to `source` being `undefined`.

Closes #3349
2022-02-10 23:43:16 +01:00
Mats Larsen 9b890b1656 Refactor handling of Assembly Documentation Providers (#3247) 2022-01-31 14:05:21 +01:00
Luca Pizzini ee2370fbc0 Fix bug: /compile endpoint API errors should be 400s (#3246)
closes #2560
2022-01-17 14:04:36 -06:00
Elektron72 bf9d2334b9 Add AVR assembly documentation (#3218) 2022-01-07 16:30:56 +01:00
Mats Larsen da1a3ab7dc Make it possible to share types in /types directory between front and backend (#3211)
* Make it possible to share types in /types directory between front and backend

* Add new tsconfig files to gh-dist-files
2021-12-28 15:53:34 +01:00
Gregory Anders 7f0bc32ae4 API: Change 'filters' option to be additive (#3206) 2021-12-28 15:35:46 +01:00
Elektron72 5a350691bb Add assembly documentation for 6502 (#3210)
This PR adds assembly documentation for the MOS 6502 and WDC 65C02 instruction sets, which are output by cc65.
2021-12-23 16:34:08 +01:00
Mats Larsen 810a1d0918 Describe which opcode and arch was not found (#3175) 2021-12-15 19:10:50 +01:00
Mats Larsen d7c4eecbf7 Refactor and return 404 from AsmDocs APIs (#3143)
Refactors the handler for the AsmDocs API to reduce code duplication.

**Breaking changes proposed**

- API will now return 404. This used to return 200 with "Unknown opcode" which is what led to issue #3117. Following cases has been changed:
  1. archiecture was not found
  2. instruction opcode was not found
- API will now return 406 not acceptable when the accepted content type is not text or json
- There is no longer a `result` field on a 200 request, instead the assembly documentation object is returned.
- There is no longer a `found` field on any request, the HTTP codes indicate whether it was found or not (200 means found)

**New features**

- The frontend will only request the opcode for an instruction set at most once, caching every single outgoing request.
- The "There was an error fetching the documentation for this opcode" has been adjusted to contain what went wrong.

Relevant tests have been added and updated.
2021-12-07 11:43:08 +01:00
Mats Larsen c9542a2c1a Implemement backwards compatability for Format API after #2957 (#3066)
* Implement fix for #3065

* Address review comments

* Undo accidental formatting
2021-10-30 15:40:34 +02:00
Patrick Quist 1ca884c367 Seperate compiler finding process (#3022) 2021-10-15 18:22:33 +02:00
Mats Larsen 63b3c90dc2 Add Go formatting with Gofmt (#2966)
Fixes #1009

Supports formatting go code, using gofmt as backend.
2021-10-05 15:41:16 +02:00
Matt Godbolt 4e75139484 Another attempt at speeding up the regex 2021-09-27 22:46:03 -05:00
Matt Godbolt a75fe0986b Improve the regular expression used to parse conditionals.
https://github.com/compiler-explorer/compiler-explorer/security/code-scanning/16?query=ref%3Arefs%2Fheads%2Fmain
2021-09-27 21:56:32 -05:00
Mats Larsen e7b9cbda91 Respect tab width and tabs/spaces settings for format APIs (#2957)
Site settings for tab width and tabs vs spaces are now being used when sent to the /api/format APIs.

This patch also includes some tiny internal refactoring on the bits related to the formatting API.
2021-09-26 23:56:39 +02:00
Patrick QuistandRabsRincon c3a72742b3 Remove user-agent dependencies and add some extra metadata stuff (#2943)
* lintfix

* dont look at user agent to escape things

* Clean my old code a tad

* Fix lint error

* some more metadata options and tests for it

* refactor underscore calls

Co-authored-by: RabsRincon <ruben@rinconblanco.es>
2021-09-17 20:14:53 +02:00
Patrick Quist e24f724e47 Options cleanup (#2924)
* getting rid of compiler.libs

* old widget no longer needed

* move supportedLibraries code to base-compiler

* bugfix

* oops

* grmbl

* bugfix remote msvc compilers
2021-09-13 20:22:39 +02:00
Patrick Quist 31050a81ac Cmakeproms (#2906)
* new counters for cmake and bugfix executeCounter

* bugfix execution counter

* bugfix for when switching language
2021-08-31 17:46:21 +02:00
Patrick Quist 22304af44e new counters for cmake and bugfix executeCounter (#2905) 2021-08-31 16:39:55 +02:00
Mats LarsenandMatt Godbolt 53b9e0ac59 Support multiple formatter types for /api/format (#2818)
* Make /api/format handle multiple formatter types
* Ignore preferred style if the formatter is a 'one true style' formatter
* Add tests for base formatter
* Document /api/formats and /api/format/<formatter> usage
* Document adding a new formatter
* Update amazon config

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2021-08-24 18:46:38 -05:00
Mats Larsen b6c2380c56 Assembly API documentation for Java Bytecode (#2817)
* Add assembly documentation endpoint for Java bytecode
* Upstream asm docenizer for Java
* Remove jvms.html from gitattributes as it is never checked into vcs
* EOF line for docenizer-java.js
* Use find-node to locate nodejs
* Format code according to style guide
2021-08-14 12:56:33 -05:00
RabsRincon 9a1c83d34e Change some _.bind(fn, this) to fn.bind(this) 2021-08-13 05:41:59 +02:00
RabsRincon 16ff1a8a4b Add api/version and api/releaseBuild GET endpoints 2021-08-13 05:31:40 +02:00
RabsRincon 3593ddb4a7 Add doc support for MOVBE amd64 instruction
It also improves the code a bit, and automates the patching of #2380

Closes #2819
2021-08-04 10:54:09 +02:00
Patrick Quist 36524372fc New calls for embed and code (#2680)
* support embedded from clientstate

* unstored code handler

* rename
2021-06-10 17:33:59 +02:00
Matt Godbolt a4edf7ed6b No array for each 2021-05-28 18:08:05 -05:00
Matt Godbolt 4e36d206b4 Prefer regex.test() 2021-05-27 23:19:32 -05:00
Patrick Quist c0a45e754c Add CMake API (#2509)
And multifile support. No UI support.
2021-03-22 22:59:03 +01:00
Patrick Quist 8e2de4b887 Let api compile also detect aliased compilers (#2502)
* initial implementation to look for aliases correctly and test

* refactoring

* lintfix
2021-03-19 12:04:29 +01:00
Matt Godboltandpartouf 273017c431 Tweaks to new ASM stuff
* Update right-click menu item to be more general than x86
* mounts /asm/:arch/:opcode and handles unknown arch
* adds dummy aarch64 placeholder
* tags some stuff as aarch64
* tags some stuff as amd64
* uses a redirect from /asm/XXX -> /asm/amd64/XXX
* instructionset detection when property is not set

Co-authored-by: partouf <partouf@gmail.com>
2021-03-14 12:39:55 -05:00
Jeremy Overesch 11e470a8f7 Feature/jo/arm dockenizer (#2463)
* Update docenizer to python3
* Remove unused code in docenizer
* Create new asm-docs-arm and asm-docs-api-arm files for parsing and retrieving arm related opcodes.  Add conditional instruction switch.
* Rename docs files to specify instruction set
* Add arm32 at /api/asm/arm32/:opcode
* Add @jovere to contributor list
* Add `instructionSet` compiler option
* Update client to access correct instruction based on the `instructionSet` option
* Add `arm32` `instructionSet` option for ARM C++ compilers
* Add `arm32` instructionSet to obvious places in C/C++
2021-03-12 07:40:49 -06:00
Matt Godbolt 17b2bb8a58 Move /shortener to /api/shortener (#2426)
We still support /shortener (though will scrape logs to see when
we can remove).

The route under /api/shortener will have the CORS headers set up
properly for things like @foonathan's lexy visualiser.
2021-02-15 12:52:46 -06:00
RabsRincon ebd159f72b Fixes wrong word in intel asm docs
The docenizer script is ran manually every time we update the docs,
 so we can modify it while a fix lands on the Intel manual,
 and then Felix updates the page.

We'll just have to remember to check the fix before updating the docs

Fixes #2380
2021-01-30 10:25:59 +01:00
Matt Godbolt 9cbc894ae4 npm run lint-fix 2021-01-16 09:57:34 -06:00
Matt Godbolt 255bb19dea Fix warning message, see #2388 2021-01-13 22:31:53 -06:00
Matt Godbolt fa31476917 move execution counting spot 2020-12-08 09:24:35 -06:00