-
Notifications
You must be signed in to change notification settings - Fork 724
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
Please revert version to 3.3.0 as 3.4.0 breaks things #439
Comments
I have the same issue, a storybook with a map component breaks with this error:
A quick resolution would be greatly appreciated! |
Yup. This must be resolved as a lot of packages are dependent on that. Mostly react-map-gl, deck.gl, nebula.gl etc. But for the quick and temp fix, yarn resolutions can help by adding following in the package.json file. "resolutions": {
"gl-matrix": "3.3.0",
} |
Came here to post the same, can confirm it works until an official fix
|
Is there any solution I can use without using yarn?
|
Hi, Yeah. There is another package which might help you with resolutions. I haven't tried it though, so can't guarantee. |
@bilalajanjua thx man, you're my saviour. :-) |
I'll unpublish 3.4.0 for now. It looks like the top-of-tree has made changes (see #432 (comment)) that simply aren't going to be backwards compatible with every build system so I'll need to do a major version bump if we're going to publish any new updates. Might not be a bad time to see if there's any other cleanups that need to be done while I'm at it. |
NPM won't let me unpublish 3.4.0 since apparently there's already some dependencies on it 😮 so I've marked it as deprecated instead. It's not clear to me that will resolve the issue with people who have a dependency on If anyone happens to be able to confirm that the deprecation DID fix the problem for you, though, I'd appreciate hearing it! |
I guess deprecation will work. I'm gonna quickly verify now. |
Unfortunately, It seems deprecation doesn't work. If we simply run: yarn add gl-matrix It installs 3.4.0 version although it's deprecated and also shows the deprecation warning. And if we try to install other packages which are using gl-matrix as a dependency and have set version as: "gl-matrix": "^3.0.0" then it is again resolves to the latest version which is 3.4.0. So I guess, for now the only option is to republish the package with an older commit to resolve this issue. |
Thanks for checking on that, @bilalajanjua. I've just published v3.4.1, which rolls in a few new fixes but avoids the backwards compat breaking change and should resolve the issue with the deprecated package taking priority. Please give it a try and let me know if you run into any additional problems! |
I used "npm i [email protected]" to restore gl matrix version, I think it's work fine |
No problem Brandon. I tried with the version 3.4.1, but while building the react app with @math.gl as a dependency. I still get the same error i was getting with 3.4.0. @math.gl is importing the vec2 module as follows, but I guess we can't import it like this in v3.4.1: import * as vec2 from 'gl-matrix/vec2'; Instead, it has to be imported like this as per new version: import { vec2 } from 'gl-matrix'; So i guess, version 3.4.1 still doesn't fix the problem. |
Thank you again for helping debug that. I'm not clear on what would cause that difference between 3.3.0 and 3.4.1, as it should have just been some minor fixes and additions to the functions themselves, not how the build was published. I'll continue investigating. |
No worries. Yeah it seems bundling logic also got changed in one of those fixes. I'll also try to find some time to investigate the cause. |
Just an FYI for anyone using glTF-Transform, gltfjsx, or React Three Fiber — I've pinned |
Okay, I suspect that the issue is that I wasn't building with the exact npm dependencies from v3.3.0, and that changed the output format in a breaking way. I've tried to address that, and the changes to dist/gl-matrix look far less disruptive now, but I'd like to try and verify before pushing out yet another npm release. Is anyone in a position to try the branch https://github.com/toji/gl-matrix/tree/v3.4.x against code that has started failing since 3.4.0 was pushed and verify if it works or fails for you? (Should be able to set the dependency to |
@toji I am verifying that. |
Nope, @toji . That doesn't work as well. Getting the same error as before (#439 (comment)). |
Ugh, thanks for checking. One last thing, if you don't mind (thank you so much for your help so far!) Can you try |
Sure @toji, On it. |
@toji This seems fine. It generates the same tree that i sent earlier for version 3.3.0. Although it's still under dist folder but i guess with npm publish, dist folder's content will be moved to the root directory. If yes, then it will actually solve the problem. Here's the tree: |
Thanks again @bilalajanjua. I've published v3.4.2 to NPM and deprecated v3.4.1. This is just the v3.3.0 release with two new functions that will benefit WebGPU developers in the future. Verification that it's working with other projects would be welcome! (And I'm going to have to set aside some time to do some serious restructuring of the current build system for an eventual 4.0.0 release. I'm very distressed at how brittle it's ended up being, though to be fair it's also been allowed to bit-rot for a while.) |
@toji I am afraid, v3.4.2 when installed brings dist folder with it and that's why import * as vec2 from 'gl-matrix/vec2'; doesn't work and import * as vec2 from 'gl-matrix/dist/vec2'; works! (which is not expected 😟) I thought bundling actually takes away dist folder and packs only the content inside it as it was previously done in v3.3.0. |
Oh, I may have misunderstood something fairly fundamental about how @stefnotch was previously publishing the package. Let me verify something... |
In Lines 9 to 21 in 0bca31a
|
Well crap. Turns out that the previous npm packages were being published FROM the dist folder, whereas I was publishing from the root. ...sigh v3.4.3 has been published now (sure, let's just burn through ALL the 3.4.x's why don't we.) Let's give that a try. (I apologize that this has been so much back and forth. I include gl-matrix in my own projects as a ES module and so the depenencies work out differently.) |
Oh dearie, I'm very sorry for not properly documenting everything. If I recall correctly, I was publishing the package by doing
I'm not entirely sure why I had to It's also quite possible that one of the build system changes that I merged in was backwards incompatible. |
No, this really isn't your fault. If anything it's entirely due to my lack of activity on the project lately. I can see why the builds were being published that way now, it just wasn't what I remembered/expected based on some of the other NPM packages I've had a more hands-on involvement in lately. |
Thanks guys @toji @stefnotch @donmccurdy 🚀 I can confirm v3.4.3 works perfectly fine just like 3.3.0 P.S. These last few comments gave me an idea on how to publish a package without that dist folder. So yeah thanks for that. 😄 |
Hallelujah! Thank you for taking the time to help me set that right, it's been invaluable. And now that I know what went wrong I can push out fixes more confidently in the future. Again, though, it may be best if I leave any big changes to a potential 4.0.0 just to avoid this whole song and dance. |
I'm having trouble with 3.4.3 I'm trying to setup this folder:https://github.com/davidwparker/programmingtil-webgl/tree/master/0063-3d-cube-mouse-rotate I've obtained gl-matrix:3.4.3 from npm by
and I edited the however, running
Everything is correctly loaded, no 404's. edit: 3.3.0 still doesn't work as well, though, I may have bumped this unnecessarily |
BTW I belive you haven't released a git |
Hi! please help revert version to 3.3.0 or bump version to 4.0.0 as many modules depending on
gl-matrix
is using '^'. 3.4.0 results build errors. Great appreciated!The text was updated successfully, but these errors were encountered: