-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Runner doesn't break on newlines between knots/stitches #44
Comments
Good to know, thank you for providing a test case ^^ let take a look in these mysteries. |
Heureka? It seems like it was a confusion between return and break in the step function. I will open the PR in the next days (just to verify that the change is right) |
I found a related bug. It seems that the same issue appears with functions:
This will output:
Instead of:
I have attached a modified EDIT: tests.zip Stepping through the code, I've identified that it's not a regression from #45; it was broken even when If I remove that
@JBenda does that seem correct? If so, let me know; I can create a PR for that change. That said, I might be totally off the mark; I'm still new to the codebase! |
Thanks for the digging, it seems like a miss placement of some forget/save thing, but just removing the forged leads to wrong visit count from look aheads. So more likely something else in wrong, maybe we also need a new case? (don't think so currently) Removing the forget at no_changes looks like a good starting point. Look at #48 for an implemented version of your new test, feel free to also start your own PR based on this. The missing counting error was located when running ink-proof |
#48 seemst to work now, the forget was missplaced no_chache should not trigger a forget (as you descripetd) but if we encounter a second newline (through tunnels or multiple glues) we need to move the save state with us to restore to the correct location, for that detecting a new line needs to forget the old save state and create a new one |
Awesome, thankye. |
When using the function
std::string runner::getline()
, it should only go line-by-line. But currently, running the following ink:... produces this output:
It seems knots and stitches don't properly cause the runner to break, even if they correctly generate a newline.
To confirm, I tested this Ink on the latest Inklecate and C# Runtime API, and using
Continue()
produced the correct behavior of:I tried to fix this myself, but I'm not familiar enough with the internals of inkcpp or Ink to understand where the issue is. But, in the process, I made a test that could be helpful to anyone wanting to tackle this:
LinesTest.zip
The text was updated successfully, but these errors were encountered: