Giter Site home page Giter Site logo

codebndr / compiler Goto Github PK

View Code? Open in Web Editor NEW
76.0 76.0 36.0 1.16 MB

The codebender compiler backend.

Home Page: https://codebender.cc

License: BSD 2-Clause "Simplified" License

PHP 89.90% Python 6.03% Shell 2.57% ApacheConf 1.31% HTML 0.19%

compiler's People

Contributors

dastergon avatar ehostunreach avatar fpapadopou avatar spiliot avatar tzikis avatar xobs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compiler's Issues

can not post using python

If I use python to post data to this compiler server api, it returns "invalid input".
I use urllib2 to post. And I found that the request data the server received is not a json.

General Documentation

This is probably a stupid question, but how do you make a successful request to the compiler? I'm having difficulty understanding what data the server actually wants to receive and there are no tutorials explaining how this works. I've been using xmlhttp to post the sketch to the server, but I only get fail messages despite the fact that I'm only using a simple ' void setup(){} void loop(){} ' script.

Thanks in advance!

Google Ending support for packaged apps

Sorry if this is the wrong place for this question, but I was curious to know if you had any plans for how to adjust to Google's plans to end support for packaged apps. I'm using a codebender server with my own packaged app to flash compiled code to the board b/c that seems to be the only way to access the serial port from javascript.

I was wondering if you folks would be willing to share your approach.

If an error occurs during an `exec` call, we get empty output

Issue description and reproduction steps

When providing G++ or Clang with parameter files that contain parentheses in their names, PHP's exec function breaks and you get sth like this on the stderr output (caught in command line):

sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `avr-g++ -Os -ffunction-sections -fdata-sections -fno-exceptions  -I/arduino-core-files-OSX/v105/hardware/tools/avr/lib/gcc/avr/4.3.2/include -I/arduino-core-files-OSX/v105/hardware/tools/avr/lib/gcc/avr/4.3.2/include-fixed -I/arduino-core-files-OSX/v105/hardware/tools/avr/avr/include  -mmcu=atmega328p -DARDUINO=105 -DF_CPU=16000000 -DUSB_VID=null -DUSB_PID=null -MMD  -I/external_cores/override_cores/arduino/ -I/arduino-core-files-OSX/v105/hardware/arduino/cores/arduino -I/arduino-core-files-OSX/v105/hardware/arduino/variants/standard -I/tmp/compiler.elVKPg/libraries/Ethernet(3) -c -o '/tmp/compiler.elVKPg/files/Blink'.o '/tmp/compiler.elVKPg/files/Blink'.cpp 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `LD_LIBRARY_PATH=/arduino-core-files-OSX/clang/v3_5/lib:$LD_LIBRARY_PATH /usr/bin/clang --target=msp430 -w -fsyntax-only -fcolor-diagnostics  -I/arduino-core-files-OSX/v105/hardware/tools/avr/lib/gcc/avr/4.3.2/include -I/arduino-core-files-OSX/v105/hardware/tools/avr/lib/gcc/avr/4.3.2/include-fixed -I/arduino-core-files-OSX/v105/hardware/tools/avr/avr/include  -D__AVR_ATmega328P__ -DARDUINO=105 -DF_CPU=16000000  -I/external_cores/override_cores/arduino/ -I/arduino-core-files-OSX/v105/hardware/arduino/cores/arduino -I/arduino-core-files-OSX/v105/hardware/arduino/variants/standard -I/tmp/compiler.elVKPg/libraries/Ethernet(3) -c -o '/tmp/compiler.elVKPg/files/Blink'.o '/tmp/compiler.elVKPg/files/Blink'.cpp 2>&1'

Notice the -I/tmp/compiler.elVKPg/libraries/Ethernet(3) part in both avr-g++ and Clang commands.

As a result, both compilers end up with a syntax error, never executing the requested command.

We do redirect stderr to stdout using 2>&1 in the end of all commands provided to PHP's exec, however this doesn't work for such cases.

Need to find a way to catch this output.

Make the compiler compile Arduino 1.6 sketches

Start implementing the storing of the files in a temp folder, like it's done now in the CompilerHanlder,
and make sure that the temp folder can be used in order to successfully compile the project with Arduino 1.6 through command line.

Make sure that the response is the same as the one from CompilerHandler's main function (in terms of structure).

Try to keep your code tested (at least functional tests).

[Insight] PHP code should follow PSR-1 basic coding standard - in Symfony/src/โ€ฆ/Handler/UtilityHandler.php, line 109

in Symfony/src/Codebender/CompilerBundle/Handler/UtilityHandler.php, line 109

Method names should be declared in camelCase. You should rename this class to comply with PSR-1.

     *
     * \param string $directory The directory to search for files.
     * \param mixed $extensions An array of strings, the extensions to look for.
     * \return A list of files that have the appropriate extension.
     */
    function get_files_by_extension($directory, $extensions)
    {
        if (is_string($extensions))
            $extensions = array($extensions);

        $files = array();

Posted from SensioLabsInsight

Create new install script for Arduino 1.6.0

Create/update a bash script that can be run to install the new compiler software for Arduino 1.6 on an Ubuntu server. This includes downloading dependencies and Arduino core files and building the appropriate subset if necessary. May also include writing a custom build script for Arduino to only include files necessary for compilation, without the GUI.

Server 404, Installation problem?

I've followed the installation steps on the compiler wiki for 5 times.
Every time it seems to be installed correctly and apache2 service is running, but request to the route "complier/status" returns a 404.
I also tried other example requests in the wiki, but all returns a 404.
I'm using Ubuntu14.04 on AWS EC2.
Please help, Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.