Closed
Bug 1063464
Opened 10 years ago
Closed 10 years ago
grunt build should warn/abort if specified files are not found
Categories
(Tree Management :: Treeherder, defect, P3)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: emorley)
References
Details
Attachments
(1 file)
3.11 KB,
patch
|
camd
:
review+
|
Details | Diff | Splinter Review |
The missing file in bug 1063451 would have been noticed sooner, if |grunt build| gave some indication that it was missing - preferably an abort, but even some log output at all would be better than the current situation.
Looking at the grunt docs, there doesn't seem to be a global way to set this, which is pretty crappy.
Instead we have to specify |nonull: true| on each file/resource - which will then cause the job to fail:
https://github.com/gruntjs/grunt-contrib-concat#invalid-or-missing-files-warning
http://gruntjs.com/configuring-tasks#files
https://github.com/gruntjs/grunt-contrib-concat/issues/17
https://github.com/gruntjs/grunt-contrib-concat/issues/15
https://github.com/gruntjs/grunt-contrib-uglify/issues/3
Now there is a workaround for making this global, discussed here:
http://stackoverflow.com/questions/21142515/grunt-files-set-nonull-to-true-by-default
However:
a) It seems a bit hacky, given our Gruntfile.js doesn't specify that many files, so doing per file/resource isn't too excessive.
b) The comments there imply it only works on files-array format whereas we use a mixture, so we'll have to convert them all & are at risk of this breaking in the future if people don't realise.
So I think it's best to just set per-file/resource for now.
Side note: WTF upstream?! Even if you're worried about annoying people by making this abort, they could have at least made it warn in the output by default... *facepalm*
Assignee | ||
Comment 1•10 years ago
|
||
There currently is no reliable way to set this globally & by default
missing files are ignored :-(
See comment 0 for more info.
Attachment #8484906 -
Flags: review?(cdawson)
Updated•10 years ago
|
Attachment #8484906 -
Flags: review?(cdawson) → review+
Assignee | ||
Comment 2•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 3•10 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/ba12c3f9ff1658c9ae55b567ac5d07990acb2a8a
Bug 1063464 - Abort grunt build if files/directories are missing
There currently is no reliable way to set this globally & by default
missing files are ignored :-(
You need to log in
before you can comment on or make changes to this bug.
Description
•