File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
tools/SourceKit/tools/sourcekitd-test Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -1616,15 +1616,13 @@ static void getSemanticInfoImpl(sourcekitd_variant_t Info) {
16161616
16171617static void getSemanticInfoImplAfterDocUpdate (sourcekitd_variant_t EditOrOpen,
16181618 sourcekitd_variant_t DocUpdate) {
1619+ // FIXME: currently we only return annotations once, so depending on thread
1620+ // ordering, the open/edit or update may contain them. Really we should
1621+ // switch everything to pull based to remove races like this.
16191622 if (sourcekitd_variant_dictionary_get_uid (EditOrOpen, KeyDiagnosticStage) ==
1620- SemaDiagnosticStage) {
1621- // FIXME: currently we only return annotations once, so if the original edit
1622- // or open request was slow enough, it may "take" the annotations. If that
1623- // is fixed, we can skip checking the diagnostic stage and always use the
1624- // DocUpdate variant.
1625- assert (sourcekitd_variant_get_type (sourcekitd_variant_dictionary_get_value (
1626- DocUpdate, KeyAnnotations)) == SOURCEKITD_VARIANT_TYPE_NULL);
1627-
1623+ SemaDiagnosticStage &&
1624+ sourcekitd_variant_get_type (sourcekitd_variant_dictionary_get_value (
1625+ DocUpdate, KeyAnnotations)) == SOURCEKITD_VARIANT_TYPE_NULL) {
16281626 getSemanticInfoImpl (EditOrOpen);
16291627 } else {
16301628 getSemanticInfoImpl (DocUpdate);
You can’t perform that action at this time.
0 commit comments