Git Product home page Git Product logo

Comments (15)

shabbyrobe avatar shabbyrobe commented on June 27, 2024

Yikes. Thanks heaps for reporting. I'll look in to this over the next few days.

from docopt.php.

marcioAlmada avatar marcioAlmada commented on June 27, 2024

thnx, docopt is really great!

from docopt.php.

shabbyrobe avatar shabbyrobe commented on June 27, 2024

I've tried to run the tests using hhvm and they all pass. Can you please submit a script that replicates the problem?

from docopt.php.

marcioAlmada avatar marcioAlmada commented on June 27, 2024

Sure.

#!/usr/bin/env hhvm
<?php //app

include __DIR__ . '/vendor/autoload.php';

$doc = <<<DOC
App.

Usage:
  app (-h | --help)
  app --version
DOC;

$args = (new \Docopt\Handler(['version'=>'App 0.1']))->handle($doc);

Then run hhmv app. This seems to be enough to hang and fry a computer with HipHop VM 2.4.0 (rel). Only happens with HHVM. Am I doing something wrong?

from docopt.php.

shabbyrobe avatar shabbyrobe commented on June 27, 2024

Am I doing something wrong?

This definitely merits further testing on my part - even if you were doing something wrong - and at first glance it doesn't look at all like you are - docopt's failure mode should never be to hang and/or fry any computers!

You've given me enough information to debug for now, so I'll see what I can find and get back to you. Thanks again for your help!

from docopt.php.

marcioAlmada avatar marcioAlmada commented on June 27, 2024

Hi, how should I run the tests? :)

from docopt.php.

shabbyrobe avatar shabbyrobe commented on June 27, 2024

On the develop branch, you need to run the following:

git submodule update --init
composer install
php test.php

This will run the PHP version's tests as well as the Python version's language agnostic tests.

Are you running on the master branch or the develop branch?

from docopt.php.

marcioAlmada avatar marcioAlmada commented on June 27, 2024

I wast on master. Switched to develop and HHVM still hangs... wondering why.

It hangs exactly here, when handling this docopt spec.

from docopt.php.

shabbyrobe avatar shabbyrobe commented on June 27, 2024

I've tried again using exactly those files, once again I can't reproduce. Sorry! This one's a bit of a doozy. What version of HHVM?

blake-ubu 11:29 2/epilog$ hhvm --version
HipHop VM 3.3.0 (rel)
Compiler: tags/HHVM-3.3.0-0-g0a3cfb87b8a353fc7e1d15374f4adc413e37aba9
Repo schema: 9a391d9a03e15fccba1cde6d35c05b7cdd380238
Extension API: 20140829

blake-ubu 11:29 2/epilog$ ./epilog test

Fatal error: Uncaught exception 'Epilog\FlowException' with message 'Command not defined, try epilog --help' in /home/blake/tmp/hhvm/2/epilog/epilog:14
Stack trace:
#0 {main}
Command not defined, try epilog --help

from docopt.php.

marcioAlmada avatar marcioAlmada commented on June 27, 2024

Ok, to be honest I don't think it's a problem with docopt anymore. Don't waste your time, I'll build the bleeding edge HHVM from source (this will take some minutes ☕) and give you feedback.

from docopt.php.

marcioAlmada avatar marcioAlmada commented on June 27, 2024

Ok, it works as expected with HHVM from master! Thank you for the support.

from docopt.php.

shabbyrobe avatar shabbyrobe commented on June 27, 2024

Oh phew, glad to hear it's working for you now. I'd still like to see if there's something we can identify with it, maybe stick a caveat in the README if I can't find what's causing the hang. This could well bite someone else in the future. Do you know what the version was that exhibited the problem?

from docopt.php.

marcioAlmada avatar marcioAlmada commented on June 27, 2024

Problem happened with HHVM 2.4.0, it's the current version for most package managers. Anyway, the minor LTS version of HHVM is 3.3 so most people will be using LTS, this won't be a big deal.

from docopt.php.

shabbyrobe avatar shabbyrobe commented on June 27, 2024

Do you think a README note will be enough?

Docopt is tested with PHP 5.3, 5.4, 5.5 and 5.6, and whichever version of HHVM Travis decides to use today.

from docopt.php.

marcioAlmada avatar marcioAlmada commented on June 27, 2024

...and centuries later... #13

It's nice to note this on README but we could add HHVM LTS as a composer platform package too :)

from docopt.php.

Related Issues (10)

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.