Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[display] diagnostics as json rpc #11412

Merged
merged 6 commits into from
Nov 25, 2023
Merged

Conversation

kLabz
Copy link
Contributor

@kLabz kLabz commented Nov 25, 2023

Can't say I like the displayPosition hack :/

Not sure what the plan is on vshaxe side.. I suppose we need a way to tell it that it's available, with protocol version maybe?

Also, supposedly we'd remove legacy diagnostics around Haxe 5 release or something?

Closes #9134

@kLabz kLabz added the feature-ide IDE / Editor support label Nov 25, 2023
@Simn
Copy link
Member

Simn commented Nov 25, 2023

Not sure what the plan is on vshaxe side.. I suppose we need a way to tell it that it's available, with protocol version maybe?

The "initialize" request has a "methods" field which lists all available methods. This way vshaxe can easily check if the new diagnostics method is available.

Also, supposedly we'd remove legacy diagnostics around Haxe 5 release or something?

Yes, I want to get rid of as much legacy display stuff as possible for Haxe 5.

@kLabz
Copy link
Contributor Author

kLabz commented Nov 25, 2023

Yes, I want to get rid of as much legacy display stuff as possible for Haxe 5.

I can open a PR after this one, that would remove legacy diagnostics while I know where to look. Then we can merge it [much] later when we want to get rid of it.

@Simn Simn marked this pull request as ready for review November 25, 2023 15:29
@Simn Simn merged commit a270435 into development Nov 25, 2023
122 checks passed
@skial skial mentioned this pull request Nov 28, 2023
1 task
0b1kn00b pushed a commit to 0b1kn00b/haxe that referenced this pull request Jan 25, 2024
* [diagnostics] implement diagnostics as json rpc

* [tests] use json rpc diagnostics

* [tests] add tests for json rpc diagnostics

* [diagnostics] no need for its own exception

* [compiler] fix run_or_diagnose weird edge case

* [diagnostics] no need for after_compilation callback anymore
@kLabz kLabz deleted the feature/diagnostics-as-json-rpc branch May 28, 2024 09:34
kLabz added a commit that referenced this pull request Jul 3, 2024
kLabz added a commit that referenced this pull request Jul 18, 2024
* [display] diagnostics as json rpc (Backport #11412)

* [tests] use json rpc diagnostics

* [tests] Add test for 11695

* [tests] Update diagnostics tests

* Run some filters in diagnostics (#11220)

* let's see how much breaks

* [tests] enable diagnostics tests for 11177 and 11184

* [tests] Update test for 5306

* Don't cache/run filters for find reference/implementation requests (#11226)

* Only run filters and save cache on diagnostics, not usage requests

* [tests] Update test for 11184

* disable test

* add VUsedByTyper to avoid bad unused local errors

* revert @:compilerGenerated change

---------

Co-authored-by: Rudy Ges <k@klabz.org>

* [display] get rid of TypeloadParse.current_stdin

* [display] fix -D display-stdin handling

* [display] generalize fileContents behavior to other json rpc display calls

* [display] fix range of pattern variables

Note: not including texprConverter changes

see 160a490
see #7282

* [tests] add test for #7282

* [tests] add test for #7931

* Remove populateCacheFromDisplay config

Legacy diagnostics = false, json rpc diagnostics = true

* [std] Diagnostics request doc

* [tests] Test Json RPC diagnostics with several open files

* [diagnostics] fix multi display files (#11722)

* [diagnostics] fix json rpc diagnostics display config

* [tests] Server tests: do not fail silently when runHaxeJsonCb errors

* [tests] add more diagnostics tests

* [display] rework multiple display files handling

* clean up a bit...

* [diagnostics] handle a.b.c.hx case, even if pointless

* [diagnostics] do not skip errors during DisplayProcessing.process_display_file

* Enable display tests again...

* [tests] fix display tests

---------

Co-authored-by: Simon Krajewski <simon@haxe.org>
kLabz added a commit that referenced this pull request Jul 18, 2024
* [display] diagnostics as json rpc (Backport #11412)

* [tests] use json rpc diagnostics

* [tests] Add test for 11695

* [tests] Update diagnostics tests

* Run some filters in diagnostics (#11220)

* let's see how much breaks

* [tests] enable diagnostics tests for 11177 and 11184

* [tests] Update test for 5306

* Don't cache/run filters for find reference/implementation requests (#11226)

* Only run filters and save cache on diagnostics, not usage requests

* [tests] Update test for 11184

* disable test

* add VUsedByTyper to avoid bad unused local errors

* revert @:compilerGenerated change

---------

Co-authored-by: Rudy Ges <k@klabz.org>

* [display] get rid of TypeloadParse.current_stdin

* [display] fix -D display-stdin handling

* [display] generalize fileContents behavior to other json rpc display calls

* [display] fix range of pattern variables

Note: not including texprConverter changes

see 160a490
see #7282

* [tests] add test for #7282

* [tests] add test for #7931

* Remove populateCacheFromDisplay config

Legacy diagnostics = false, json rpc diagnostics = true

* [std] Diagnostics request doc

* [tests] Test Json RPC diagnostics with several open files

* [diagnostics] fix multi display files (#11722)

* [diagnostics] fix json rpc diagnostics display config

* [tests] Server tests: do not fail silently when runHaxeJsonCb errors

* [tests] add more diagnostics tests

* [display] rework multiple display files handling

* clean up a bit...

* [diagnostics] handle a.b.c.hx case, even if pointless

* [diagnostics] do not skip errors during DisplayProcessing.process_display_file

* Enable display tests again...

* [tests] fix display tests

---------

Co-authored-by: Simon Krajewski <simon@haxe.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-ide IDE / Editor support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Diagnostics to JSON-RPC
2 participants