-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Getters/Setters should update atime & mtime on file.stat #72
Comments
Ref gulpjs/gulp#1461 |
Closed by #75 |
@phated The more I think about this, the more it seems to me this may have been merged prematurely. Well, submitted prematurely, to be completely honest. That is, the patch more or less does what this issue asked for, but:
To illustrate the last point: gulp.task('test', function() {
return gulp.src('in.js')
.pipe(gulp-header('/* head */\n'))
.pipe(gulp-changed('out.js'))
.pipe(gulp.dest('out.js'));
}); The old behaviour would be for this to only (over)write So I guess I am saying that the new behaviour is conceptually correct, but we must now switch around |
Changes have been rebased out of master to discuss edge case problems. |
@phated Thanks, yes I think this should probably be debated a bit more. My feeling is your suggestion that started this issue is sound, but needs a slightly more delicate implementation to avoid some weird side-effects (as mentioned on the PR). And even then it will change the results of some fairly basic scenarios, as in the above. But on the other hand perhaps that's ok, as long as it's documented clearly. I'm not in a position to judge, really. Disregarding practical inconveniences, conceptually I might even argue to go all the way and just say that vinyl objects deal with stat changes in much the same way as an actual file would. So Or is that really too far out? I've been thinking about how to detect reads and writes on |
It seems to me there are two unique pieces of information that need to be tracked.
The legacy behavior is such that the ecosystem depends on Tracking the new information If there was no legacy API, I would make Since a lot of tools use |
Closing in favor of #105 |
Currently the
file.stat.atime
andfile.stat.mtime
aren't handled like they would be on a file system. I think the getters and setters should update them accordingly.The text was updated successfully, but these errors were encountered: