Commit Graph
403 Commits
Author SHA1 Message Date
RabsRincon 9c2528000e Move fontscale to typescript 2021-12-31 11:08:21 +01:00
Marc Poulhiès 86dd8f7814 Ada: new pane for GNAT Debug Tree (#3190)
Support for the GNAT Tree emitted by `-gnatdt` on stdout.
The pane is also available in the diff tool.

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
2021-12-28 15:35:11 +01:00
Matt Godbolt 4eccbf8742 Upgrade monaco and monaco-webpack-plugin (#3204) 2021-12-21 16:09:40 -06:00
Mats Larsen 0b32c7e916 Automatically enable text search for language dropdown (#3162) 2021-12-12 17:43:19 +01:00
Rubén Rincón Blanco fc19400855 Move static/libs-widget-ext.js to TypeScript (#3077)
* Rename static/libs-widget-ext.js to static/libs-widget-ext.ts

* Initial Typescript copy&paste

* File now compiles its TS

* First TSfy pass

Types need to still be sorted out, but this now compiles and works
:)

* Further work towards porting libs widget to TS

* Expand the scope of the PR and fix some TS issues elsewhere

Still releated to libs though

* Renames

* Address PR review

* Fixes some minor errors and finishes the tests

* Remove unused interface properties
As suggested by partouf in the PR

* Remove unused this
Noticed by Partouf in the PR review

* Remove more unused options interface properties

* Fixes last issues with the ts libs widget

* Remove console.log
2021-12-12 17:42:44 +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 057c21b8ba Migrate the LLVM IR pane to the TypeScript Pane API (#3037)
Migrates the IR output pane to TypeScript
2021-12-07 11:39:58 +01:00
Marc Poulhiès 24693766d0 rust: HIR dump and small refactor with macro expansion (#3147)
Small refactoring for handling -Zunpretty calls:

- reuse options from main compiler invocation instead of crafting new ones.
- factor out common part.

Now also handles HIR output in a dedicated pane.
Still a lot of copy/pasting from the macro expansion.

fixes #2567

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
2021-12-05 19:04:12 +01:00
RabsRincon ec00a10f49 Clear the compiler output on language change 2021-12-05 16:26:45 +01:00
Nico Lehmann 93a020bdc6 Migrate Cfg pane to typescript (#3110)
* Migrate the Cfg pane to typescript
2021-11-30 14:11:50 +01:00
Rubén Rincón Blanco a92083a3a4 Adds some useful features for some people (#3081)
Closes #2974 and addresses a request made in Discord
2021-11-21 13:45:01 +01:00
Marc Poulhiès 9a773a75ac Enable diff view to use GNAT (Ada) expanded code (#3119)
This change allows for the selection of the GNAT (Ada) expanded code to
be used in the diff pane.

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
2021-11-18 07:38:26 +01:00
Marc PoulhièsandRubén Rincón Blanco 6f18695dc0 Refactor GCC dump handling (#3024)
This change allows for only dumping a single pass (the one selected). In order
to populate the list of available dumps, it now queries GCC for the enabled
passes.

It can still be misleading to users as a pass can be enabled but for some reason
does not dump anything. In order to avoid this, the only solution seems to be to
still dump all files and filter the list... This defeats the initial goal and
only adds complexity for the current compilers.

But this makes #2868 easier to implement (see #2985 that was a aborted first
attempt) and if someday another libgccjit-based compiler is added, it could be
easily hooked to this.

It also changes the naming in the drop down menu. For example, instead of :
'009t.omplower' it now uses 'omplower (tree)' (ie.
'<pass-name> (tree|ipa|rtl)').

Fixes #3014

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Co-authored-by: Rubén Rincón Blanco <ruben@rinconblanco.es>
2021-11-08 18:52:30 +01:00
Matt Godbolt cf7d70402e Await for things (#3086)
* Await for things

We had a number of things that aren't await()ing their promises.
That led to non-deterministic compiler settings like Intel support.
I used the IDE to find them all and fix the ones that I thought looked
important.

More generally we should use tslint (once we're all typescript) to
ensure this more generally. I tried the eslint equivalent but it
either overreacted or didn't catch anything.

Closes #3085
2021-10-31 15:31:45 -05:00
RabsRincon 8886821da4 Add a way to ensure no tracking is done and now 3rd party is available 2021-10-26 20:31:38 +02:00
Mats Larsen 60217a8e61 Make the TypeScript Pane API easier to work with (#3034)
This is a refactor for core methods of the Pane API. In this patch:

1. Rename initializeDOMRoot to getInitialHTML() - This logic is common for all of the panes. Returning the HTML is more type-safe and makes the method pure.
2. Make createEditor return the monaco editor - Allows us to set the editor in the constructor. Returning the editor is more type-safe and makes the method pure.
3. Rename id parameters to compilerId in onCompileResult, onCompiler and onCompilerClose - It's not easy to tell what these ids were, this makes it easier to understand what we're using here.
4. Type compiler, options and result as unkown in onCompiler, onCompileResult - These parameters don't have types at the moment, so it's safer for implementors to manually override and type as any/whichever type they wish.
5. Add plenty of code documentation to onCompiler and onCompileResult
2021-10-14 15:16:40 +02:00
Mats Larsen 0a5877b91b Add method to Pane for implementing editor actions (#3033)
This feature was already implemented on a lot of the older panes. It is now available for the new TypeScript Pane API.
2021-10-14 12:13:47 +02:00
Mats Larsen 12fa535841 Remove duplicate import in gnatdebug-view 2021-10-13 21:45:36 +02:00
Marc PoulhièsandMats Larsen 9b46d4f1fd Initial support for GNAT specific debug output (#3000)
This change only gets the GNAT Debug expanded generated code (-gnatD).

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Co-authored-by: Mats Larsen <me@supergrecko.com>
2021-10-13 19:59:26 +02:00
Mats Larsen a4f33846dd Fix imports for rust MIR and Macro Expansion views 2021-10-12 22:14:50 +02:00
Mats Larsen 025325e6d5 Replace CommonJS default exports with named exports (#3021)
This patch refactors every single CommonJS default export and TypeScript `export =` to use named exports.
2021-10-12 11:30:10 +02:00
Mats Larsen 896cf2f9ca Decouple each pane state from the base pane state (#3025)
Decouples the individual initial pane states for each pane from the BasePaneState type.

This will allow easier re-use of the state the various constructors receive

Non-functional change.
2021-10-12 00:03:50 +02:00
Mats Larsen 2405a4d79d Make Rust macro expansion view properly display unsupported compiler (#3006)
Fixes the same issue as patched in #2999 for the Rust macro expansion view
2021-10-05 10:40:18 +02:00
Rubén Rincón Blanco b6338e0897 Adds supportsExecute language option (#2963)
* Adds supportsExecute language option

It's recalculated every time the compilers change
2021-10-04 21:47:29 -05:00
Marc Poulhiès adced60365 Fix Rust MIR view to correctly display unsupported compiler (#2999)
The pane would still show <no output> for unsupported compiler.
Let the onCompiler callback correctly write the message in case the compiler is
not supported.

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
2021-10-05 01:36:23 +02:00
Matt Godbolt fa99f6c174 Handle case when no compiler is selected 2021-09-27 22:18:18 -05:00
partouf ee3370501a always escape 2021-09-27 16:12:36 +00:00
RabsRincon 18e84343a6 More escapes 2021-09-27 17:14:05 +02:00
Luka Prebil Grintal 1293bc509e Escape string that gets passed as custom output filename (#2968) 2021-09-27 17:08:02 +02:00
RabsRincon e33a52bfd6 Closes #2967 2021-09-27 17:04:54 +02:00
Mats Larsen 278d28b313 Add rustc Macro Expansion view (#2932)
Adds a new pane for producing the macro expansion of Rust code compiled with rustc.
2021-09-27 00:33:09 +02:00
Mats Larsen 71af750227 Warn if Execution Only is added for compiler without execution (#2962)
Shows a warning in the alert system and cancels the execution request if the compiler does not support execution.
2021-09-24 02:37:39 +02:00
Mats Larsen 3faf881e95 Bind duplicate selection to Ctrl + D (#2956) 2021-09-22 21:16:36 +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 00f226fa2a fix skipasm (#2931) 2021-09-12 02:43:15 +02:00
partouf 85cda71b9b fix #2929 2021-09-11 22:50:09 +00:00
Mats LarsenandPatrick Quist d93bd31f40 Add base Pane component and migrate RustMirView to TypeScript (#2917)
* Implement generic pane skeleton

* Implement abstract Pane class

* Port RustMirView to typescript

* Fix nits in code

* Adjust method names and add override modifiers

* Add remaining settings keys (and fix a bug)

* Use this-binding in registerStandardCallbacks

* Address review comments

* Use utils.updateAndCalcTopBarHeight in base pane

* Add notice about adding an entry in interfaces.ts

* Use .bind instead of context parameter

GoldenLayout has moved away from the context parameter, so .bind is a safer for the future

* [200~Check for editor presence + fix typo~

* Remove trailing comma

Co-authored-by: Patrick Quist <partouf@gmail.com>
2021-09-10 23:42:47 +02:00
Patrick Quist 902a6a8777 search on cloogle (#2921) 2021-09-10 02:48:52 +02:00
RabsRincon 5525c40bc6 Fix current cursor pos bug 2021-09-07 17:39:24 +02:00
RabsRincon 0e296f27d0 Improve new cursor position label 2021-09-05 13:46:20 +02:00
RabsRincon a779f6005d Add current caret position to source pane 2021-09-04 17:06:28 +02:00
RabsRincon fb7fa30403 Make executor spinner spin too 2021-09-04 06:20:28 +02:00
Rubén Rincón Blanco 6a1dbe14f7 Some general UI touches (#2910)
* Touches and changes to the UI to make it more consistent

It fixes some problems, improves the UX of certain actions,
 and clears some code up

* More minor tweaks to the UI

* Fix class typo

* Add compiler picker opt group header background color in default theme

* Fix conformance view

* Removes some &nbsp; in favour of margins

Removes boostrap-slider, there's a built-in html solution
Fixes tab width setting having a wrong input type

* More UI tweaks

* Remove empty CSS rule
2021-09-03 05:51:05 +02:00
Patrick Quist e812888b0c tree sometimes doesn't exist anymore 2021-09-01 22:56:57 +02:00
RabsRincon f82b0114d9 Adds drag support for Tree pane
It also fixes a bug where multiple sources could be created if dropped
into the same dragSource button

Moves somes _.bind(fn to fn.bind( in ts code

Closes #2895
2021-08-31 20:16:13 +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
partouf 30a88625b5 grmbl lintfix 2021-08-31 12:56:01 +00:00
partouf 490b7da81c bugfix execution compilation status 2021-08-31 12:50:57 +00:00
partouf df04975cca fix #2902 2021-08-31 08:59:23 +00:00
partouf 370633e091 fix #2896 2021-08-29 14:21:44 +00:00