{"action":"closed","issue":{"url":"https://api.github.com/repos/spark/spark-dev/issues/31","repository_url":"https://api.github.com/repos/spark/spark-dev","labels_url":"https://api.github.com/repos/spark/spark-dev/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/spark/spark-dev/issues/31/comments","events_url":"https://api.github.com/repos/spark/spark-dev/issues/31/events","html_url":"https://github.com/spark/spark-dev/issues/31","id":49109837,"number":31,"title":"Unsaved files in project should ask to be saved when compiling?","user":{"login":"technobly","id":2249224,"avatar_url":"https://avatars.githubusercontent.com/u/2249224?v=3","gravatar_id":"","url":"https://api.github.com/users/technobly","html_url":"https://github.com/technobly","followers_url":"https://api.github.com/users/technobly/followers","following_url":"https://api.github.com/users/technobly/following{/other_user}","gists_url":"https://api.github.com/users/technobly/gists{/gist_id}","starred_url":"https://api.github.com/users/technobly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technobly/subscriptions","organizations_url":"https://api.github.com/users/technobly/orgs","repos_url":"https://api.github.com/users/technobly/repos","events_url":"https://api.github.com/users/technobly/events{/privacy}","received_events_url":"https://api.github.com/users/technobly/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spark/spark-dev/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/spark/spark-dev/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"suda","id":25722,"avatar_url":"https://avatars.githubusercontent.com/u/25722?v=3","gravatar_id":"","url":"https://api.github.com/users/suda","html_url":"https://github.com/suda","followers_url":"https://api.github.com/users/suda/followers","following_url":"https://api.github.com/users/suda/following{/other_user}","gists_url":"https://api.github.com/users/suda/gists{/gist_id}","starred_url":"https://api.github.com/users/suda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suda/subscriptions","organizations_url":"https://api.github.com/users/suda/orgs","repos_url":"https://api.github.com/users/suda/repos","events_url":"https://api.github.com/users/suda/events{/privacy}","received_events_url":"https://api.github.com/users/suda/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/spark/spark-dev/milestones/3","html_url":"https://github.com/spark/spark-dev/milestones/0.0.33","labels_url":"https://api.github.com/repos/spark/spark-dev/milestones/3/labels","id":1697941,"number":3,"title":"0.0.33","description":"Urgent bug fixes","creator":{"login":"suda","id":25722,"avatar_url":"https://avatars.githubusercontent.com/u/25722?v=3","gravatar_id":"","url":"https://api.github.com/users/suda","html_url":"https://github.com/suda","followers_url":"https://api.github.com/users/suda/followers","following_url":"https://api.github.com/users/suda/following{/other_user}","gists_url":"https://api.github.com/users/suda/gists{/gist_id}","starred_url":"https://api.github.com/users/suda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suda/subscriptions","organizations_url":"https://api.github.com/users/suda/orgs","repos_url":"https://api.github.com/users/suda/repos","events_url":"https://api.github.com/users/suda/events{/privacy}","received_events_url":"https://api.github.com/users/suda/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":6,"state":"open","created_at":"2016-04-11T14:11:56Z","updated_at":"2016-04-19T14:19:42Z","due_on":"2016-05-02T23:00:00Z","closed_at":null},"comments":2,"created_at":"2014-11-17T16:12:17Z","updated_at":"2016-04-19T14:19:42Z","closed_at":"2016-04-19T14:19:42Z","body":"Currently in the Web IDE, if you make changes and press Verify... it saves the files automatically and then compiles.\r\n\r\nIn Spark Dev, it will only try to read the current state of the files saved on your hard drive and compile those.  This is a common \"gotcha\" with stand alone IDE's where when you make a change and recompile without saving first you don't see the change, and you spend a considerable amount of time trying to debug why the change you can see in the editor is not found in your device.  It could be solved by automatically saving all open files when attempting to Verify or Flash.  If the files are unsaved it should probably ask you to save them.\r\n\r\n---\r\nRelated to this: \r\n\r\n~~There is a feature that I had planned to ask for that is supported on the Arduino IDE, where you can make changes to a file and compile and flash the unsaved changes to your arduino.  This is useful for quickly editing the examples without having to find a place to save them, or to copy paste some code from the web to try much in the same way.  Sometimes you just want to try something without saving it and cluttering up your hard drive with one more set of files.~~\r\n\r\n~~If the way unsaved files was handled was something more like it makes a copy of all files in your project and all open unsaved files to a temporary location whenever you press Verify or Flash, it would be able to compile unsaved or saved files transparently.~~\r\nMoved to #45 \r\n\r\n---\r\n\r\nSettings for all of this would make it powerful and fully in the user's control as well.  For example you could have settings for Autosaving or not, Compiling unsaved changes or not, Ask to save unsaved files when compiling or flashing... or just save them automatically."}}