Skip to content

Deleting tab from IDE does not delete from temporary folder #1161

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
nickgammon opened this issue Dec 10, 2012 · 7 comments
Closed

Deleting tab from IDE does not delete from temporary folder #1161

nickgammon opened this issue Dec 10, 2012 · 7 comments
Labels
Component: IDE The Arduino IDE

Comments

@nickgammon
Copy link

Make a project that includes a .h file, for example:

#include "foo.h"

void setup ()
  {
  int a = foo; 
  }  // end of setup

void loop () {}

And foo.h contains something, for example:

int foo = 42;

Compile this (it should succeed).

Now delete the tab foo.h from the IDE.

Compile again. It succeeds, but should not, as foo.h is now missing. It is still in the temporary folder, and even though it is not copied from the development area to the temporary folder, since it is still there, the compile succeeds.

This can cause confusion as unexpected or out-of-date .h files are included in projects during the development process.

Solution: The IDE should delete files from the working (temporary) folder when the file of the same name is deleted from the IDE workspace.

@ghost ghost assigned ffissore Dec 11, 2012
ffissore pushed a commit that referenced this issue Dec 12, 2012
@ffissore
Copy link
Contributor

Hello @nickgammon, I've pushed the fix on a separate branch: https://github.com/arduino/Arduino/tree/ide-1.5.x-issue1161. Can you pull it and check if the fix is ok?

@nickgammon
Copy link
Author

I don't know if it is my technique, but I am having trouble pulling this branch. I get stuck on 32% received. I've tried twice with the same result.

git clone https://github.com/arduino/Arduino.git

Cloning into Arduino...
remote: Counting objects: 36844, done.
remote: Compressing objects: 100% (11714/11714), done.
Receiving objects:  32% (11872/36844), 105.49 MiB | 672 KiB/s

I've tried cloning one of my own repositories in the same way, into the same folder (my home folder) without any problems.

@cmaglie
Copy link
Member

cmaglie commented Dec 14, 2012

I see that https method sometimes locks up for a while when it encounters big files (and Arduino repository seems to have some big stuff lying around at 32%). Maybe trying to use git method (over ssh) could solve the issue.

@nickgammon
Copy link
Author

Still not working. Am I doing this right?

$ git clone ssh://git@github.com/arduino/Arduino.git

Cloning into Arduino...
remote: Counting objects: 36868, done.
remote: Compressing objects: 100% (11737/11737), done.
Receiving objects:  31% (11484/36868), 73.67 MiB | 1.00 MiB/s   

After about 30 minutes it is stuck with those figures not changing at all. Then finally:

Write failed: Broken pipe11484/36868), 73.67 MiB | 1.00 MiB/s   
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

I have plenty of hard disk space (over 100 Gb).

The directory is writable, I found those 74 Mb of files there in the .git folder before the error message appeared.

And as I said earlier, the same technique works for pulling my own repository.

You guys mainly push rather than pull, right? Does someone want to test pulling the entire repository into a temporary directory?

@billroy
Copy link

billroy commented Dec 15, 2012

Worked here just now, though it took a while:

$ git clone ssh://git@github.com/arduino/Arduino.git
Cloning into 'Arduino'...
remote: Counting objects: 36868, done.
remote: Compressing objects: 100% (11737/11737), done.
remote: Total 36868 (delta 22466), reused 35549 (delta 21727)
Receiving objects: 100% (36868/36868), 1.13 GiB | 927 KiB/s, done.
Resolving deltas: 100% (22466/22466), done.

-br

@nickgammon
Copy link
Author

Finally! I managed to clone the repository on my Ubuntu PC using the same command line.

Note: The non-working one was Mac OS/X 10.7.5

I then shared that folder and compiled on the Mac.

I tested the reported issue on branch ide-1.5.x-issue1161, and it appears to be resolved.

Thank you.

@cmaglie
Copy link
Member

cmaglie commented Dec 15, 2012

Merged upstream.
69bc536

@cmaglie cmaglie closed this as completed Dec 15, 2012
@cmaglie cmaglie removed the Waiting for feedback More information must be provided before we can proceed label Oct 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE The Arduino IDE
Projects
None yet
Development

No branches or pull requests

4 participants