p5.js icon indicating copy to clipboard operation
p5.js copied to clipboard

P5.js 1.0.0 is different in different distributions.

Open maxgmer opened this issue 2 years ago • 10 comments

Most appropriate sub-area of p5.js?

  • [ ] Accessibility (Web Accessibility)
  • [X] Build tools and processes
  • [ ] Color
  • [ ] Core/Environment/Rendering
  • [ ] Data
  • [ ] DOM
  • [ ] Events
  • [ ] Friendly error system
  • [ ] Image
  • [ ] IO (Input/Output)
  • [ ] Localization
  • [ ] Math
  • [ ] Unit Testing
  • [ ] Typography
  • [X] Utilities
  • [ ] WebGL
  • [X] Other (specify if possible)

p5.js version

1.0.0

Web browser and version

Doesn't matter

Operating System

Doesn't matter

Steps to reproduce this

Steps:

  1. Download p5.js file from 1.0.0 releases. (https://github.com/processing/p5.js/releases?page=2).
  2. Import it into a project.
  3. Try to create p5.Texture (won't be able to do it).
  4. Now import same p5.js 1.0.0 like this: .
  5. Try to create p5.Texture (will be able to do it).

First question: why are p5js of the same version different. Second question: which one is actually 1.0.0?

maxgmer avatar Jul 20 '22 16:07 maxgmer

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!

welcome[bot] avatar Jul 20 '22 16:07 welcome[bot]

In the contents of the cdnjs file, this is at the top: p5.js v0.10.2 February 29, 2020

Looks like it was built on the same day but not using the same code build?

davepagurek avatar Jul 20 '22 17:07 davepagurek

Hrm–looking at the contents of the files, it seems like they are actually entirely identical, with the sole difference being the top line of the file documenting the version.

Here is the diff that I'm looking at for reference: https://www.diffchecker.com/irxTUa2N

Which is comparing https://github.com/processing/p5.js/releases?page=2 and https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.0.0/p5.min.js both linked above

I may be missing something here, but I'm not sure that the issue described above with p5.Texture is due to this minor discrepancy in 1.0.0 copies?

jakerockland avatar Jul 20 '22 23:07 jakerockland

@jakerockland There were some release problems back when 1.0.0 was released #4336. As noticed, the only difference should be the headers only.

@maxgmer Before digging deeper, is there a specific reason why you would need to use 1.0.0?

limzykenneth avatar Jul 21 '22 02:07 limzykenneth

@jakerockland sorry, my description wasn't detailed enough. From github I downloaded non-minified version, non-minified one is definitely different (but won't be able to see with diff checked as, obviously, minified and non-minified versions are different). That is why in steps to reproduce I said to try them instead of running through diff checker.

maxgmer avatar Jul 21 '22 07:07 maxgmer

@limzykenneth artblocks.io restricts p5js to 1.0.0. I actually already asked them where they take their 1.0.0 p5js from and just made my script take it from the same place, so the question about where to take 1.0.0 from is resolved.

But the library difference might create confusion for sure.

maxgmer avatar Jul 21 '22 07:07 maxgmer

I see I see, thank you for clarifying @maxgmer – Art Blocks does use the minified version of 1.0.0 as our current p5js version, for which the Github release and p5-foundation-recommended-CDN both match IIUC. 😅

jakerockland avatar Jul 21 '22 16:07 jakerockland

I seemed to remember the non-minified version might have some publishing issue that's causing this but I may be misremembering. In any case, if there really is a mismatch between the two and the CDN version is incorrect, there is no way for us to change it as CDN providers will not refresh the files once published because of the hash integrity attribute (we asked before).

As such the most we can do is unpublish 1.0.0 but there may very well be sources (such as artblocks as mentioned) that rely on these being available so I don't think this is a very good solution either. I would recommend to just leave it as is if it is not posing a major problem in your work and try to upgrade to the latest version if at all possible, there shouldn't be any breaking changes so your code should just work without modifications.

limzykenneth avatar Jul 29 '22 11:07 limzykenneth

@limzykenneth I see. Yes, then we can just close this, but it'd be awesome if you update github release description for 1.0.0 mentioning this difference.

maxgmer avatar Jul 29 '22 11:07 maxgmer

but it'd be awesome if you update github release description for 1.0.0 mentioning this difference. +++ 🙏

Also, for posterity/clarity, we do have plans to eventually update the canonical p5js version for Art Blocks up from 1.0.0, but are very particular about how we want to do versioning given the on-chain nature of the artwork for Art Blocks so this is something we don't have a concrete timeline committed to just quite yet–but can definitely confirm that we will eventually do a version bump on our end as well (for new projects going forward, existing projects are all pegged to 1.0.0).

cc (for additional team-visibility) @lyaunzbe @yoshiwarab @ryley-o @aaronpenne

jakerockland avatar Jul 29 '22 19:07 jakerockland

@limzykenneth I see. Yes, then we can just close this, but it'd be awesome if you update github release description for 1.0.0 mentioning this difference.

Yes, we can update the release description. Any suggestions on how to phrase the difference? Thanks!

Qianqianye avatar Oct 24 '22 23:10 Qianqianye

@Qianqianye we can just leave a link to this issue here and add "The p5.min.js artifact below is incorrect. To get the valid p5.min.js 1.0.0, use https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.0.0/p5.min.js link"

maxgmer avatar Oct 25 '22 08:10 maxgmer