-
Notifications
You must be signed in to change notification settings - Fork 773
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
Rewrite lib/copy/ncp.js #292
Comments
I think that rewriting is a mistake for 1.0.0 and shouldn't even be considered even though it's bad legacy code. By all means, don't let me stop you, it's just in my long experience of writing code a rewrite is a bad idea 99% of the time. |
See #294 |
@jprichardson Refs #83. This needs done sometime. (don't know when) Would you consider a custom build/refactor based on https://github.com/davglass/cpr sometime in the future? Just a random idea, since it's one of the few well-maintained directory copiers. Or do you want to roll your own, based on klaw? |
So what is the decision on this? We need to decide what we want to do about this as @jprichardson what should we do about this? |
I don't care much what it's based on at the moment, I just think whatever we need to do to get it to fulfill its implicit contract (re: work) is just fine by me! 😊 |
So @RyanZim how much are you progressed on rewriting or refactoring or whatever you wanna call it 😄 of I know you and @jprichardson are busy but I'd like to know your thoughts on that see if that is in the right direction. Should I create a branch here or in my forked repo?! 😃 |
@manidlou I don't care if the branch is here or in a fork; please do open a WIP PR, so we can see what you're up to. 😄 I haven't gotten far with my implementation. |
Although it may be a rare case to happen but I believe we should prepare for this. In general, how should For example, What I think is copying should occur without a problem (or at least after some sanity checks). However, with the current algorithm, since So, @jprichardson @RyanZim what is the decision on this? |
@manidlou We don't actually remove the dest folder before copying, we just remove files in dest that have the same name as files in src. |
ohh! that makes sense! right action 👌! So, I assume it should be the same for symlinks as well, right? like when for example src is a symlink and dest is a directory that src resolved path is a subdirectory of dest. Oh man! what a weird cases! 😲! |
Also is this why we do this https://github.com/jprichardson/node-fs-extra/blob/master/lib/copy/ncp.js#L79 (replacing |
👍
I think so, if I'm following you.
|
@jprichardson I found some old comments that you brought the idea of rewriting |
@manidlou Sorry for being so long in getting back here, and sorry for being unresponsive in general. I want to try and do better on responding quickly so you can move forward. Overall, I like your changes in #374. You did a great job adding a ton of tests. The reason it hasn't been merged yet is twofold:
I talked with @jprichardson about
It'd be best if you could return Promises to I'm not asking you to implement these changes, I'm willing to do that myself. But I'd like you to change your PR to remove the After that, I'll merge your PR and get the async filter implemented, then it's ! Let me know if you feel strongly otherwise. |
@RyanZim no need to be sorry! I know you are very busy and I totally understand and appreciate how hard you try to keep everything here live and up to date.
Agreed on the performance drawback of changes on
Sure thing. |
Fixed in 5.0.0 🎉 |
This needs rewritten. It has several bugs and is overly complex. It was written for use with
fs
instead ofgraceful-fs
, and contains a lot of concurrency-limiting code that is now unnecessary.Once rewritten, it may be small enough to inline in lib/copy/copy.js; talk about that later.
I'll try to do this myself, but help welcome. Adding this to the v1.0.0 milestone, but may have to be pushed back to v2.0.0.
X-Refs: #233.
The text was updated successfully, but these errors were encountered: