From b8061f9e1a9cd31fa6b45246f2ab6ed095a32e68 Mon Sep 17 00:00:00 2001 From: Varun Gandhi Date: Fri, 16 Jun 2023 14:30:16 +0800 Subject: [PATCH] fix: Skip missing type info log message in untyped code --- scip_indexer/SCIPIndexer.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scip_indexer/SCIPIndexer.cc b/scip_indexer/SCIPIndexer.cc index 7cfffeed1..e20e1f573 100644 --- a/scip_indexer/SCIPIndexer.cc +++ b/scip_indexer/SCIPIndexer.cc @@ -858,12 +858,14 @@ class CFGTraversal final { if (it != this->localDefinitionType.end()) { overrideType = computeOverrideType(it->second, type); } else { - LOG_DEBUG( - gs, core::Loc(file, loc), - fmt::format( - "failed to find type info; are you using a code pattern unsupported by Sorbet?\ndebugging " - "information: aliasMap: {}", - this->aliasMap.showRaw(gs, file, cfg))); + if (file.data(gs).strictLevel >= core::StrictLevel::True) { + LOG_DEBUG( + gs, core::Loc(file, loc), + fmt::format( + "failed to find type info; are you using a code pattern unsupported by Sorbet?\ndebugging " + "information: aliasMap: {}", + this->aliasMap.showRaw(gs, file, cfg))); + } overrideType = type; } if (isDefinition) {