Skip to content

Unsaved changes are not compiled #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
per1234 opened this issue Feb 11, 2021 · 7 comments
Closed

Unsaved changes are not compiled #61

per1234 opened this issue Feb 11, 2021 · 7 comments
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Feb 11, 2021

Describe the bug
The saved versoin of the sketch is always compiled, even when there are unsaved changes in the editor.

To Reproduce
Steps to reproduce the behavior:

  1. File > Preferences
  2. Uncheck the box next to "Auto save".
  3. Click the "OK" button.
  4. Open a sketch that will compile without errors (e.g., File > New).
  5. Make changes to the sketch code that would cause a compilation failure. Don't save.
  6. Sketch > Verify/Compile. The compilation passes.

Expected behavior
The sketch code in the editor should be compiled, as is done in the Arduino IDE.

Desktop (please complete the following information):

  • OS: Windows 10
  • Version: 0.1.4
    Date: 2021-02-10T12:24:17.658Z
    CLI Version: 0.15.2 alpha [0d4cb150]
@kittaakos
Copy link
Contributor

Expected behavior
The sketch code in the editor should be compiled, as is done in the Arduino IDE.

I would argue with this. We either save automatically before running a compile, or we compile the previous, unsaved state. As a dev, I would never expect to compile something that is not saved.

@per1234
Copy link
Contributor Author

per1234 commented Feb 11, 2021

That decision was made 15 years ago, so there's no point in arguing about it.

@ubidefeo
Copy link

@per1234 we'll make a task for @kittaakos :)

@kittaakos
Copy link
Contributor

6. Sketch > Verify/Compile. The compilation passes.

@per1234, I assume the same should happen for upload using programmer. What about burning the bootload? The bootloader is unrelated to the sketch state, right? Thanks!

@per1234
Copy link
Contributor Author

per1234 commented Feb 11, 2021

I assume the same should happen for upload using programmer

Correct. Both "Upload" and "Upload Using Programmer" compile the sketch before doing the upload and they both currently compile the saved version of the sketch just as "Verify/Compile" does.

What about burning the bootload? The bootloader is unrelated to the sketch state, right?

That's correct. The sketch is not compiled when doing a Tools > Burn Bootloader. It just goes straight to flashing a pre-compiled binary bundled with the board platform, typically using the same tool that is used for the upload process. So the open sketch is completely irrelevant to the Burn Bootloader process. The only things that affect it are the board selection, programmer selection, and the port selection (and the port is only used by a couple type of programmer).

@kittaakos
Copy link
Contributor

Thank you, Per. 👍

I have implemented this, we will make it available to the public soon.

@kittaakos kittaakos self-assigned this Feb 11, 2021
@rsora rsora transferred this issue from arduino/arduino-pro-ide Mar 1, 2021
@per1234
Copy link
Contributor Author

per1234 commented Mar 1, 2021

Closing as fixed by f53013b
Thanks Akos!

@per1234 per1234 closed this as completed Mar 1, 2021
@per1234 per1234 added conclusion: resolved Issue was resolved topic: code Related to content of the project itself labels Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

4 participants