Adds a new checkbox setting for automatically formatting the code upon compilation request. I added a note in the setting text indicating that it only runs for languages that have a formatter set up.
* Adds more behaviours for Ctrl-S'ing an editor
It keeps backwards compatibility with the old setting
Fixes#3266
* Fix quotes
The new Node version did not run the commit checks
* Update static/panes/editor.js
Co-authored-by: Mats Larsen <me@supergrecko.com>
Co-authored-by: Mats Larsen <me@supergrecko.com>
* 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
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.
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>
* Fix loading a project
Chrome DevTools suggest that `.map()` does not exist here. I think that the right one is `.forEach()`.
https://stuk.github.io/jszip/documentation/api_jszip/for_each.html
* Remove `Promise.all()`
`zip.forEach()` does not return a value, hence waiting on it does not make sense.
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>