Error opening file: $SOURCE

Monkey Forums/Monkey Bug Reports/Error opening file: $SOURCE

JaviCervera(Posted 2015) [#1]
With version 83c and the new experimental 84a, I get this error when trying to compile my game:

Error opening file: $SOURCE


When you close the popup that shows that error, a new one appears saying:

Syntax error - expecting identifier.


But it doesn't show the line with the error in Ted, because that error happens on the non-existing $SOURCE file that was reported as first error.

I am building on Mac, and it works correctly with 82b.

If needed, Mark, I can send you the source of my game by mail.


marksibly(Posted 2015) [#2]
Can you reduce it to a small runnable sample you can post here?

That would be incredibly useful!

If not, email it to me.


marksibly(Posted 2015) [#3]
Ok, think I've accidentally found this - looks like reflection has been broken for the last few releases.

I did attempt to tweak reflection so it would automatically reflect superclasses that weren't necessarily in the REFLECTION_FILTER, but it looks like the approach was flawed - knew it couldn't be that easy!

Will attempt to fix...

[edit]Ugh, too hard - and it doesn't handle class params etc. I'm gonna revert to the old (working) reflector for now and look at this again another day.[/edit]


JaviCervera(Posted 2015) [#4]
Ok, thanks Mark. Yes, I was trying to reduce the sample to reproduce the error but couldn't do it, and I was thinking that the most exotic thing I am doing in the game is inversion of control through reflection to achieve dependency injection, so I can work with interfaces and define on text files which class to use to satisfy the dependencies.