Bug#1010471: [Pkg-javascript-devel] Bug#1010471: eslint: please move Recommends to Depends

2022-05-02 Thread Jérémy Lal
Le lun. 2 mai 2022 à 11:54, Jonas Smedegaard  a écrit :

> Quoting Jérémy Lal (2022-05-02 11:45:36)
> > I stand by saying as it is, putting those packages:
> > node-chalk
> > node-strip-ansi
> > node-text-table
> > in Recommends just breaks the default functionality of eslint.
>
> Ignoring recommends breaks systems.
>

eslint is a build-dependency of enigmail (nothing odd about that).
When sbuild builds a package, it doesn't install recommended packages of
build-dependencies ?


Bug#1010471: [Pkg-javascript-devel] Bug#1010471: eslint: please move Recommends to Depends

2022-05-02 Thread Jonas Smedegaard
Quoting Jérémy Lal (2022-05-02 11:45:36)
> I stand by saying as it is, putting those packages:
> node-chalk
> node-strip-ansi
> node-text-table
> in Recommends just breaks the default functionality of eslint.

Ignoring recommends breaks systems.

 - Jonas

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

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#1010471: [Pkg-javascript-devel] Bug#1010471: eslint: please move Recommends to Depends

2022-05-02 Thread Jérémy Lal
Le lun. 2 mai 2022 à 11:24, Jonas Smedegaard  a écrit :

> tags -1 wontfix
>
> Quoting Jérémy Lal (2022-05-02 09:50:54)
> > I was trying to fix "enigmail" FTBFS, and discovered that it was
> > simply missing all the packages that "eslint" recommends.
> >
> > enigmail
> > Build-Depends:
> >  eslint ,
> >  node-chalk ,
> >  node-strip-ansi ,
> >  node-text-table 
> >
> > Those three packages are not explicitely called by enigmail's eslintrc
> > config: they should just be in eslint Depends, because they are
> > required to make eslint work.
>
> Those are not _always_ needed for eslint, only _often_ which is the
> exact purpose of "Recommends.


It also breaks separation of concerns and will lead to an unmaintainable
mess,
if applied globally.

Please include those recommended packages as build-dependencies, or
> patch/override configuration to not use them: They are related to how
> eslint outputs information, and since ideally packaging should be
> verbose/terse depending on build flags you would want to manage such
> configuration anyway.


> I commonly add something like this near the top of the rules file:
>
> ESLINT = NO_COLOR=1 eslint
> JEST = jest --color=false
> MOCHA = NO_COLOR=1 mocha --no-timeout --no-color
> # normalize output with TAP where possible unless terse requested
> ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
> ESLINT += --format tap
> MOCHA += --reporter tap
> else
> ESLINT += --format unix
> MOCHA += --reporter dot
> endif
>
>
> ...and then call $(ESLINT)/$(JEST)/$(MOCHA) in target rules.
>

Right, though implementing "terse" is another matter.

Instead of making other packages know about eslint internals,
wouldn't it be simpler to make eslint default to a reporter that "just
works" ?

Currently enigmail just naively calls "eslint --quiet", and its .eslintrc
are innocent,
they don't select a particular output.

I stand by saying as it is, putting those packages:
node-chalk
node-strip-ansi
node-text-table
in Recommends just breaks the default functionality of eslint.

Jérémy


Bug#1010471: [Pkg-javascript-devel] Bug#1010471: eslint: please move Recommends to Depends

2022-05-02 Thread Jonas Smedegaard
tags -1 wontfix

Quoting Jérémy Lal (2022-05-02 09:50:54)
> I was trying to fix "enigmail" FTBFS, and discovered that it was 
> simply missing all the packages that "eslint" recommends.
> 
> enigmail
> Build-Depends:
>  eslint ,
>  node-chalk ,
>  node-strip-ansi ,
>  node-text-table 
> 
> Those three packages are not explicitely called by enigmail's eslintrc 
> config: they should just be in eslint Depends, because they are 
> required to make eslint work.

Those are not _always_ needed for eslint, only _often_ which is the 
exact purpose of "Recommends.

Please include those recommended packages as build-dependencies, or 
patch/override configuration to not use them: They are related to how 
eslint outputs information, and since ideally packaging should be 
verbose/terse depending on build flags you would want to manage such 
configuration anyway.

I commonly add something like this near the top of the rules file:

ESLINT = NO_COLOR=1 eslint
JEST = jest --color=false
MOCHA = NO_COLOR=1 mocha --no-timeout --no-color
# normalize output with TAP where possible unless terse requested
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
ESLINT += --format tap
MOCHA += --reporter tap
else
ESLINT += --format unix
MOCHA += --reporter dot
endif


...and then call $(ESLINT)/$(JEST)/$(MOCHA) in target rules.


Hope that helps,

 - Jonas

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

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature