Skip to content

Commit

Permalink
Fix typechecking bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
alex999990009 committed Jun 13, 2024
1 parent f992bf2 commit f08d0ff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,15 @@ class TypecheckRunConfigurationProducer: LazyRunConfigurationProducer<TypeCheckC
val modulePath = file.moduleLocation ?: return null
sourceElement?.set(definition)
val fullName = definition.fullName
return MyConfiguration("Typecheck $fullName", TypeCheckCommand(file.libraryName ?: "", modulePath.toString(), fullName))

val test = ArendModuleConfigService.getInstance(context.module)?.testsDirFile
val fullNameTest = test?.getRelativePath(file.virtualFile)?.joinToString(".")

return if (fullNameTest != null) {
MyConfiguration("Typecheck $fullName", TypeCheckCommand(file.libraryName ?: "", "$TEST_PREFIX.$modulePath$EXTENSION", fullName))
} else {
MyConfiguration("Typecheck $fullName", TypeCheckCommand(file.libraryName ?: "", "$modulePath$EXTENSION", fullName))
}
}
is ArendFile -> {
sourceElement?.set(definition)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ import org.arend.naming.reference.ModuleReferable
import org.arend.psi.ArendFile
import org.arend.psi.ext.PsiLocatedReferable
import org.arend.psi.ext.fullName
import java.util.concurrent.ConcurrentHashMap

interface ProxyAction {
fun runAction(p : SMTestProxy)
}

class TypecheckingEventsProcessor(project: Project, typeCheckingRootNode: SMTestProxy.SMRootTestProxy, typeCheckingFrameworkName: String)
: GeneralTestEventsProcessor(project, typeCheckingFrameworkName, typeCheckingRootNode) {
private val definitionToProxy = mutableMapOf<PsiLocatedReferable, DefinitionProxy>()
private val definitionToProxy = ConcurrentHashMap<PsiLocatedReferable, DefinitionProxy>()
private val fileToProxy = mutableMapOf<ModulePath, DefinitionProxy>()
private val deferredActions = mutableMapOf<GlobalReferable, MutableList<ProxyAction>>()
private var isTypeCheckingFinished = false
Expand Down

0 comments on commit f08d0ff

Please sign in to comment.