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

PDE erroneously detects changes in non-sketch files #2759

Closed
kazimuth opened this Issue Aug 7, 2014 · 10 comments

Comments

Projects
None yet
5 participants
@kazimuth

kazimuth commented Aug 7, 2014

When exporting a sketch, new folders are created, but existing files aren't altered. The PDE pops up the "A file has been modified externally" message anyway.

This is also a problem in python mode, which compiles .py files into .class files in the sketch directory.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 7, 2014

Member

@pvrs12 thoughts here?

Member

benfry commented Aug 7, 2014

@pvrs12 thoughts here?

@pvrs12

This comment has been minimized.

Show comment
Hide comment
@pvrs12

pvrs12 Aug 8, 2014

Contributor

I don't have the code in front of me, but for exporting I suspect that the files are created then written to in 2 steps. Code could be added to ignore changes when exporting. For the python compilation I can tell it to ignore .pyc to prevent the popup on python compilation. I can look at it on next Monday

Contributor

pvrs12 commented Aug 8, 2014

I don't have the code in front of me, but for exporting I suspect that the files are created then written to in 2 steps. Code could be added to ignore changes when exporting. For the python compilation I can tell it to ignore .pyc to prevent the popup on python compilation. I can look at it on next Monday

@pvrs12

This comment has been minimized.

Show comment
Hide comment
@pvrs12

pvrs12 Aug 11, 2014

Contributor

@kazimuth what OS are you on? Windows?

Contributor

pvrs12 commented Aug 11, 2014

@kazimuth what OS are you on? Windows?

@aengelke

This comment has been minimized.

Show comment
Hide comment
@aengelke

aengelke Aug 11, 2014

Contributor

@pvrs12 This actually happens on windows for me. Probably only PDE files in the sketch folder should be watched? (I noticed that saving images triggered this, too.)

Contributor

aengelke commented Aug 11, 2014

@pvrs12 This actually happens on windows for me. Probably only PDE files in the sketch folder should be watched? (I noticed that saving images triggered this, too.)

@GKFX

This comment has been minimized.

Show comment
Hide comment
@GKFX

GKFX Aug 12, 2014

Contributor

@aengelke And .java?

Contributor

GKFX commented Aug 12, 2014

@aengelke And .java?

@GKFX

This comment has been minimized.

Show comment
Hide comment
@GKFX

GKFX Aug 12, 2014

Contributor

Also, the message should be change to indicate that less is being watched. "Your code has been ...".

Contributor

GKFX commented Aug 12, 2014

Also, the message should be change to indicate that less is being watched. "Your code has been ...".

@aengelke

This comment has been minimized.

Show comment
Hide comment
@aengelke

aengelke Aug 12, 2014

Contributor

@GKFX actually, all files that the current mode can open.

Contributor

aengelke commented Aug 12, 2014

@GKFX actually, all files that the current mode can open.

@GKFX

This comment has been minimized.

Show comment
Hide comment
@GKFX

GKFX Aug 12, 2014

Contributor

Oh, of course. (I tend to stick to Java Mode myself.)

Contributor

GKFX commented Aug 12, 2014

Oh, of course. (I tend to stick to Java Mode myself.)

@pvrs12

This comment has been minimized.

Show comment
Hide comment
@pvrs12

pvrs12 Aug 13, 2014

Contributor

I came up with a possible fix for this. It now attempts to detect if the change was in the sketch or not before displaying any dialog. If it was in the sketch then it prompts for a reload. The other case in which it will prompt for a reload (which could cause false positives) is if the file was edited with gedit under linux (this is because of how gedit writes to the files and how the file detection is written in java)

Contributor

pvrs12 commented Aug 13, 2014

I came up with a possible fix for this. It now attempts to detect if the change was in the sketch or not before displaying any dialog. If it was in the sketch then it prompts for a reload. The other case in which it will prompt for a reload (which could cause false positives) is if the file was edited with gedit under linux (this is because of how gedit writes to the files and how the file detection is written in java)

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 14, 2015

Member

The base issue here has been fixed. Anyone having problems with this, please file a new issue with details of what's going on.

Member

benfry commented Aug 14, 2015

The base issue here has been fixed. Anyone having problems with this, please file a new issue with details of what's going on.

@benfry benfry closed this Aug 14, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment