-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameters for "daux serve" mode have no effect #171
Comments
Hello, thanks for the detailed report. it is indeed a problem that the processor is not taken in account through the command line. If I may recommend, try to use the processor through the config.json as it is read in both the generate and serve commands. For the verbose argument though, it will probably not be as easy, as an echo from the command will be output to the web page in the serve mode. I will see how we can make sure the output goes to stdout. |
I have looked into it and I think we can't solve this with a quick fix. As a first step I've made it possible to have verbose logging from For this I will need a bit more time. maybe I'll write a configuration file to a temporary path and simplify the configuration loading logic. |
@onigoetz Thank you for the reply and don't rush into any fast decisions ;-) My 2 cents:
|
Interesting, thanks for the ideas ! I'll definitely look into that :) One thing to keep in mind though is that in serve mode, it has to parse the whole docs folder in order to make every single page. so I want that to be as fast as possible. |
@onigoetz Just to give you some feedback regarding the performance. https://active-directory-wp.com/docs has around ~130 files and larger docs and daux work in serve mode without any performance problems. |
So I made some changes that handles the configuration layer better, and when using the serve command creates a serialized configuration that is read by the index.php, thus skipping this on each subsequent request. This makes all command line settings supported in the serve mode. I looked into Symfony's application but that seemed even more work to get it right. |
@onigoetz I really appreciate the effort you have put into fixing this issue and looking forward to a new release :-) |
The fixes discussed in this issue are available in version 0.12 |
Describe the bug
None of the command line parameters for "daux serve" are not reflected when using the live mode.
To Reproduce
Steps to reproduce the behavior:
a)
daux serve --processor=InvalidProcessor
b)
daux serve --processor=ValidProcessor
c)
daux serve --verbose
Expected behavior
See above.
Additional context
The problem resides in the way Daux is calling itself. When using
daux serve
, Symfony is used with its command line arguments but they are not reflected back when using PHP'spassthru
method in Console\DauxCommand.php. I've changed the file accordingly so we could theoretically reuse the command line arguments:Nevertheless, the arguments are not taken into credit as
index.php
does not use any of Symfony's application or command line context but directly instantiates theDaux class
by callingThe situation can be improved in a few different ways:
verbose
andprocessor
from the serve commandprocessor
argument can only be used withdaux generate
OR by providing the class name inside theconfig.json
fileThe text was updated successfully, but these errors were encountered: