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

Publish diagnostics for syntax errors and improve tests #710

Merged
merged 4 commits into from
Nov 12, 2018

Conversation

jvican
Copy link
Contributor

@jvican jvican commented Nov 12, 2018

  1. We use our test resource project for the BSP test suite
  2. We fix regression showing a syntactic error as a log instead of diagnostic
  3. We refactor the nailgun specification so that it passes when run by bloop

More information in the commit messages.

This test is important to prove that killing the server and restarting
it again should still pick up the analysis files correctly and don't
recompile anything if there haven't been any changes.

This commit makes also sure that we can run these tests in bloop. There
were some problems when doing so regarding in, out and error streams
which are fixed in `NailgunTestUtils`.
Instead of hardcoding tests against the utest codebase. This helps us
keep the same level of testing but with the ability of modifying our
test project to better check for common BSP workflows.
@jvican jvican added bug A defect or misbehaviour. build server Any issue or pull request that has to do with hot compilers or BSP. task / compile labels Nov 12, 2018
The `ZincExistsPos` extractor was not getting populating the start line
and column from the default `line` and `offset` fields, it was only
using the new `startLine` and `startColumn`.

After making this change, syntactic errors are correctly reported as
diagnostics. An exhaustive test case has been added to our test suite to
make sure that:

1. Incremental compilation works within the same BSP session
2. We fail with a syntactic error shown as a diagnostic
3. We can successfully compile after removing the error altogether

Fixes #694
@jvican jvican merged commit d458a63 into master Nov 12, 2018
@tgodzik tgodzik deleted the topic/rework-bsp branch September 7, 2021 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect or misbehaviour. build server Any issue or pull request that has to do with hot compilers or BSP. task / compile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant