A very, very, minor suggestion for amforth-shell.py in the next
release.

If amforth-shell.py finds multiple matches for a filename whilst
executing a #include directive then it exits silently. It really has
no choice but to exit (which one to load?). Adding a
self.progress_callback line (as per the other filename related tests)
gives a hint that things are going awry. 

I think this would work

self.progress_callback("Error", None,  "Wrong # of file "+ filename+" found in 
search path") # add this line above the one below 
raise AMForthException("Wrong # of file occurances: " + filename + " 
("+str(len(self._filedirs[filename]))+")\n\t"+"\n\t".join(self._filedirs[filename]))

An easy way to demonstrate this is to defeat amforth-shell.py inbuilt
intelligence and knowledge of mcu type by 

export AMFORTH_LIB=/path-to/amforth-6.8

and create a file with the line

#include marker.frt

and send it to the mcu with amforth-shell.py

In the standard distribution there are two marker.frt files

../amforth-6.8/avr8/lib/forth2012/core-ext/marker.frt
../amforth-6.8/msp430/lib/forth-2012/core-ext/marker.frt

so amforth-shell.py will silently exit after the #include marker.frt
line.

Best wishes,
Tristan

 










_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to