EngineHub / EngineHub/CommandHelper

Static analysis exception "Procedure cannot be resolved" when procedure exists

Abierto
#1,239 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
128
Forks
70
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Static analysis will throw exception with message "Procedure cannot be resolved" for all user procedures in this case:
```
# main.ms
proc _path() {
return('test-2.ms')
}

proc _test() {
console('test')
}

include('test-1.ms')
```
```
# test-1.ms
include(_path())
```
```
# test-2.ms
_test()
```
```
ms.lang.IncludeException: There was a compile error when trying to include the script at C:\Users\A-y57\Dev\minecraft\plugins\CommandHelper\test-2.ms
Procedure cannot be resolved: _test :: test-2.ms:1
at <>:C:\Users\A-y57\Dev\minecraft\plugins\CommandHelper\test-1.ms:1.9
at <>:C:\Users\A-y57\Dev\minecraft\plugins\CommandHelper\main.ms:9.2
```
If replace _path with 'test-2.ms' - everything works
If disable static analysis, everything works

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Reproduce the static-analysis failure with main.ms, test-1.ms, and test-2.ms, comparing the dynamic include(_path()) case with the literal path. Start by tracing static analysis for included scripts and procedure resolution; done means the existing _test procedure resolves without an exception while static analysis remains enabled.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
tooling
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.