{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/prepack/issues/2289","repository_url":"https://api.github.com/repos/facebook/prepack","labels_url":"https://api.github.com/repos/facebook/prepack/issues/2289/labels{/name}","comments_url":"https://api.github.com/repos/facebook/prepack/issues/2289/comments","events_url":"https://api.github.com/repos/facebook/prepack/issues/2289/events","html_url":"https://github.com/facebook/prepack/pull/2289","id":342460055,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyMzU1MjI5","number":2289,"title":"Repro option creates package with sourcefiles, debugger startup script","user":{"login":"caiismyname","id":15720289,"node_id":"MDQ6VXNlcjE1NzIwMjg5","avatar_url":"https://avatars3.githubusercontent.com/u/15720289?v=4","gravatar_id":"","url":"https://api.github.com/users/caiismyname","html_url":"https://github.com/caiismyname","followers_url":"https://api.github.com/users/caiismyname/followers","following_url":"https://api.github.com/users/caiismyname/following{/other_user}","gists_url":"https://api.github.com/users/caiismyname/gists{/gist_id}","starred_url":"https://api.github.com/users/caiismyname/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caiismyname/subscriptions","organizations_url":"https://api.github.com/users/caiismyname/orgs","repos_url":"https://api.github.com/users/caiismyname/repos","events_url":"https://api.github.com/users/caiismyname/events{/privacy}","received_events_url":"https://api.github.com/users/caiismyname/received_events","type":"User","site_admin":false},"labels":[{"id":279345275,"node_id":"MDU6TGFiZWwyNzkzNDUyNzU=","url":"https://api.github.com/repos/facebook/prepack/labels/CLA%20Signed","name":"CLA Signed","color":"009900","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-18T19:26:09Z","updated_at":"2018-07-25T21:35:00Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/facebook/prepack/pulls/2289","html_url":"https://github.com/facebook/prepack/pull/2289","diff_url":"https://github.com/facebook/prepack/pull/2289.diff","patch_url":"https://github.com/facebook/prepack/pull/2289.patch"},"body":"Release Notes: \r\n\r\n- Created DebugReproManager to capture all sourcefiles touched by Prepack (to include minimal subset of useful sourcefiles in the debug package)\r\n- `--repro` splits into two: `--reproUnconditionally` which will create a debug package _regardless_ of Prepack's success/failure, and `--reproOnFatal`, which will _only_ create a debug package if Prepack outputs a `FatalError`.\r\n- The debug package now includes all relevant sourcefiles (except for node modules), a copy of the version of Prepack (lib) that was used when the package was created, and a script to `yarn install` the relevant modules for the included version of Prepack, then start the Nuclide Prepack debugger with the proper parameters for files in the debug package (including original prepack arguments). This is in addition to the original input files.\r\n- The impact of having the `DebugReproManager` on in `--reproOnFatal` mode all the time is negligible, as show in the table below. This flag will be always be enabled on Sandcastle builds so that failures are more easily debugged. \r\n    - The time difference between no repro flag and `--reproOnFatal` seems like it can be written off as simple variance between runs. The larger increase when actually creating the zip comes from reading and zipping the files, which takes time proportional how many files are touched.\r\n- SourceMapManager was refactored to not use `Invariant` or `SourceFile`s. This is so that `DebugReproManager` import it without increasing the flow cycle, and allows the `DebugReproManager` to be passed from Prepack to the CLI to create the repro package.\r\n- The repro option introduces a potential for a subtle race condition that is addressed as follows:\r\n    - The last `if (!success && reproMode === \"none\") process.exit(1);` must check reproMode because `generateDebugRepro` involves an async process (directory zipping). If there is an ongoing repro and the process exits, the repro may terminate prematurely, causing no repro to be generated. Instead, this only triggers if there is no repro -- if there is, the `generateDebugRepro` function will handle process exiting if it needs to. \r\n\r\n\r\nUsage: \r\n```node [prepack] [files to prepack] --reproOnFatal /Absolute/path/to/repro/bundle.zip --debugBuckRoot /buck/root```\r\nor \r\n```node [prepack] [files to prepack] --reproUnconditionally /Absolute/path/to/repro/bundle.zip --debugBuckRoot /buck/root```\r\n\r\n\r\nDemo: https://www.dropbox.com/s/p62ves2p55fyyl7/--repro%20annotated%20demo.mp4?dl=0"},"comment":{"url":"https://api.github.com/repos/facebook/prepack/issues/comments/407903546","html_url":"https://github.com/facebook/prepack/pull/2289#issuecomment-407903546","issue_url":"https://api.github.com/repos/facebook/prepack/issues/2289","id":407903546,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzkwMzU0Ng==","user":{"login":"facebook-github-bot","id":6422482,"node_id":"MDQ6VXNlcjY0MjI0ODI=","avatar_url":"https://avatars3.githubusercontent.com/u/6422482?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook-github-bot","html_url":"https://github.com/facebook-github-bot","followers_url":"https://api.github.com/users/facebook-github-bot/followers","following_url":"https://api.github.com/users/facebook-github-bot/following{/other_user}","gists_url":"https://api.github.com/users/facebook-github-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook-github-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook-github-bot/subscriptions","organizations_url":"https://api.github.com/users/facebook-github-bot/orgs","repos_url":"https://api.github.com/users/facebook-github-bot/repos","events_url":"https://api.github.com/users/facebook-github-bot/events{/privacy}","received_events_url":"https://api.github.com/users/facebook-github-bot/received_events","type":"User","site_admin":false},"created_at":"2018-07-25T21:35:00Z","updated_at":"2018-07-25T21:35:00Z","author_association":"NONE","body":"Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours has expired.\n\nBefore we can review or merge your code, **we need you to email [cla@fb.com](mailto:cla@fb.com?subject=CLA%20for%20facebook%2Fprepack%20%232289)** with your details so we can update your status."}}
{"actor":{"display_login":"facebook-github-bot"}}