[Pkg-javascript-devel] Bug#976341: Bug#976341: Bug#976341: Bug#976341: node-jest: please provide real (not virtual) package node-jest-worker

Jonas Smedegaard jonas at jones.dk
Fri Dec 4 19:53:47 GMT 2020


Quoting Xavier (2020-12-04 16:35:31)
> Le 04/12/2020 à 15:32, Jonas Smedegaard a écrit :
> > Quoting Xavier (2020-12-04 11:48:58)
> >> Le 03/12/2020 à 19:05, Jonas Smedegaard a écrit :
> >>> Quoting Xavier (2020-12-03 18:30:54)
> >>>> Le 03/12/2020 à 18:07, Jonas Smedegaard a écrit :
> >>>>> Please provide real (not virtual) package node-jest-worker, and 
> >>>>> have jest depend on or recommend that, as appropriate.
> > 
> > [...]
> > 
> >> node-babel7 does provide versioned virtual packages (like acorn).
> > 
> > You are right: I failed to check correctly versioning.  apt and aptitude 
> > apparently does *not* show version for virtual packages (I thought so, 
> > and I thought I had checked that with node-types-uuid).
> > 
> > This works:
> > 
> >   apt-cache showpkg node-types-babel-code-frame | grep '^[a-z]'
> > 
> > This also works, and is more flexible to e.g. reveal that 3 node-types-* 
> > packages do not provide version:
> > 
> >   sudo sync-available
> >   grep-available -FProvides -sProvides node-types- | grep -Po '\bnode-types-[^,]+'
> > 
> > This should also work flexibly and more elegant, but doesn't for me (not 
> > sure why):
> > 
> >   grep-status --field=Provides -sProvides node-types-babel-code-frame
> > 
> > 
> >> I'll study if node-babel7 can be split into multiple packages. It took 
> >> me around 4 hours to split jest correctly...
> 
> Take a look at https://people.debian.org/~yadd/babel-spaghetti-dish.png
> (generated with add-node-component --cmptree). I don't know how to split
> node-babel7 for now...

I suggest to convert only the most popular virtual packages into real 
binary packages.

This lists virtual packages provided by node-babel7:

  aptitude -F%p search '?reverse-provides(node-babel7)'

This lists packages depending on any of those virtual packages:

  aptitude -F%p search '?depends(?reverse-provides(node-babel7))'

What I cannot figure out is how to group by _which_ virtual package it 
depends on.

[ several hours fighting with "aptitude search" later... ]

I give up: I think it should be possible to express a non-interactive 
"aptitude search" command similar to interactive display which I 
personally use a lot, but cannot figure that out.  So here is instead a 
super-quick intro to doing it in aptitude interactively (in case you are 
not familiar with that already):

 1. Run "aptitude -u" to start interactive fullscreen session with 
    up-date package information
 2. hit "/" to search, type "node-babel7", and hit ENTER
 3. Hit ENTER to switch from package list mode to package details
 4. Move to bottom with arrow keys or PAGEDOWN or END
 5. Hit ENTER when standing on top of "Packages depending on ..."
 6. Look at each "Dependencies on provided ..."

Just looking at the counts in "Dependencies on provided ..." lines, it 
seems the most beneficial to change from virtual to real package are 
these (sorted by popularity, and with popularity count appended):

  node-babel-types 21
  node-babel-template 11
  node-babel-traverse 10
  node-babel-runtime 8
  node-babel-helper-function-name 5
  node-babel-plugin-syntax-jsx 4
  node-babel-plugin-transform-async-to-generator 3
  node-babel-plugin-transform-exponentiation-operator 3
  node-babel-code-frame 2
  node-babel-core 2
  node-babel-helper-get-function-arity 2
  node-babel-helper-hoist-variables 2
  node-babel-helper-optimise-call-expression 2
  node-babel-helper-remap-async-to-generator 2
  node-babel-plugin-syntax-class-properties 2
  node-babel-plugin-syntax-dynamic-import 2
  node-babel-generator 1
  node-babel-helper-bindify-decorators 1
  node-babel-helper-builder-binary-assignment-operator-visitor 1
  node-babel-helper-builder-react-jsx 1
  node-babel-helper-call-delegate 1
  node-babel-helper-define-map 1
  node-babel-helper-explode-assignable-expression 1
  node-babel-helper-explode-class 1
  node-babel-helper-replace-supers 1
  node-babel-helpers 1
  node-babel-plugin-syntax-async-generators 1
  node-babel-plugin-syntax-decorators 1
  node-babel-plugin-syntax-do-expressions 1
  node-babel-plugin-syntax-flow 1
  node-babel-plugin-syntax-function-bind 1
  node-babel-plugin-syntax-object-rest-spread 1
  node-babel-plugin-transform-flow-strip-types 1
  node-babel-plugin-transform-react-display-name 1
  node-babel-plugin-transform-react-jsx 1
  node-babel-plugin-transform-react-jsx-self 1
  node-babel-plugin-transform-react-jsx-source 1
  node-babel-plugin-transform-regenerator 2
  node-babel-plugin-transform-strict-mode 1
  node-babel-polyfill 1
  node-babel-preset-flow 1
  node-babel-register 1

Popularity counts are heavily skewed by src:node-babel packages, 
however, so if we for some reason wanted ignore that source package then 
it would look like this:

  node-babel-plugin-transform-async-to-generator 1
  node-babel-plugin-transform-exponentiation-operator 1
  node-babel-plugin-transform-regenerator 1
  node-babel-template 1

So if you care about babel6 packages then start from the top of the 
upper list, otherwise from the lower list - and just convert as many or 
as few as you are in the mood for.

NB!: above popularity measures are based on only 3-4 source packages.  
Updating the following packages to declare explicit babel7 relations 
will help improve popularity measurement:

  $ aptitude --disable-columns -F%p search '?depends(node-babel7)|?recommends(node-babel7)|?suggests(node-babel7)'
  eslint                                                                                                                    
  gitlab
  jest
  node-autoprefixer
  node-babel-eslint
  node-babel-loader
  node-css-loader
  node-grunt-babel
  node-gulp-babel
  node-i18next
  node-i18next-browser-languagedetector
  node-i18next-xhr-backend
  node-istanbul
  node-less
  node-matrix-js-sdk
  node-parse-json
  node-regenerator-transform
  node-rollup-plugin-babel


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20201204/5f796b76/attachment.sig>


More information about the Pkg-javascript-devel mailing list