fjenett / javascript-mode-processing

Former ProcessingJS mode (Processing 1.5) that became JavaScript mode (Processing 2.0 beta) that has now been moved out of the Processing IDE.
57 stars 13 forks source link

keep processing.js up to date #20

Closed teo1978 closed 9 years ago

teo1978 commented 9 years ago

I expected that with a fresh download of JavaScript mode I would get the latest version of Processing.js, but it turn out it was foolish of me.

JavaScript mode currently bundles a very obsolete version of processing.js

Processing.js is available at https://raw.githubusercontent.com/processing-js/processing-js/master/processing.js and ttps://raw.githubusercontent.com/processing-js/processing-js/master/processing.min.js and is actively maintained. It should be possible to add a feature to the javascript mode such that it would automatically download the latest release from there, at least when the user installs JavaScript Mode.

Plus, it should also be possible to have it check automatically for available updates of processing.js.

teo1978 commented 9 years ago

You didn't read the description of this issue, did you??

fjenett commented 9 years ago

I did.

If i would automatically update the file on install or would add a way for users to do so i have no way of making sure the new PJS version actually still works with JS export.

And … you now (see #6) can add a newer version to the template folder if you really need it for your project. So there is already a way to update it from the user side.

teo1978 commented 9 years ago

OK sorry, you saying that commit fixed this at the same time as #17 made me think you had misinterpreted this issue as just "use a more current pjs version"

Actually, replacing processin.js in the template folder already worked (i tried it a few days ago) so I'm not sure what was fixed by fixing #6.

The problem is that the average Processing user who installs JavaScript mode most probably won't even know that processing.js exists as a separate thing and an update may exist independently of JavaScript mode.

I understand your concern to make sure processing.js works with jsmode before bundling onto it. However consider:

  1. What is the likelihood of a new version of pjs not working with jsmide? (besides pjs having some regression, unrelated to its interoperation with mode; which is something you wouldn't test thoroughly before manually including a new pjs version in a new jsmode release anyway, would you?) Does that remote risk really outweigh the pain of almost always having an outdated pjs version?
  2. If you think it does, then it could be worthy to have an option available to the user, such as "automatically update procrssing.js"
  3. And/or automatically check for availability of an update and warn the use and let him choose whether to update, warning him of the potential risk
fjenett commented 9 years ago

6 fixed using a different processing.js file from inside a custom template in your sketch folder. I think you might have replaced the one in the library, correct?

I don't mind letting people use an outdated version that works ok. This is the nature of almost any project that depends on outside components. If people know that there is a problem with the included version then they are probably able to either replace it or even better send me a PR to include a newer one.

teo1978 commented 9 years ago

6 fixed using a different processing.js file from inside a custom template in your sketch folder. I think you might have replaced the one in the library, correct?

Oh, I see, that's right.

teo1978 commented 9 years ago

If people know that there is a problem with the included version then they are probably able to either replace it or even better send me a PR to include a newer one.

Yeah, a tiny percentage of them. Or they will think that they are using the latest version and think the problem is just yet to be fixed. As I was until a few weeks ago (using processing.js 1.4.1 from 2012 and thinking I was using the latest version, until I even realized the person who maintains PJS is not the same who maintains JS Mode)

teo1978 commented 9 years ago

I don't mind letting people use an outdated version that works ok.

I know. It's a pity that you don't care about providing them an easy way to get the latest version, though. If I was more proficient in Java, I would try to do it myself and do a PR. Maybe you could keep this feature request open, in case there is somebody else who could do that.