p4lang / p4analyzer

A Language Server Protocol (LSP) compliant analyzer for the P4 language
Apache License 2.0
20 stars 3 forks source link

Cargo Tester: Stdout Capture Refactor #6

Closed AndrewF001 closed 1 year ago

AndrewF001 commented 1 year ago

Issue

The reason we're capturing the Stdout is because that is how the LSP communicates with VScode. At the moment it is hardcoded into crates\p4-analyzer\src\stdio.rs, which is why the current commented out implementation in Tester uses a Cargo called gag. This crudely redirects the Stdout which enables us to test the LSP output. There are two blaring issues with the current implementation (which is why it's commented out):