musketyr / wavid

Automatically exported from code.google.com/p/wavid
0 stars 0 forks source link

Compilation and code verification #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I think the developer should have his code compiled while typing same as
modern IDEs does.

implementation ideas:
have the user configure some sort of robot which corresponds to some server
that does compilation and possibly execution. we need to find some way to
make this robot in a local vicinity as my understanding is that robots are
identified by a url much as a mail address. maybe have his own deployment
of the robot.

Original issue reported on code.google.com by mohammad...@gmail.com on 4 Jun 2009 at 9:44

GoogleCodeExporter commented 9 years ago
my idea was compiling robot who compile and gather diagnostics and highlight 
errors/warning back in wave

Original comment by vladimir.orany on 4 Jun 2009 at 9:50

GoogleCodeExporter commented 9 years ago
ya thats cool but how would this robot compile the code ?

Original comment by mohammad...@gmail.com on 4 Jun 2009 at 10:08

GoogleCodeExporter commented 9 years ago
I only know how it is possible in Java. see for example 
http://www.javabeat.net/articles/73-the-java-60-compiler-api-1.html or find 
more about 
java compiler api here http://jcp.org/en/jsr/detail?id=199
I know that some tools also uses Eclipse Java compiler but I don't know 
acctually how 
does this tool works.

Original comment by vladimir.orany on 4 Jun 2009 at 4:00

GoogleCodeExporter commented 9 years ago
sure I know that. what I mean is compilation is fairly expensive given cpu 
cycles and 
can be expensive if there was one global robot. I thought we would offer this 
robot 
and teams would have their own local deployment to handle such task.

Original comment by mohammad...@gmail.com on 4 Jun 2009 at 4:05

GoogleCodeExporter commented 9 years ago
Incremental compiler is part of Eclipse JDT Core:

http://www.eclipse.org/jdt/core/index.php

It would not be problem for robot to use it over Equinox container:

http://www.eclipse.org/equinox/

Original comment by vladimir.orany on 4 Jun 2009 at 4:05

GoogleCodeExporter commented 9 years ago
I'd propose not to deal with compiled languages. That's making the whole 
project too
complicated at the beginning. Focusing on scripting languages first (PHP, Ruby,
Python) would simplify the whole idea alot. Syntax checking would be in place 
here,
but again - this can be done in later phase.

Original comment by dominik.kapusta@gmail.com on 21 Oct 2009 at 11:46

GoogleCodeExporter commented 9 years ago
If you want a robot that compiles the code, it'll probably be best the chroot 
each of
the compilers and find a way to handle the cpu's load, could also try messing 
with
namespacing. Depending on the type of programming language as well you can say 
how
many threads of that compiler are allowed to run.

You could set it up something like:
Server 1 has robot and pre-compiler code error checking.
Server 2 has the compilers (You could do this as a local computer with a Static 
IP
for now for testing purposes).

If the code passes the error checking on Server 1 then pass the code to Server 2
along with which compiler is selected and in what configuration.

Server 2 should be running as little processes as possible the ensure that 
maximum
memory and cpu is available.

You could also make the robot queue compile jobs if Server 2 is overloaded. You 
would
also need to output error messages (or just run in verbose mode) by the 
compiler to a
file and then return that file to the robot on Server 1, this might be a new 
wave or
just a blip called "[prog_name] Compile Results". You would also need to find a 
way
to allow a max run-time for the compiler and then end the process if it goes 
over
this run-time, the max run-time might be variable depending on the lines of 
code and
what functions are used in the code. This would enforce good practice in 
programming
aswell.

Some compilers will be harder than others, Java, C#, C++ should be alright (to 
a point).

This project seems very interesting :D

Adam.

Original comment by adam.pre...@googlemail.com on 1 Dec 2009 at 2:16