{"action":"created","issue":{"url":"https://api.github.com/repos/supercollider/supercollider/issues/3597","repository_url":"https://api.github.com/repos/supercollider/supercollider","labels_url":"https://api.github.com/repos/supercollider/supercollider/issues/3597/labels{/name}","comments_url":"https://api.github.com/repos/supercollider/supercollider/issues/3597/comments","events_url":"https://api.github.com/repos/supercollider/supercollider/issues/3597/events","html_url":"https://github.com/supercollider/supercollider/issues/3597","id":308257402,"number":3597,"title":"ERROR: Could not iterate on '/path/to/my/classes/.#MyClass.sc': No such file or directory","user":{"login":"aspiers","id":100738,"avatar_url":"https://avatars0.githubusercontent.com/u/100738?v=4","gravatar_id":"","url":"https://api.github.com/users/aspiers","html_url":"https://github.com/aspiers","followers_url":"https://api.github.com/users/aspiers/followers","following_url":"https://api.github.com/users/aspiers/following{/other_user}","gists_url":"https://api.github.com/users/aspiers/gists{/gist_id}","starred_url":"https://api.github.com/users/aspiers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspiers/subscriptions","organizations_url":"https://api.github.com/users/aspiers/orgs","repos_url":"https://api.github.com/users/aspiers/repos","events_url":"https://api.github.com/users/aspiers/events{/privacy}","received_events_url":"https://api.github.com/users/aspiers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-24T12:20:36Z","updated_at":"2018-03-30T10:36:13Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"When editing a file, my editor creates temporary lock files as symlinks which contain metadata about when and how the lock was obtained, i.e. the hostname, pid of the editor process, and epoch time the lock was obtained, e.g.:\r\n\r\n    lrwxrwxrwx 1 adam users   25 Mar 24 12:11 .#MyClass.sc -> '@mydesktop.16849:1521684176\r\n\r\nThis lock is created when the file is edited, and removed when it is saved, so it is only present when there are unsaved changes.\r\n\r\nUnfortunately this causes SuperCollider's interpreter to fail compilation at boot time:\r\n\r\n    ERROR: Could not iterate on '/path/to/my/classes/.#MyClass.sc': No such file or directory\r\n\r\nI think it should handle this more gracefully, simply by skipping that file rather than failing to boot.  It would be reasonable to issue a warning, although I also think it would be safe if it silently ignored files starting with `.#`, since it seems very unlikely that anyone would ever want it to compile real classes stored in files with this prefix.  Having said that, there is a counter-argument to having an exception which silently ignores `.#*`: a warning could be useful for indicating that the developer hasn't saved their latest changes so they won't take effect in the interpreter."},"comment":{"url":"https://api.github.com/repos/supercollider/supercollider/issues/comments/377498753","html_url":"https://github.com/supercollider/supercollider/issues/3597#issuecomment-377498753","issue_url":"https://api.github.com/repos/supercollider/supercollider/issues/3597","id":377498753,"user":{"login":"aspiers","id":100738,"avatar_url":"https://avatars0.githubusercontent.com/u/100738?v=4","gravatar_id":"","url":"https://api.github.com/users/aspiers","html_url":"https://github.com/aspiers","followers_url":"https://api.github.com/users/aspiers/followers","following_url":"https://api.github.com/users/aspiers/following{/other_user}","gists_url":"https://api.github.com/users/aspiers/gists{/gist_id}","starred_url":"https://api.github.com/users/aspiers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspiers/subscriptions","organizations_url":"https://api.github.com/users/aspiers/orgs","repos_url":"https://api.github.com/users/aspiers/repos","events_url":"https://api.github.com/users/aspiers/events{/privacy}","received_events_url":"https://api.github.com/users/aspiers/received_events","type":"User","site_admin":false},"created_at":"2018-03-30T10:36:13Z","updated_at":"2018-03-30T10:36:13Z","author_association":"CONTRIBUTOR","body":"[**@jamshark70**](https://github.com/jamshark70) commented on [24 Mar 2018, 23:36 GMT](https://github.com/supercollider/supercollider/issues/3597#issuecomment-375932875 \"2018-03-24T23:36:15Z - Replied by Github Reply Comments\"):\r\n> The issue I encountered was that SC not only silently skipped the broken symlink, but also silently skipped the entire directory containing the symlink. So if you have unsaved changes in e.g. SCClassLibrary/Common/Core, then magically there's no Object, and nothing works.\r\n> \r\n> It may or may not fail compilation altogether. But things don't work that are unrelated to the specific file being locked.\r\n\r\nYeah, that's the same kind of problems I saw with my (non-core) classes.\r\n\r\n> > Having said that, there is a counter-argument to having an exception which silently ignores .#*: a warning could be useful for indicating that the developer hasn't saved their latest changes so they won't take effect in the interpreter.\r\n> \r\n> Another is that, if it's a broken symlink, there's no way to know if it was supposed to link to a file or directory. If you expected a directory to be brought into the class library by symlinking and it wasn't, sclang shouldn't roll that up into the same category as an Emacs lock file.\r\n\r\nRight - so these cases easily justify a *warning*, but it still shouldn't give up so easily on the other files which *are* readable.\r\n\r\n> You could put in a special case for emacs... are we sure, then, that there aren't othe apps that do a similar thing, but with a different filename pattern?\r\n\r\nIt doesn't matter if there are or aren't; no need to boil the ocean :-)  Let's just fix emacs, and if people report problems with other editors later then we can easily fix those too.  It doesn't have to be perfect first time round; the important thing is that each change makes it at least a little bit better :-)"}}
{"actor":{"display_login":"aspiers"}}