You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.
It appears that the dependency graph doesn't change to respect added/removed/changed import statements after the file has been read the first time. Given:
parent.test:
(That is, an empty file.)
child.test:
import parent.test
gulpfile.js:
var gulp = require('gulp');
var progeny = require('gulp-progeny');
var cache = require('gulp-cached');
var debug = require('gulp-debug');
gulp.task('test', function() {
return gulp.src('*.test')
.pipe(cache('test'))
.pipe(progeny({
regexp: new RegExp('import (.*)'),
debug: true
}))
.pipe(debug());
});
gulp.task('watch', [ 'test' ], function() {
return gulp.watch('*', [ 'test' ]);
});
(Caches files and just prints out the names.)
I get the following behavior (annotations with my actions inline):
$ gulp watch
### Run for the first time -- dependency tree looks right.
Using gulpfile ~/Documents/Programming/temp/gulpfile.js
Starting 'test'...
gulp-debug: child.test
DEP child.test
|--parent.test
gulp-debug: parent.test
DEP parent.test
| NO-DEP
gulp-debug: 2 items
Finished 'test' after 37 ms
Starting 'watch'...
Finished 'watch' after 13 ms
### Trivially modify child.test (e.g. add a newline). Behaves as expected.
Starting 'test'...
gulp-debug: child.test
DEP child.test
|--parent.test
gulp-debug: 1 items
Finished 'test' after 100 ms
### Trivially modify parent.test. Behaves as expected.
Starting 'test'...
gulp-debug: parent.test
DEP parent.test
| NO-DEP
gulp-debug: child.test
gulp-debug: 2 items
Finished 'test' after 5.88 ms
### Remove dependency that child.test has on parent.test. Appears to behave as expected, including updated dependency.
Starting 'test'...
gulp-debug: child.test
DEP child.test
| NO-DEP
gulp-debug: 1 items
Finished 'test' after 4.87 ms
### Trivially modify parent.test again. This should not pick up child.test, but it does.
Starting 'test'...
gulp-debug: parent.test
DEP parent.test
| NO-DEP
gulp-debug: child.test
gulp-debug: 2 items
Finished 'test' after 8.32 ms
The text was updated successfully, but these errors were encountered:
However I don't think this is necessary, and probably it will incurs performance problem in large projects.
Compiling more files than needed is acceptable.
Thanks for fixing it so quickly! I would be surprised if this caused performance issues; certainly that would be trumped by the cost of compiling the extra files. I discovered this bug while cleaning some needlessly broad blocks of import statements which was kind of a bummer since it wrecked watch performance.
It appears that the dependency graph doesn't change to respect added/removed/changed import statements after the file has been read the first time. Given:
parent.test
:(That is, an empty file.)
child.test
:gulpfile.js
:(Caches files and just prints out the names.)
I get the following behavior (annotations with my actions inline):
The text was updated successfully, but these errors were encountered: