Particle Dev non-intuitive behavior

This behavior is repeatable. You can test it with a short program that blinks the on board LED. Make change by varying the rate.

Using Dev, if you don’t save changes to a program, those changes are not included in the next compile and upload. If you watch the directory with Finder, you will see the firmware being created. The Success! message will appear in Dev. If you upload that firmware you can watch Finder as it is removed from the folder. Dev announces that upload has started. Core flashes all appropriate colors and restarts. BUT, none of the changes you just made are in the core.

All the steps that Dev would make when properly compiling and uploading are made. Core behaves as it should, but new program is not uploaded.

Hit File -> Save and then Compile and Upload, and now the changes are uploaded into the core.

In Build, the compile and upload are grayed out until the file is saved and the blue circle changed to an x. In Dev there is no warning, help or prevention, just hidden failure to upload.

Some programs won’t let you do things until you save, others automatically save when you do things (Xcode for example). This is the first program I’ve worked with that pretends to let you do something but actually does not until you save changes. Can be confusing…

@Bendrix, this in deed might be unexpected and undesirable behaviour, but there is a “good” reason for it (and other non IoT IDEs do it the same way - and in the early days Spark Web IDE did it too, till some clever clogs added the auto-save feature ;-)).

Particle Dev (same as CLI) doesn’t come with its own toolchain, but uploads the files of your directory to the cloud toolchain, where it gets built and then downloaded by Particle Dev again.
But in order to upload the most recent evolution of your code it needs to be saved first.

Sure thing, this could be added into the Particle Dev “skript” that also does the removing of the old firmware and downloading of the newly built one, but it’s just not there (yet).

Maybe this would be a suggestion you could bring forward to @suda :wink:

1 Like

Very interesting. I was truly wondering “where in the heck is the firmware coming from”? Surely, there must have been a hidden copy of the original programs somewhere, or else how was it getting downloaded to Core? Thanks for solving that mystery.

@suda may want to either gray out the compile and upload icons until the program is saved, or just autosave it (my preference) when the compile button is hit, if not then, certainly when the upload button is hit.

These little things can cut down on tech support, and user frustration :smile:

This issue has been raised before. Will look into it :slight_smile:

1 Like

Hello @suda

Sorry, I did not know about checking Github for feature fixes. I did search the forums and read several threads before adding this one as I’m sensitive to avoiding duplicates.

In the short term, this is another of those gotchas that could be mitigated with a quick add to the web page docs.

I’ve been through the web docs many times over the last 6 weeks, and note that those are the only place that Particle is not a dynamic environment rife with change and improvement. To whit, I have not seen an update in 6 weeks, athough I’ve found a lot of helpful stuff spread out all over the forums. Time to pull some earnest summer intern in to scour the resources for stuff to put in the docs :wink:

1 Like