Skip to content
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

Processing 4 Rejects Third Party Libs if Version is not numeric #553

Closed
jedishrfu opened this issue Sep 15, 2022 · 3 comments
Closed

Processing 4 Rejects Third Party Libs if Version is not numeric #553

jedishrfu opened this issue Sep 15, 2022 · 3 comments

Comments

@jedishrfu
Copy link

jedishrfu commented Sep 15, 2022

Description

Processing 4.0.1 Rejects Third Party Libs If Version is Not Numeric and consequently doesn't install the library or its examples.

ControlP5 and PixelFlow are two notable examples that failed:

The version number for “Coding Creative” is not a number.
Please contact the author to fix it according to the guidelines.

The version number for “ControlP5” is not a number.
Please contact the author to fix it according to the guidelines.

The version number for “oscP5” is not a number.
Please contact the author to fix it according to the guidelines.

The version number for “spacebrewP5” is not a number.
Please contact the author to fix it according to the guidelines.

The version number for “PixelFlow” is not a number.
Please contact the author to fix it according to the guidelines.

Expected Behavior

Expected it to use some default or string convert to get the number but still load the library.

Current Behavior

Fails to load the library and its examples.

Steps to Reproduce

  1. Open tools- -> manage tools
  2. Library tab
  3. Select PixelFlow or ControlP5 error appears in console if Processing 4 launched from the command line.

Your Environment

Running on Linux Fedora 36 Workstation Edition

  • Processing version: 4.0.1
  • Operating System and OS version: Linux Fedora 36 Workstation Edition
  • Other information: Nope

Possible Causes / Solutions

The check is found in AvailableContribution.java (see below) and LocalContribution.java but there may be other places as well.

https://github.com/processing/processing4/blob/22987414f8a7ec1c9a78d56f25734acc70eda45d/app/src/processing/app/contrib/AvailableContribution.java#L309

 	      int version;
      try {
        version = Integer.parseInt(properties.get("version"));
      } catch (NumberFormatException e) {
        version = getVersion();
        System.err.println("The version number for “" + name + "” is not a number.");
        System.err.println("Please contact the author to fix it according to the guidelines.");
      }
@benfry
Copy link
Owner

benfry commented Sep 23, 2022

That's because the version number is supposed to be numeric, otherwise the software cannot check for newer releases. It's covered in detail in the library template which functions as the documentation for all these details.

# A version number that increments once with each release. This is used to 
# compare different versions of the same Library, and check if an update is 
# available. You should think of it as a counter, counting the total number of 
# releases you've had.
version = ##library.version##  # This must be parsable as an int

# The version as the user will see it. If blank, the version attribute will be 
# used here. This should be a single word, with no spaces.
prettyVersion = ##library.prettyVersion##  # This is treated as a String

Please contact the authors of those libraries about fixing them—this requirement has been in place for years so I'm not sure how it was even working in the past.

@benfry benfry closed this as completed Sep 23, 2022
@github-actions
Copy link

This issue has been automatically locked. To avoid confusion with reports that have already been resolved, closed issues are automatically locked 30 days after the last comment. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2022
@benfry
Copy link
Owner

benfry commented Nov 4, 2022

Found this problem here: #586

Sorry for the trouble; it's now fixed for 4.0.2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants