Closed Bug 1098363 Opened 11 years ago Closed 10 years ago

Grunt build generates different output on windows, causing cache-busting hashes/filenames to change

Categories

(Tree Management :: Treeherder, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: emorley, Unassigned)

Details

User Story

Thank you for helping out with Treeherder!

You can find us on IRC at irc://irc.mozilla.org/treeherder

Here's some links to help get you started.

Project page:
https://wiki.mozilla.org/Auto-tools/Projects/Treeherder

Interacting with us, repo locations and links to set up a development version of the software:
https://wiki.mozilla.org/Auto-tools/Projects/Treeherder#Contributing
https://wiki.mozilla.org/Auto-tools/Projects/Treeherder#Source_and_Docs

A-Team general reference, coding style guides:
http://ateam-bootcamp.readthedocs.org
I just ran grunt build on ui 45083916e7525e72a8e83cac6f8c98f94126f5ca It had been run the commit before that, so the only change should be to index.*.js However grunt build also regenerated jogviewer.*.js, with a new hash, and as such means an unnecessary file rename, plus modification to the script tag in logviewer.html
Component: Treeherder → Treeherder: Docs & Development
Priority: -- → P3
Priority: P3 → P4
Not sure if this is suitable for a good first bug, but putting it up for consideration. Feel free to remove it if not :)
Mentor: emorley
User Story: (updated)
Whiteboard: [good first bug]
Whiteboard: [good first bug] → [good first bug][lang=js]
User Story: (updated)
So I noticed this again today. Turns out that the grunt-angular-templates plugin in particular, outputs CRLF on Windows (unlike all of the other grunt plugins we use). This is what is causing the hashes to change. It turns out DiffMerge's slightly weird settings were making it seem that the files were identical, when they weren't - even though I'd turned off the "hide unimportant differences" setting, sigh. Anyway, I've filed an issue against grunt-angular-templates: https://github.com/ericclemmons/grunt-angular-templates/issues/125 If there's no response there I'll see about opening a PR.
Assignee: nobody → emorley
Mentor: emorley
Status: NEW → ASSIGNED
Summary: Running grunt build renames minified files even if they didn't change → Grunt build generates different output on windows, causing cache-busting hashes/filenames to change
Whiteboard: [good first bug][lang=js]
(In reply to Ed Morley [:emorley] from comment #2) > If there's no response there I'll see about opening a PR. Created a PR: https://github.com/ericclemmons/grunt-angular-templates/pull/126 If there's no response to that, I'll just fork it.
Priority: P4 → P3
(In reply to Ed Morley [:emorley] from comment #3) > Created a PR: > https://github.com/ericclemmons/grunt-angular-templates/pull/126 I've pinged the PR, since no reply for a bit.
Assignee: emorley → nobody
Status: ASSIGNED → NEW
Wontfix since we don't commit the output of grunt build any more, so the file churn doesn't occur.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Component: Treeherder: Docs & Development → TreeHerder
You need to log in before you can comment on or make changes to this bug.