transpiler icon indicating copy to clipboard operation
transpiler copied to clipboard

scope not found

Open Zeatynis opened this issue 3 years ago • 8 comments

Hi, can you help me aim the cause of the following error? Why doesn't the error show the file/class in which this error occured (isn't it possible)?

methodName: constructor
Error: MethodTranspiler, scope not found
    at MethodImplementationTranspiler.transpile (webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/method_implementation.js?:22:19)
    at Traversal.traverseStatement (webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/traversal.js?:424:38)
    at Traversal.traverseStructure (webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/traversal.js?:411:38)
    at Traversal.traverse (webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/traversal.js?:27:25)
    at ClassImplementationTranspiler.transpile (webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/structures/class_implementation.js?:13:39)
    at Traversal.traverseStructure (webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/traversal.js?:405:48)
    at Traversal.traverse (webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/traversal.js?:27:25)
    at HandleABAP.runObject (webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/handle_abap.js?:24:178)
    at Transpiler.run (webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/index.js?:56:83)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Zeatynis avatar Jul 05 '22 20:07 Zeatynis

I've not seen the error before, so error message could be better :)

larshp avatar Jul 05 '22 20:07 larshp

Will you expand the error message or should I do this?

Zeatynis avatar Jul 05 '22 20:07 Zeatynis

I'm not doing it today, perhaps tomorrow

larshp avatar Jul 05 '22 20:07 larshp

That is the answer for my second question (which I didn't ask yet 🤣 ): When do you plan to do it? So as I know the answer already... Take your time. I didn't mean to rush you 😃

Zeatynis avatar Jul 05 '22 20:07 Zeatynis

try again 2.0.51

it should give a bit more information

larshp avatar Jul 06 '22 08:07 larshp

I already had method name in that error message. I added it locally. But I don't know which constructor (of which class) is this.

Zeatynis avatar Jul 06 '22 09:07 Zeatynis

I've added also the filename to the error message but it didn't help me. I still don't know what is the problem that transpiler has here... What can cause the "scope not found"?

Zeatynis avatar Jul 06 '22 18:07 Zeatynis

filename output added in #1052

larshp avatar Jan 08 '23 10:01 larshp