{"action":"created","issue":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/6527","repository_url":"https://api.github.com/repos/ember-cli/ember-cli","labels_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/6527/labels{/name}","comments_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/6527/comments","events_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/6527/events","html_url":"https://github.com/ember-cli/ember-cli/issues/6527","id":193360907,"number":6527,"title":"`(setq create-lockfiles nil)` shouldn't be necessary for Emacs usage","user":{"login":"jacksonrayhamilton","id":5356588,"avatar_url":"https://avatars.githubusercontent.com/u/5356588?v=3","gravatar_id":"","url":"https://api.github.com/users/jacksonrayhamilton","html_url":"https://github.com/jacksonrayhamilton","followers_url":"https://api.github.com/users/jacksonrayhamilton/followers","following_url":"https://api.github.com/users/jacksonrayhamilton/following{/other_user}","gists_url":"https://api.github.com/users/jacksonrayhamilton/gists{/gist_id}","starred_url":"https://api.github.com/users/jacksonrayhamilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacksonrayhamilton/subscriptions","organizations_url":"https://api.github.com/users/jacksonrayhamilton/orgs","repos_url":"https://api.github.com/users/jacksonrayhamilton/repos","events_url":"https://api.github.com/users/jacksonrayhamilton/events{/privacy}","received_events_url":"https://api.github.com/users/jacksonrayhamilton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-12-04T16:48:02Z","updated_at":"2016-12-04T22:46:26Z","closed_at":null,"body":"From [this issue](https://github.com/ember-cli/ember-cli/issues/5857), it was noticed that an ENOENT error would occur when files would change. Apparently, this error still occurs when Ember picks up Emacs lock files.\r\n\r\nI got the following error when editing and saving a file in my project with Emacs:\r\n\r\n```\r\nfile changed router.js\r\nENOENT: no such file or directory, stat '/path/to/project/app/.#app.js'\r\nError: ENOENT: no such file or directory, stat '/path/to/project/app/.#app.js'\r\n    at Error (native)\r\n    at Object.fs.statSync (fs.js:987:18)\r\n    at Object.realpathSync (fs.js:1679:12)\r\n    at symlink (/path/to/project/node_modules/symlink-or-copy/index.js:68:26)\r\n    at Function.symlinkOrCopySync [as sync] (/path/to/project/node_modules/symlink-or-copy/index.js:55:5)\r\n    at Funnel._copy (/path/to/project/node_modules/broccoli-funnel/index.js:433:19)\r\n    at Funnel.processFile (/path/to/project/node_modules/broccoli-funnel/index.js:416:8)\r\n    at Funnel.applyPatch [as _applyPatch] (/path/to/project/node_modules/broccoli-funnel/index.js:333:12)\r\n    at Funnel.<anonymous> (/path/to/project/node_modules/broccoli-funnel/index.js:287:10)\r\n    at Array.forEach (native)\r\nfile changed app.js\r\nENOENT: no such file or directory, unlink '/path/to/project/tmp/funnel-output_path-BOpd48hh.tmp/.#app.js'\r\nError: ENOENT: no such file or directory, unlink '/path/to/project/tmp/funnel-output_path-BOpd48hh.tmp/.#app.js'\r\n    at Error (native)\r\n    at Object.fs.unlinkSync (fs.js:1089:18)\r\n    at Funnel.applyPatch [as _applyPatch] (/path/to/project/node_modules/broccoli-funnel/index.js:311:10)\r\n    at Funnel.<anonymous> (/path/to/project/node_modules/broccoli-funnel/index.js:287:10)\r\n    at Array.forEach (native)\r\n    at Funnel.processFilters (/path/to/project/node_modules/broccoli-funnel/index.js:286:11)\r\n    at Funnel.build (/path/to/project/node_modules/broccoli-funnel/index.js:202:10)\r\n    at /path/to/project/node_modules/broccoli-plugin/read_compat.js:61:34\r\n    at tryCatch (/path/to/project/node_modules/rsvp/dist/rsvp.js:538:12)\r\n    at invokeCallback (/path/to/project/node_modules/rsvp/dist/rsvp.js:553:13)\r\n```\r\n\r\nTo reproduce, open one watched file in Emacs, and make an edit to the file, but do not save it. This will cause a lock file to be created. Then, edit another watched file in a project, and the error should occur.\r\n\r\nThe documentation recommends disabling lock files: https://ember-cli.com/user-guide/#emacs\r\n\r\nI think this is the wrong recommendation. [The Emacs manual](https://www.gnu.org/software/emacs/manual/html_node/emacs/Interlocking.html) mentions this property, but also warns that file locking is actually useful:\r\n\r\n> You can prevent the creation of lock files by setting the variable `create-lockfiles` to `nil`. **Caution:** by doing so you will lose the benefits that this feature provides.\r\n\r\nI think that Ember CLI should instead endeavor to avoid this error when `create-lockfiles` is `t` (\"true\" in Emacs Lisp).\r\n\r\nA similar issue popped up in `grunt-contrib-watch`: https://github.com/gruntjs/grunt-contrib-watch/issues/239 The solution there may also be applicable here.\r\n\r\nOutput from `ember version --verbose && npm --version`:\r\n```\r\nember version --verbose && npm --version\r\nWARNING: Node v6.9.1 has currently not been tested against Ember CLI and may result in unexpected behaviour.\r\nversion: 1.13.13\r\nhttp_parser: 2.7.0\r\nnode: 6.9.1\r\nv8: 5.1.281.84\r\nuv: 1.9.1\r\nzlib: 1.2.8\r\nares: 1.10.1-DEV\r\nicu: 57.1\r\nmodules: 48\r\nopenssl: 1.0.2j\r\nnpm: 2.14.10\r\nos: linux x64\r\n3.10.8\r\n```\r\n\r\nOutput from `emacs --version`\r\n```\r\nemacs --version\r\nGNU Emacs 25.1.1\r\n```"},"comment":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/comments/264737894","html_url":"https://github.com/ember-cli/ember-cli/issues/6527#issuecomment-264737894","issue_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/6527","id":264737894,"user":{"login":"jacksonrayhamilton","id":5356588,"avatar_url":"https://avatars.githubusercontent.com/u/5356588?v=3","gravatar_id":"","url":"https://api.github.com/users/jacksonrayhamilton","html_url":"https://github.com/jacksonrayhamilton","followers_url":"https://api.github.com/users/jacksonrayhamilton/followers","following_url":"https://api.github.com/users/jacksonrayhamilton/following{/other_user}","gists_url":"https://api.github.com/users/jacksonrayhamilton/gists{/gist_id}","starred_url":"https://api.github.com/users/jacksonrayhamilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacksonrayhamilton/subscriptions","organizations_url":"https://api.github.com/users/jacksonrayhamilton/orgs","repos_url":"https://api.github.com/users/jacksonrayhamilton/repos","events_url":"https://api.github.com/users/jacksonrayhamilton/events{/privacy}","received_events_url":"https://api.github.com/users/jacksonrayhamilton/received_events","type":"User","site_admin":false},"created_at":"2016-12-04T22:46:26Z","updated_at":"2016-12-04T22:46:26Z","body":"Whether some of us do or don't find lock files useful, Emacs does still create them by default, which means plenty of Emacs users who didn't read that part of the docs (like I didn't) will continue to trip over this and have a poor experience with the CLI. That alone might be a good enough reason to handle these things more gracefully."}}
{"actor":{"display_login":"jacksonrayhamilton"}}