{"action":"created","issue":{"url":"https://api.github.com/repos/prominic/Moonshine-IDE/issues/315","repository_url":"https://api.github.com/repos/prominic/Moonshine-IDE","labels_url":"https://api.github.com/repos/prominic/Moonshine-IDE/issues/315/labels{/name}","comments_url":"https://api.github.com/repos/prominic/Moonshine-IDE/issues/315/comments","events_url":"https://api.github.com/repos/prominic/Moonshine-IDE/issues/315/events","html_url":"https://github.com/prominic/Moonshine-IDE/issues/315","id":335504944,"node_id":"MDU6SXNzdWUzMzU1MDQ5NDQ=","number":315,"title":"\"Permission Denied\" Errors on Filesystem After Git Checkout","user":{"login":"JoelProminic","id":24532731,"node_id":"MDQ6VXNlcjI0NTMyNzMx","avatar_url":"https://avatars1.githubusercontent.com/u/24532731?v=4","gravatar_id":"","url":"https://api.github.com/users/JoelProminic","html_url":"https://github.com/JoelProminic","followers_url":"https://api.github.com/users/JoelProminic/followers","following_url":"https://api.github.com/users/JoelProminic/following{/other_user}","gists_url":"https://api.github.com/users/JoelProminic/gists{/gist_id}","starred_url":"https://api.github.com/users/JoelProminic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoelProminic/subscriptions","organizations_url":"https://api.github.com/users/JoelProminic/orgs","repos_url":"https://api.github.com/users/JoelProminic/repos","events_url":"https://api.github.com/users/JoelProminic/events{/privacy}","received_events_url":"https://api.github.com/users/JoelProminic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-06-25T17:47:34Z","updated_at":"2018-06-29T06:32:16Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"While testing the GitHub integration (#295), I got some file permission errors when checking out a branch.  After some investigation, it seems that this is caused because Windows considered the files to be currently open by a different application:  https://community.atlassian.com/t5/Git-questions/Windows-permission-denied-on-switching-branches/qaq-p/407440\r\n\r\nI ran a test, and I was able to trace the problem to the language server.  Here is my test procedure.  My test environment is Windows 10, version 1703, Java 1.8.0_161.\r\n\r\n1. Open a project in Moonshine\r\n2. Manually kill the language server\r\n3. Checkout a different branch from the command line\r\n4. Run \"git status\" - The output does not show any errors\r\n5. Reopen the project in Moonshine - the language server starts again\r\n6. Checkout a different branch from the command line\r\n7. The language server reports errors\r\n8. Run \"git status\".  The output shows file permission errors \r\n9. Close Moonshine\r\n10. Run \"git status\" - The errors are cleared\r\n\r\nHere is the output from the language server.  On futher review, it looks like just indicates that the language server is recompiling multiple times:\r\n\r\n    : Failed to get compile settings for +configname=flex.\r\n    : \r\n    : Failed to get compile settings for +configname=flex.\r\n    : \r\n    : Failed to get compile settings for +configname=flex.\r\n    : \r\n    : Failed to get compile settings for +configname=flex.\r\n    : \r\n    : Failed to get compile settings for +configname=flex.\r\n    : \r\n    : Failed to get compile settings for +configname=flex.\r\n\r\nHere is an example of the file errors that I am seeing with \"git status\":\r\n\r\n    C:\\Flex\\workspace\\Moonshine-IDE>git status\r\n    warning: could not open directory 'ide/MoonshineSharedCore/src/elements/templates/projects/Flex Browser Project (FlexJS, Royale)/bin-debug/history/': Permission denied\r\n    warning: could not open directory 'ide/MoonshineSharedCore/src/elements/templates/projects/Flex Browser Project (FlexJS, Royale)/build/': Permission denied\r\n    warning: could not open directory 'ide/MoonshineSharedCore/src/elements/templates/projects/Flex Browser Project (FlexJS, Royale)/html-template/history/': Permission denied\r\n    warning: could not open directory 'ide/MoonshineSharedCore/src/elements/templates/projects/Flex Browser Project (FlexJS, Royale)/src/': Permission denied\r\n    warning: could not open directory 'ide/MoonshineSharedCore/src/elements/templates/projects/Visual Editor Project (Flex)/src/': Permission denied\r\n    warning: could not open directory 'ide/MoonshineSharedCore/src/elements/templates/projects/Visual Editor Project (Flex)/visualeditor-src/': Permission denied\r\n    On branch master\r\n    Your branch is up to date with 'origin/master'.\r\n\r\n    nothing to commit, working tree clean\r\n\r\nExpected output (this is displayed after Moonshine is closed):\r\n\r\n    C:\\Flex\\workspace\\Moonshine-IDE>git status\r\n    On branch master\r\n    Your branch is up to date with 'origin/master'.\r\n\r\n    nothing to commit, working tree clean\r\n\r\n\r\nThese errors prevent me from checking out another branch with Git.\r\n\r\n@joshtynjala, have you seen a problem like this before?  In theory this could affect the language server with VSCode as well.\r\n\r\n@rat-moonshine, my proposed solution is:\r\n1. User tries to checkout a branch (or a similar operation)\r\n2. Moonshine stops the language server(s) associated with that project\r\n3. Moonshine executes the checkout\r\n4. Moonshine restarts the language server \r\n"},"comment":{"url":"https://api.github.com/repos/prominic/Moonshine-IDE/issues/comments/401261323","html_url":"https://github.com/prominic/Moonshine-IDE/issues/315#issuecomment-401261323","issue_url":"https://api.github.com/repos/prominic/Moonshine-IDE/issues/315","id":401261323,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTI2MTMyMw==","user":{"login":"rat-moonshine","id":24370870,"node_id":"MDQ6VXNlcjI0MzcwODcw","avatar_url":"https://avatars0.githubusercontent.com/u/24370870?v=4","gravatar_id":"","url":"https://api.github.com/users/rat-moonshine","html_url":"https://github.com/rat-moonshine","followers_url":"https://api.github.com/users/rat-moonshine/followers","following_url":"https://api.github.com/users/rat-moonshine/following{/other_user}","gists_url":"https://api.github.com/users/rat-moonshine/gists{/gist_id}","starred_url":"https://api.github.com/users/rat-moonshine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rat-moonshine/subscriptions","organizations_url":"https://api.github.com/users/rat-moonshine/orgs","repos_url":"https://api.github.com/users/rat-moonshine/repos","events_url":"https://api.github.com/users/rat-moonshine/events{/privacy}","received_events_url":"https://api.github.com/users/rat-moonshine/received_events","type":"User","site_admin":false},"created_at":"2018-06-29T06:32:16Z","updated_at":"2018-06-29T06:32:16Z","author_association":"COLLABORATOR","body":"With my initial tests on Windows, I see following things:\r\n\r\n- Opening MDE project didn't thrown the {locale} error anymore\r\n- Except once, I couldn't able to reproduce the problems described [here](https://github.com/prominic/Moonshine-IDE/issues/315#issuecomment-400190959) and [here](https://github.com/prominic/Moonshine-IDE/issues/315#issuecomment-400226409) - I able to switch between the said two branches effectively without any file-system error, in consecutive tests\r\n\r\nI shall keep an eye while testing on macOS if I can able to reproduce the errors or not. However, I see a new error while deleting a project, but this may not be related to the language-server, and I need to investigate. While deleting a project it throws following IO/Error:\r\n\r\n```\r\nError #2044: Unhandled IOErrorEvent:. text=Error #2038: File I/O Error.\r\n\tat flash.filesystem::File$/getFile()\r\n\tat flash.filesystem::File$/get desktopDirectory()\r\n\tat actionScripts.impls::IFileBridgeImp()[E:\\DevareaLocal\\Prominic\\Prominic_Git\\git\\Moonshine-IDE\\ide\\MoonshineDESKTOPevolved\\src\\actionScripts\\impls\\IFileBridgeImp.as:57]\r\n\tat actionScripts.factory::FileLocation()[E:\\DevareaLocal\\Prominic\\Prominic_Git\\git\\Moonshine-IDE\\ide\\MoonshineSharedCore\\src\\actionScripts\\factory\\FileLocation.as:37]\r\n\tat actionScripts.plugins.as3project.importer::FlashDevelopImporter$/parse()[E:\\DevareaLocal\\Prominic\\Prominic_Git\\git\\Moonshine-IDE\\ide\\MoonshineDESKTOPevolved\\src\\actionScripts\\plugins\\as3project\\importer\\FlashDevelopImporter.as:53]\r\n\tat actionScripts.plugins.as3project::CreateProject/createFileSystemBeforeSave()[E:\\DevareaLocal\\Prominic\\Prominic_Git\\git\\Moonshine-IDE\\ide\\MoonshineDESKTOPevolved\\src\\actionScripts\\plugins\\as3project\\CreateProject.as:822]\r\n\tat actionScripts.plugins.as3project::CreateProject/createSave()[E:\\DevareaLocal\\Prominic\\Prominic_Git\\git\\Moonshine-IDE\\ide\\MoonshineDESKTOPevolved\\src\\actionScripts\\plugins\\as3project\\CreateProject.as:555]\r\n\tat flash.events::EventDispatcher/dispatchEventFunction()\r\n\tat flash.events::EventDispatcher/dispatchEvent()\r\n\tat mx.core::UIComponent/dispatchEvent()[D:\\flex_sdk\\Sources\\flex-sdk\\frameworks\\projects\\framework\\src\\mx\\core\\UIComponent.as:13688]\r\n\tat Function/actionScripts.plugin.settings:SettingsView/actionScripts.ui:IContentWindow:save/actionScripts.plugin.settings:goSave()[E:\\DevareaLocal\\Prominic\\Prominic_Git\\git\\Moonshine-IDE\\ide\\MoonshineSharedCore\\src\\actionScripts\\plugin\\settings\\SettingsView.mxml:173]\r\n\tat actionScripts.plugin.settings::SettingsView/save()[E:\\DevareaLocal\\Prominic\\Prominic_Git\\git\\Moonshine-IDE\\ide\\MoonshineSharedCore\\src\\actionScripts\\plugin\\settings\\SettingsView.mxml:163]\r\n\tat actionScripts.plugin.settings::SettingsView/handleSaveClicked()[E:\\DevareaLocal\\Prominic\\Prominic_Git\\git\\Moonshine-IDE\\ide\\MoonshineSharedCore\\src\\actionScripts\\plugin\\settings\\SettingsView.mxml:463]\r\n```"}}
{"actor":{"display_login":"rat-moonshine"}}