Skip to content

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

Closed
@nickgammon

Description

@nickgammon

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.

Activity

added a commit that references this issue on Dec 12, 2012
ffissore

ffissore commented on Dec 12, 2012

@ffissore
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

nickgammon commented on Dec 13, 2012

@nickgammon
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

cmaglie commented on Dec 14, 2012

@cmaglie
Member

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

nickgammon commented on Dec 15, 2012

@nickgammon
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

billroy commented on Dec 15, 2012

@billroy

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

nickgammon commented on Dec 15, 2012

@nickgammon
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

cmaglie commented on Dec 15, 2012

@cmaglie
Member

Merged upstream.
69bc536

added a commit that references this issue on Dec 19, 2012
69bc536
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @billroy@nickgammon@cmaglie@ffissore

        Issue actions

          Deleting tab from IDE does not delete from temporary folder · Issue #1161 · arduino/Arduino