nodejs change proposal - javascript exception - thoughts
by Troy Dawson
Hello,
As the nodejs bundle libraries by default change proposal has worked
it's way through the process, a question came up that I'd like others
opinions on.
Some nodejs packages also provide javascript sub-packages. An example
is nodejs-underscore, also provides the js-underscore package.
What is the difference between the nodejs- and js- packages? The
nodejs packages provide "server side" libraries. They are in a place
that only your local server will see these libraries. The js-
packages provide "browser side" libraries. These are libraries that
are expected to be served by the web server to the users browsers.
Our nodejs proposal is supposed to only get rid of the server side
libraries. We (the Nodejs SIG) do not feel we should be messing with
the browser side (javascript) libraries. So, what to do.
For those nodejs libraries, that also provide javascript sub-packages,
and that do not fall under the "Packages that provide binaries that
users would want to use in their shell" clause:
- Remove the nodejs package, leaving only the js- sub-package.
So, for our example nodejs-underscore also provides js-underscore.
We would change the spec file so that it would only build js-underscore.
Does that seem like a good thing to do?
Troy
2Β years, 11Β months
R.C. NodejsLibrariesBundleByDefault proposed change request
by Troy Dawson
Hi All,
Again, this is my first time doing a change request, so feedback is appreciated.
I think I have everything filled out and to my eyes, it all makes
sense and is ready. But since I wrote it, I could have totally missed
things.
Could others look through it to make sure it makes sense, and I didn't
miss anything.
https://fedoraproject.org/wiki/Changes/NodejsLibrariesBundleByDefault
π Stop Shipping Individual Nodejs Library Packages
π Summary
For Nodejs, Fedora should only package:
The interpreter, development headers/libraries, and the assorted tools
to manage project-level installations (NPM, yarn, etc.).
Packages that provide binaries that users would want to use in their shell.
compiled/binary nodejs modules (for now)
π Owner
Name: Troy Dawson
Email: tdawson(a)redhat.com
Name: Stephen Gallagher
Email: sgallagh(a)redhat.com
Name: [Nodejs SIG]
Email: nodejs(a)lists.fedoraproject.org
π Current status
Targeted release: Fedora 34
Last updated: 2020-12-02
FESCo issue: <will be assigned by the Wrangler>
Tracker bug: <will be assigned by the Wrangler>
Release notes tracker: <will be assigned by the Wrangler>
π Detailed Description
The nodejs libraries have been approved to be bundled, and there is
infrastructure in place for the bundling to work properly. Currently,
it is recommended that packagers should create individual nodejs
library packages instead of bundling all of the libraries into the
package requiring them. This change is to make it default to bundle
the nodejs libraries with the package that needs then, and retire the
vast majority of nodejs library packages.
In summary, for Nodejs Fedora should only package:
The interpreter, development headers/libraries, and the assorted tools
to manage project-level installations (NPM, yarn, etc.).
Packages that provide binaries that users would want to use in their shell.
compiled/binary nodejs modules (for now)
π Feedback
There has been a discussion on the fedora nodejs mailing list about
what to do with the extreme dependency problem of the nodejs library
packages. Because of the extreme inter-dependency, upgrading almost
any package causes others to break. It has caused most packages to
rot, un-upgraded for years. Many of the nodejs packagers are giving up
and orphaning their packages, which has caused even more problems.
An initial proposal was to find all of the important nodejs library
packages and bundle those, making them easier to upgrade and maintain.
But there was problems with figuring out what was important, and what
versions should those have. During that discussion this rather extreme
solution, of getting rid of all nodejs libraries was proposed. To our
surprise, it has been the best suggestion and fixes the most problems.
π Benefit to Fedora
In Fedora 33, there are many nodejs libraries that are uninstallable,
causing other programs based off them, to also be uninstallable. This
get's rid of that problem.
Packages in Fedora that use nodejs libraries will be able to use the
library versions that upstream has tested and approved.
If a package in Fedora uses a nodejs library, the packager will not
have to also package extra individual nodejs library packages. There
have been times this has led to over 100 extra packages, each with
their own package reviews and maintenance problems. This change will
lower the workload on that packager, and possibly get more packages
into Fedora.
The nodejs maintainers can concentrate on nodejs itself, instead of
the whole nodejs library infrastructure.
Nodejs developers using Fedora will no longer have to worry about
Fedora's global nodejs libraries causing conflicts or inconsistencies.
π Scope
Proposal owners:
We will go through the Fedora release and determine what nodejs
packages Fedora should package. We will implement nodejs library
bundling on those we already own. For those that we do not own, we
will work with their owners to implement nodejs library bundling.
As packages implement nodejs library bundling, we will monitor the
nodejs libraries and note which ones are no longer required. When they
are no longer required, we will orphan them, if we own them. If we do
not own them, we will work with the owners to orphan them, if they
wish.
Other developers:
For Fedora packagers whose package rely on nodejs libraries, please
contact the [Nodejs SIG] and we will help you find the easiest way to
bundle your nodejs libraries.
For Fedora nodejs library packages, look to see what depends on your
library. If it looks like you can, then orphan your nodejs library. If
you would like, give the [Nodejs SIG] admin to your nodejs libraries,
and they will work through the process for you.
Release engineering: #Releng issue number (a check of an impact with
Release Engineering is needed)
Policies and guidelines: N/A (not a System Wide Change)
Trademark approval: N/A (not needed for this Change)
Alignment with Objectives:
π Upgrade/compatibility impact
As nodejs library packages are removed, we will work with the various
packages that depend on them. We will help them bundle their nodejs
libraries. To help people updating we will utilize the
fedora-obsolete-packages. It will obsolete all the various nodejs
libraries that are removed, and allow people to do updates to Fedora
34.
π How To Test
Install all nodejs libraries in Fedora 33. Try to update to Fedora 34.
Try to install all packages that require nodejs in Fedora 34.
Install all packages that require nodejs in Fedora 33. Try to update
to Fedora 34.
π User Experience
non-developer end users should not see anything different. Their
nodejs binaries should continue to work.
Nodejs developers using Fedora will no longer have to worry about
Fedora's global nodejs libraries causing conflicts or inconsistencies.
π Dependencies
As nodejs library packages are removed, we will work with the various
packages that depend on them. We will help them bundle their nodejs
libraries.
π Contingency Plan
Since we will be bundling the nodejs binaries, before we remove their
current dependencies, we will simply stop where we are at the freeze.
There will be nothing to back out.
Contingency mechanism: N/A
Contingency deadline: N/A
Blocks release? N/A
Blocks product? N/A
π Documentation
N/A (not a System Wide Change)
π Release Notes
3Β years