farnulfo / ai-contest

Automatically exported from code.google.com/p/ai-contest
0 stars 0 forks source link

compile_anything.py -- compile_function() should return a tuple #187

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It appears that compile_function is supposed to return a tuple (out, err).  
Looking at the first case (Java), apparently they represent the stdout and 
stderr of the compilation process, respectively.

For some of the languages, their section of the code doesn't return anything.  
Hence the compile_anything() function will receive None, and view the 
compilation as having failed.  Therefore it is impossible to submit anything 
using that language, even though it has an entry in the list.

The issue affects:

C
Go
Scheme
Lua
Clojure

It is unclear why there would be a language entry for these, but have the 
compile_function always fail.  If some of these aren't actually ready to be 
used, please consider at least fixing the C entry.

I have attached a patch which makes C compilation behave like C++ compilation, 
by keeping track of stdout and stderr and returning them.  It was generated 
using svn diff from r397.

Original issue reported on code.google.com by jklan...@gmail.com on 4 Oct 2010 at 8:03

Attachments:

GoogleCodeExporter commented 8 years ago
It appears that issue 130 supersedes this one, because 130 proposes a total 
rewrite of compile_function().

Original comment by jklan...@gmail.com on 5 Oct 2010 at 11:15

GoogleCodeExporter commented 8 years ago
Issue 192 has been merged into this issue.

Original comment by jokeserver on 8 Oct 2010 at 5:29

GoogleCodeExporter commented 8 years ago
Please make the priority of this bug higher.
Total rewriting of compile_function() requires a lot of time and testing while 
fixing this is quite fast so people can submit their bots.

Original comment by buratin....@gmail.com on 8 Oct 2010 at 5:41

GoogleCodeExporter commented 8 years ago
The rewriting was completed, and compilation for these languages should work 
now.

Original comment by jokeserver on 12 Oct 2010 at 4:28

GoogleCodeExporter commented 8 years ago
Thanks!

Original comment by buratin....@gmail.com on 12 Oct 2010 at 6:13

GoogleCodeExporter commented 8 years ago

Original comment by jokeserver on 12 Oct 2010 at 3:45