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

Include diagnostics in snapshot output #226

Merged
merged 8 commits into from
Dec 25, 2023

Conversation

jtibshirani
Copy link
Member

This change adds diagnostic information to the snapshot output to support
testing. To make it possible to test this in the SCIP repo, it updates the
reprolang generator to output a diagnostic for every identifier that starts
with 'deprecated'.

Example output:

 reference deprecatedMethod.
#          ^^^^^^^^^^^^^^^^^ reference diagnostics.repro/deprecatedMethod.
#          diagnostic Warning: deprecated identifier

Closes #213

Test plan

New snapshot test to check diagnostics output

@jtibshirani
Copy link
Member Author

This PR is based on #220, with the following differences:

  • Don't introduce a new flag --include-diagnostics, as I think it's fine to just enable this by default. When people update to this new SCIP version, they can just update their test snapshots if needed.
  • Print the diagnostic warning and message instead of the 'code', as these are required fields and more likely to be present

@varungandhi-src
Copy link
Contributor

Nice work. I noticed that we were truncating the multiline output for docs (and you probably copied that for the diagnostic message), which seems like undesirable behavior from the POV of an indexer as you want to make sure the full contents are correct. So I've tweaked that.

@varungandhi-src
Copy link
Contributor

Rebased on include the build failure fix from #228

@varungandhi-src varungandhi-src merged commit a0147a7 into sourcegraph:main Dec 25, 2023
2 checks passed
@jtibshirani jtibshirani deleted the diagnostics branch January 1, 2024 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include diagnostics in scip snapshot output
3 participants