Skip to content

IDE: prevent multiple 'bad name' notifications. #3122

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
wants to merge 10 commits into from

Conversation

Chris--A
Copy link
Contributor

This patch will prevent the IDE from informing the user about a bad sketch folder name multiple times. Now the user is informed once at start up only, or once when it is detected during a re-scan of the folders.

Here is a run down of what I have noticed. Being bugged twice by V1.5.7 was fine, but now its a minimum of eight times. This only involves one folder with an invalid name.

Version 1.5.7

  • twice on start up.
  • once on board change.
  • no board manager to compare

Version 1.6.3

  • eight times on start up.
  • four on board change.
  • eight on opening of board manager.
  • four on closing board manager.

Version 1.6.4

  • eight times on start up
  • four on board change
  • six on board manager open
  • eight on board manager close.

In 1.6.4 simply starting the IDE, opening/closing the board manager and changing board types generates 26 notification boxes for me to click.

@ffissore
Copy link
Contributor

@ArduinoBot build this please

@ffissore ffissore self-assigned this May 12, 2015
@Chris--A
Copy link
Contributor Author

Downloading windows version now, will test it soon.

@Chris--A
Copy link
Contributor Author

Threw a NullPointerException on usage of the static variable.

Being very new to java I overlooked the type semantics. List is apparently a reference object, so I have modified it accordingly (create a new object to reference).

@Chris--A
Copy link
Contributor Author

@ArduinoBot build this please

1 similar comment
@ffissore
Copy link
Contributor

@ArduinoBot build this please

@ArduinoBot
Copy link
Contributor

Build failed.

@ffissore
Copy link
Contributor

compile:
    [mkdir] Created dir: /home/jenkins/jenkins/jobs/arduino-pull-request-builder/workspace/arduino-core/bin
    [javac] Compiling 121 source files to /home/jenkins/jenkins/jobs/arduino-pull-request-builder/workspace/arduino-core/bin
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] /home/jenkins/jenkins/jobs/arduino-pull-request-builder/workspace/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:61: error: List is abstract; cannot be instantiated
    [javac]   private static final List<String> badLibNotified = new List<String>();
    [javac]                                                      ^
    [javac] Note: /home/jenkins/jenkins/jobs/arduino-pull-request-builder/workspace/arduino-core/src/processing/app/preproc/PdePreprocessor.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 1 error
    [javac] 1 warning

@Chris--A
Copy link
Contributor Author

Thank you,
On searching the error, I found this article which explained it for me nicely. http://stackoverflow.com/a/6810696/4057102

If I plan to do more IDE mods, I'll get a working compiler solution set up to avoid these errors.

@ffissore
Copy link
Contributor

@ArduinoBot build this please

@ArduinoBot
Copy link
Contributor

Build failed.

@ffissore
Copy link
Contributor

compile:
    [mkdir] Created dir: /home/jenkins/jenkins/jobs/arduino-pull-request-builder/workspace/arduino-core/bin
    [javac] Compiling 121 source files to /home/jenkins/jenkins/jobs/arduino-pull-request-builder/workspace/arduino-core/bin
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] /home/jenkins/jenkins/jobs/arduino-pull-request-builder/workspace/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:61: error: cannot find symbol
    [javac]   private static final List<String> badLibNotified = new ArrayList<String>();
    [javac]                                                          ^
    [javac]   symbol:   class ArrayList
    [javac]   location: class LibrariesIndexer
    [javac] Note: /home/jenkins/jenkins/jobs/arduino-pull-request-builder/workspace/arduino-core/src/processing/app/preproc/PdePreprocessor.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 1 error
    [javac] 1 warning

I guess you really need to set up a dev env :)

@Chris--A
Copy link
Contributor Author

Yeah, I'm setting one up now.
Cheers.

@cmaglie cmaglie added feature request A request to make an enhancement (not a bug fix) Component: IDE user interface The Arduino IDE's user interface labels May 12, 2015
This patch will prevent the IDE from informing the user about a bad
sketch folder name multiple times.

Now the user is informed once at start up only, or once when it is
detected during a rescan of the folders.
@Chris--A Chris--A force-pushed the multiple-notify-bug branch from 3fc86ca to e74c2dc Compare May 14, 2015 04:31
@Chris--A
Copy link
Contributor Author

Had success, it works as I expected.

I got an error with the ant run process, however copying in the java folder from my 1.6.4 version allowed it to run.

windows-run:
spawn does not allow attributes related to input, output, error, result
spawn also does not allow timeout
finally, spawn is not compatible with a nested I/O

BUILD FAILED
F:\Arduino\build\build.xml:71: The following error occurred while executing this line:
F:\Arduino\build\build.xml:869: You have used an attribute or nested element which is not compatible with spawn

@Chris--A
Copy link
Contributor Author

With the fix I proposed to build.xml in #3167 this compiles and runs perfectly.

@ffissore
Copy link
Contributor

@ArduinoBot build this please

@Chris--A
Copy link
Contributor Author

Arduino bot's having a long weekend.

@ffissore
Copy link
Contributor

Yup, a maintenance activity left it disabled. Just re-enabled it

@ffissore
Copy link
Contributor

@ArduinoBot build this please

@ffissore
Copy link
Contributor

Rebased on master and pushed. See b2f8b9b. Thanks!

@ffissore ffissore closed this May 20, 2015
@ffissore ffissore added this to the Release 1.6.5 milestone May 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE user interface The Arduino IDE's user interface feature request A request to make an enhancement (not a bug fix)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants