-
Notifications
You must be signed in to change notification settings - Fork 30k
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
repl: fix/improve persistent repl history #2356
Conversation
Still failing for me.
|
Yep, that fixes it for me. We should probably run CI though to be safe. |
LGTM if the CI is happy |
Hmm, windows isn't liking the cleanup, maybe I'll just have to refresh the
|
Uh, ok.. Hrmmm. New windows (and ARM) failure from
|
I think it needed to wait for I/O to close. Fingers crossed... CI again: https://jenkins-iojs.nodesource.com/job/node-test-pull-request/88/ |
CI still not happy on Windows :[
|
I'm not sure what's up with that. Somehow this is failing: https://github.com/nodejs/node/blob/master/test/common.js#L15-L57 Specifically: https://github.com/nodejs/node/blob/master/test/common.js#L45-L48 I thought it might have been if the history file was written to after it starts clearing the files but I don't think that is possible... |
Might be a Windows quirk: isaacs/rimraf#72 I think it must be intermittent, but we should still attempt an workaround later. Maybe give the CI a few more runs? |
@Fishrock123 any update on this? |
@evanlucas on the back burner right now. I think It can be fixed by replacing the |
I think this can be worked around by running the |
Hopefully this last patch fixed those stupid windows issues. https://jenkins-iojs.nodesource.com/job/node-test-pull-request/182/ |
Hmm, the rebase failed on that. here's a manual run: https://jenkins-iojs.nodesource.com/job/node-test-commit/339/ |
Ugh. |
Might as well install a full rimraf and be done with it, I know that it can handle |
Ok this |
This test is already being investigated, but until a solution is found it should be marked flaky. Ref: nodejs#2319 Ref: nodejs#2356
This test is already being investigated, but until a solution is found it should be marked flaky. Ref: nodejs#2319 Ref: nodejs#2356 PR-URL: nodejs#2659 Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
cc @nodejs/collaborators PTAL at the last commit |
17ad616
to
d4d9460
Compare
// Ensure everything that we expected was output | ||
assert.strictEqual(expected.length, 0); | ||
setImmediate(runTest); | ||
onClose(); | ||
}); |
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.
@silverwind @evanlucas can I get a last LGTM on this? this works without any even minor breaking changes now.
Ok, just pulled down and tested. I've run the tests hundreds of times now and haven't had them fail. LGTM |
d4d9460
to
d4dccd1
Compare
- Now cleans up the history file unless told otherwise. - Now also logs which test case failed. - Waits for flush after repl close if necessary. Fixes: nodejs#2319 PR-URL: nodejs#2356 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed By: Evan Lucas <evanlucas@me.com>
Previously the wrong end of the history was limited on load. PR-URL: nodejs#2356 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed By: Evan Lucas <evanlucas@me.com>
d4dccd1
to
73b7e05
Compare
Thanks, landed in d8db757...73b7e05 @nodejs/lts this is something we want in v4.x. |
Previously the wrong end of the history was limited on load. PR-URL: #2356 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed By: Evan Lucas <evanlucas@me.com>
Emitting 'close' before the history has flushed is somewhat incorrect and rather confusing. This also makes the 'close' event always asynchronous for consistency. Refs: nodejs#2356 PR-URL: nodejs#3435 Reviewed By: Evan Lucas <evanlucas@me.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Previously the wrong end of the history was limited on load. PR-URL: #2356 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed By: Evan Lucas <evanlucas@me.com>
Previously the wrong end of the history was limited on load. PR-URL: #2356 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed By: Evan Lucas <evanlucas@me.com>
Fix the history limiting to take the most recent. History additions are unshifted in readline.
Now tests the saved repl history size limiting.
Cleans up the test a bunch in the process, and also adds some debug so you can figure out which test case failed if it fails. Let me know if there is a better way to do that.