When building with bob I am unable to get the output of my script files to match what is produced in the editor, and as a result, error messages reported at runtime with projects built with bob have line numbers that do not align with the source code, while the projects built in the editor report the correct line numbers.
When building in the Edtior it appears that the output protobuf for a resulting .scriptc file that is generated in build/default has the following structure…
Source code (optional) > filename > bytecode
When building with bob:
filename > bytecode
When building with bob I am using the following command:
/Applications/Defold.app/Contents/Resources/packages/jdk11.0.1-p1/bin/java -cp /Applications/Defold.app/Contents/Resources/packages/defold-03b14982258f69eb8a06d28810ae879e16bd63d7.jar com.dynamo.bob.Bob --input "/Users/thejustinwalsh/Projects/tiny-stg/app" --root "/Users/thejustinwalsh/Projects/tiny-stg/app" --variant debug build
*Note: I have tried with and without --variant debug
and get the same results
The output matching is desired so that I can build proper integration with vs code.
Additional context: I am working on problem matches for vs code and noticed it pointing to the wrong line of code, as well as source maps failing to resolve.
I’ve attached the two file outputs below for reference.
scriptc-deffs.zip (8.1 KB)