Comments (15)
Yikes. Thanks heaps for reporting. I'll look in to this over the next few days.
from docopt.php.
thnx, docopt is really great!
from docopt.php.
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.
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.
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.
Hi, how should I run the tests? :)
from docopt.php.
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.
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.
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.
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.
Ok, it works as expected with HHVM from master! Thank you for the support.
from docopt.php.
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.
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.
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.
...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)
- PHP API issues with ExitExceptions HOT 7
- Options section is more rigidly defined than other docopt implementations HOT 3
- Handle quoted multi-word argument & option values HOT 2
- Benefit of static analysis HOT 1
- Readable coding style HOT 1
- No installable candidates for 3 years - how so? HOT 7
- parse_argv doesn't work properly with optionsFirst HOT 2
- Allow args beginning with "-" HOT 8
- How can I represent yes or no value? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docopt.php.