{"action":"created","issue":{"url":"https://api.github.com/repos/systemjs/builder/issues/284","labels_url":"https://api.github.com/repos/systemjs/builder/issues/284/labels{/name}","comments_url":"https://api.github.com/repos/systemjs/builder/issues/284/comments","events_url":"https://api.github.com/repos/systemjs/builder/issues/284/events","html_url":"https://github.com/systemjs/builder/issues/284","id":102309746,"number":284,"title":"Deterministic build order","user":{"login":"Mosho1","id":5153007,"avatar_url":"https://avatars.githubusercontent.com/u/5153007?v=3","gravatar_id":"","url":"https://api.github.com/users/Mosho1","html_url":"https://github.com/Mosho1","followers_url":"https://api.github.com/users/Mosho1/followers","following_url":"https://api.github.com/users/Mosho1/following{/other_user}","gists_url":"https://api.github.com/users/Mosho1/gists{/gist_id}","starred_url":"https://api.github.com/users/Mosho1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mosho1/subscriptions","organizations_url":"https://api.github.com/users/Mosho1/orgs","repos_url":"https://api.github.com/users/Mosho1/repos","events_url":"https://api.github.com/users/Mosho1/events{/privacy}","received_events_url":"https://api.github.com/users/Mosho1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-21T06:32:25Z","updated_at":"2015-10-07T17:41:23Z","closed_at":"2015-09-18T15:20:39Z","body":"The bundled output's internal package order seems to be random. I'm using a hash for versioning that means it changes every time, so I always cache-bust when I upload, regardless of actual changes."},"comment":{"url":"https://api.github.com/repos/systemjs/builder/issues/comments/146273361","html_url":"https://github.com/systemjs/builder/issues/284#issuecomment-146273361","issue_url":"https://api.github.com/repos/systemjs/builder/issues/284","id":146273361,"user":{"login":"carlosagsmendes","id":1224078,"avatar_url":"https://avatars.githubusercontent.com/u/1224078?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosagsmendes","html_url":"https://github.com/carlosagsmendes","followers_url":"https://api.github.com/users/carlosagsmendes/followers","following_url":"https://api.github.com/users/carlosagsmendes/following{/other_user}","gists_url":"https://api.github.com/users/carlosagsmendes/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosagsmendes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosagsmendes/subscriptions","organizations_url":"https://api.github.com/users/carlosagsmendes/orgs","repos_url":"https://api.github.com/users/carlosagsmendes/repos","events_url":"https://api.github.com/users/carlosagsmendes/events{/privacy}","received_events_url":"https://api.github.com/users/carlosagsmendes/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T17:41:23Z","updated_at":"2015-10-07T17:41:23Z","body":"@Munter and @guybedford I'm facing some issues when hashing due to inconsistencies in the  modules order.\r\n\r\nIn the [Trace.getTreeModulesPostOrder](https://github.com/systemjs/builder/blob/4953ad9b2acc30c91f0fc24191669d8ea96dadea/lib/trace.js#L642) I get the following order:\r\n\r\n![Order in getTreeModulesPostOrder](http://content.screencast.com/users/carlos.mendes/folders/Jing/media/dbe7e62f-9d07-4909-bb38-1c062f316913/2015-10-07_1834.png)\r\n\r\nIn the `builder.bundle` I get the following order in the `output.modules`:\r\n\r\n ![Order in builderBundle](http://content.screencast.com/users/carlos.mendes/folders/Jing/media/4b404b2e-0394-4c91-90d7-c50b15b5c098/2015-10-07_1837.png)\r\n\r\nI'm using the in-memory process:\r\n```\r\nbuilder.bundle('myModule.js', { minify: true }).then(function(output) {\r\n  output.source;    // generated bundle source\r\n  output.sourceMap; // generated bundle source map\r\n  output.modules;   // array of module names defined in the bundle\r\n});\r\n```\r\n\r\nAnd in the `builder.bundle` I get the following order in the `output.source`:\r\n\r\n```\r\neditors/single-file-upload/single-file-upload-template.html!github:systemjs/plugin-text@0.0.2\r\ngithub:blueimp/jQuery-File-Upload@9.11.2/jquery.fileupload\r\ngithub:blueimp/jQuery-File-Upload@9.11.2\r\ngithub:blueimp/jQuery-File-Upload@9.11.2/jquery.fileupload-process\r\ngithub:blueimp/jQuery-File-Upload@9.11.2/jquery.fileupload-validate\r\ngithub:blueimp/jQuery-File-Upload@9.11.2/jquery.iframe-transport\r\neditors/single-file-upload/single-file-upload-bootstrapper\r\neditors/single-file-upload/single-file-upload-viewmodel\r\ninfrastructure/jquery-file-upload-custom\r\n```\r\n\r\nThe order is always different.\r\n\r\nShouldn't it always be the same?\r\n\r\nThanks\r\n\r\n\r\n\r\n"}}