-
Notifications
You must be signed in to change notification settings - Fork 522
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
Multi-build: package filename length may exceed limit #170
Conversation
Adding 'prodonly' flag to package and only load the script in production mode.
…e in define if value passed in
Fix error when a shim has a non-steal dep and an exports function
Nested shim dependencies don't verify their dependencies are ready
… better for staying within the length limit for filenames and reducing filename collisions. Updated tests.
Very interesting! Will take a look at this as soon as I can. |
That's awesome, but I sorta like using the names if possible. It makes it easier to understand which packages belong to what modules. Maybe a hybrid would work with this technique being used once file names got too long. How long are your filenames? IE supports 1024 character urls. |
Actually we're reaching OS X's limit of 255 characters for the filename (including extension), at which point it will not write the file during build. (Indeed IE has a 1024 limit on URLs, but thankfully we're not at that point yet!) While I agree it's nice to have the package names be meaningful, I argue it has little value in practice:
Regarding a hybrid approach, did you have something like this in mind?
I could redo the PR to do that, if it will be accepted! :) |
Kindly requesting feedback on this pull request! :) The packaging process, prior to this pull request, will break once a certain number of modules is reached. Our production site has been using this fix for the last 2 months without issues. I took the simplest approach by using a hash for the filename, but I'm willing to tweak it based on any feedback. |
When using steal to multi-build JavascriptMVC 3.3 apps into nice shared packages, it's possible to exceed the file-system length limit for filenames, which of course breaks the multi-build.
It occurs when there is a shared package comprised of enough long-named app names. This is because the package name is calculated by joining the app names together. This is the same issue as described in #169.
We've solved this for our own project by calculating an (8-character) MD5 hash of the package name, and using that instead. It also means some messy logic for dealing with potential filename collisions could be removed.
We've updated the multi-build test, so that
./js steal/build/test/run.js
passes.