Tried under Windows and Linux, both having this:
$ ls -ltr
total 16
-rwxr-xr-x 1 tfrmrun msogrp 89 Oct 5 00:37 myTest.scala
-rw-r--r-- 1 tfrmrun msogrp 708 Oct 5 19:52 Macros.scala
-rw-r--r-- 1 tfrmrun msogrp 1659 Oct 5 19:52 Macros.class
-rw-r--r-- 1 tfrmrun msogrp 2442 Oct 5 19:52 Macros$.class
$ rm *.class
$ myTest.scala
/home/tfrmrun/eclipseWorkspace/ScalaUtils/common/myTest.scala
3
$
After I remove the class files, the script is still working. That will be a problem if the company deployed a new version of Macros.
I will have to remove this dir and run again, new Macro code will take effect.
rm -rf /tmp/scala-develtfrmrun
Extra step of removing temp dir after deployment is not a big problem. But this looks like a bug.
On the other hand, why do we have to compile Macro separately? Can the importing to be enforced instead of compiling? LIke this:
Macro must be import before any object can use it. When interpreter scan over the import, it will go find the Macro definition file and compile on the fly first.