Closed NTaylorMullen closed 2 years ago
I think this validates the last constraint documented here: https://microsoft.github.io/language-server-protocol/specifications/lsif/0.6.0/specification/#emittingConstraints
This constraint got added on special request of the CodeIndex team :-). So we need to check if this can really be loosened.
Talked offline: Looks like this is an intended restriction with the intention to ease LSIF consumption of tools like CodeIndex. Meaning, once an item element is parsed you're guaranteed to know what document that item belongs to so you don't need to keep as much in memory.
Will close that out with this restriction /cc @jasonmalinowski
In scenarios where
contains
nodes would occur post-item nodes our validator would explode because it'd validateitem
nodes at their time of occurrence. Meaning if you had:We'd validate the
item
node and see if there was acontains
node that mentioned it'sinVs
.This changeset adds a new
postValidate
path and changes the existing validate interactions to pass multiple elements (instead of one at a time) so we can ensure that we've iterated over the entire set prior to callignpostValidate
validate
interaction.Added a test for C# specific files that takes in a C# LSIF file and validates that no validation errors have occurred.