-
Notifications
You must be signed in to change notification settings - Fork 4
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
Added watch.sh #9
Conversation
Till now, there is one minor issue: I could work around this in |
It should be possible to add a |
Thank you :) Even without I used DocLog with watch.sh quite extensively and successful :) I wrote a little tutorial about how to use prolog + scryer + playground. I assume I will push it soon and will let you know than… Are you interested in a listing of issues, workarounds and error messages I experienced, while working with DocLog? |
One elegant and also more generally useful way to solve this would be to add a For instance, by specifying |
Previous related discussion: mthom/scryer-prolog#187 (comment) |
While we implement that on Scryer, I pushed a commit that wraps everything in a @triska maybe that flag deserves its own issue as the original one was closed |
cc32cd5
to
5584fbf
Compare
@triska Thanks for your support :) @aarroyoc Thank you for the catch wrap :) I tested it and it works for many cases. There are some cases when the catch is not enough. Here an example in case you would like to reproduce:
page("Test page", "First steps", "test-page.dj", "this causes an error") When starting DocLog, I get:
Obviously parsing the config was not catched. In practice there is one case I had several times, when I produced syntax-errors in the config: If you have a simple fix for catching syntax-errors during initialization (e.g. by consulting the config from main inside the catch) I appreciate it. If not, it should be fine too. From my perspective the feature works well enough to be merged. |
Not yet having a |
Yes thank you, good point, I have filed mthom/scryer-prolog#2651 for it! |
As mentioned by @hurufu in mthom/scryer-prolog#2651 (comment), multiple |
Does the proposed solution by @triska work for you? |
Yes, seems to work well :) From my side, this PR is ready to be merged |
doclog.sh
Outdated
@@ -5,5 +5,5 @@ SOURCE=$(realpath $1) | |||
OUTPUT=$(realpath $2) | |||
|
|||
cd $DOCLOG | |||
scryer-prolog -g 'run("'$SOURCE'", "'$OUTPUT'").' main.pl | |||
scryer-prolog -g 'run("'$SOURCE'", "'$OUTPUT'").' -g 'halt.' main.pl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-g halt
should work.
20352ce
to
03cfb2d
Compare
@@ -5,5 +5,5 @@ SOURCE=$(realpath $1) | |||
OUTPUT=$(realpath $2) | |||
|
|||
cd $DOCLOG | |||
scryer-prolog -g 'run("'$SOURCE'", "'$OUTPUT'").' main.pl | |||
scryer-prolog -g 'run("'$SOURCE'", "'$OUTPUT'").' -g 'halt' main.pl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned, I think -g halt
would work.
Use inotifywait (from inotify-tools) to rebuild everytime the SOURCE changed