-
Notifications
You must be signed in to change notification settings - Fork 726
Roll in @typhonrt's package modernization changes #492
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
base: glmatrix-next
Are you sure you want to change the base?
Conversation
|
Gonna take me a moment to figure out how to resolve the merge conflicts from this end. Might end up in this PR getting dropped in favor of another approach, but wanted to indicate that I was working on it. |
|
I don't want to take any more of your time than necessary because I merged a few PRs ahead of yours, so I did the rebase here: https://github.com/toji/gl-matrix/tree/typhonrt-merge 😁 It's not clear if there's any sane way to merge that into glmatrix-next, so I may simply delete the glmatrix-next branch and rename that one into it's place. Assuming you approve of the merge, of course! And I do sincerely apologize for leaving this hanging for so long. It's been a challenge to keep up with projects like this when work and family demands are high. |
Yeah.. Always multiple ways to proverbially "skin a cat". As the maintainer choosing whatever you are most comfortable with is reasonable. From what I gather the
Indeed.. I'm quite behind where I'd like to be w/ the various work I have on my plate as well currently. Definitely glad to just have things move forward w/ the I'm just a tad behind on updating the documentation tooling to the latest TypeDoc, so can certainly swing around very soon (~2-4 weeks) to provide an update there as well as help with any ancillary aspects in the gap since I last put effort into the fork. Everything should still work w/ the current package dependencies set. I've been shipping the fork in my framework this entire time. |
It's already done, actually! If you look at the commit log for that branch it's already had the 3 commits rebased onto it. A bit of a pain but it wasn't too hard. Just monotonous.
No worries! Those can be worked on over time. I don't view it as release blocking.
Good to hear! It's comforting to know that the codebase has seen some real-world use. |
|
@typhonrt: Okay, after toying around with this branch for the weekend in some of my own projects I've got a couple of tweaks to the dist files I'd like to make prior to pushing this as beta 3. The primary speedbump I hit was that if I want to use the library in browser as an ES module without using a bundler then my only option appears to be the Specifically it currently includes the line
instead of the browser-compatible
I'd really like to see a version of the library in the dist folder that can be imported directly by a script running in-browser. (Technically the first one CAN be used in the browser if you add a A secondary hitch that I found was that previous releases of the library have included options for importing only a single file if that's all you need. (ie: I can work on enabling both of these on top of the build structure you've put in place, but wanted to bounce it off of you real quick in case you had any concerns or knew of easy way to enable those outputs. Thanks again for your work here and your patience! |
Either you adopt modern mainstream distribution or you don't. What you are asking for is an unbundled / non-subpath separated version of the library which will inherently negate modern mainstream distribution benefits as currently configured while also re-introducing a less maintainable local distribution in respect to the f32 / f64 code generation. For lightweight adhoc browser demo code using a bundle of choice ala You can hack the configuration and attempt to satisfy your own historical / personal preference for lightweight unbundled demo usage, but quite likely in the process compromise the modern distribution benefits currently realized. At the end of the day this is not my repository and I have done the best I can providing my take on an informed modern distribution of I gather you are just not aware of the benefits currently available that you haven't used personally yet. I also can't spend more time on attempting to satisfy this particular request as I believe I have fulfilled the requirements necessary for a modernized |
|
@toji I know the above is a bit of push back, but there are good reasons for this. I should also state not everyone's idea of The built In the past you may have just copied raw unbundled source of glmatrix to a project, but how many other libraries / NPM packages do you do this for in your personal demo projects? This is not a common consumption practice. For easy consumption for CDN use cases and targeting the long tail through transpilation whether CJS / UMD or even ES2016 in the case for ESM various bundles are created. Through clear documentation IMHO it is fine to direct consumers that wish to not use modern build tooling to copy the bundle of choice to their local project or as mentioned provide the CDN mirrored links of the bundled package after being published. I'd be glad to answer any questions you have about design decisions and structure of the codebase. I do use these newer mechanisms of Node / NPM all the time in my framework for at least 5 years now. |
|
Sorry, I've had a partial response typed up but I've come down with something the last couple of days and didn't want to be trying to work this out with a foggy head. I do have some questions about how things are structured, some of which I think you've already answered in past posts or videos and I didn't want to make you repeat yourself, but it's probably best just to ask again. Overall I think it's in a good place, I just want to have a slightly clearer path for a certain class of beginner/casual user. Give me another day or so to get over whatever bug I've got and I'll probably be able to communicate far more clearly. 😅 |
|
Okay, feeling significantly less brain-foggy than I was for the last couple of days! So let me get a couple of questions out of the way. None of these are requests for changes, it's just helping my own understanding of the code/build layout since I'll be maintaining it.
Aside from that, I should also mention that in my merge branch I've removed the swizzles code. I know you tried to make them work as elegantly as possible with the code base, but at the end of the day it seemed like too much added complexity for not enough benefit. Might work better as a complimentary but separate library. In any case, I can worry about that later. |
Indeed you caught me on a busy week as I hunkered down to do a significant release of my framework on Saturday / past weekend. I'm glad to answer any questions. Also I should state that I'll be around to help w/ any ongoing maintenance. I don't foresee switching matrix libraries anytime soon.
The
Typically one doesn't check-in the distribution resources for a NPM package that is published as it is just "extra noise" in the repo. The reason the The only time it makes sense to check in
They are shared resources across the f32 / f64 variations. There is no code duplication required of these resources. It makes the code generation of the Also when downstream consumption occurs where both f32 / f64 variations are utilized tree-shaking is automatic / no possible duplication of Typically consumers don't need to access these sub-paths, but they can to just access to util code or perhaps use the same constant from
The only push back I'll provide here especially since I won't ever use the swizzle path myself is that it was fully working as intended including top notch types support that only is engaged when a consumer utilizes the swizzle setup. IE it 100% worked and worked well w/ types support across all of the distribution mechanisms. To me this seems more like a documentation concern in regard to the API docs being overcomplicated / lots of extra data for a sideline use case. Since the engineering aspects are sound for this feature and if the actual concern is documentation oriented or a concern around perceived complexity of the feature by consumers of the library I would explore excluding the additional swizzle API from the mainline API docs and just make an addendum / markdown file that documents the swizzle API before wholesale removing the feature. I don't know how many consumers use this feature or if it will be missed. I do agree that it does add a lot of perceived noise to the API docs when included in the mainline docs. I also agree that libraries should be lean and mean and focus on mainline use cases. It just happens that the swizzle engineering / types effort is feature complete though, so I'm curious if the source of your decision had engineering / maintenance concerns or was just driven by documentation overhead / consumer perception. |
|
Will there be any further movement on this PR / issue? Glad to help & resolve any remaining understanding or updates necessary. |

This work has been outstanding for a while, and I haven't moved as proactively as I should have to accept it. Taking the initiative to put up a PR here (and resolve any merge issues that come up) in hopes that @typhonrt is still willing to make the code contribution.