Bug#1003260: leaflet-image: FTBFS with webpack5: Invalid configuration object

2022-01-26 Thread Jonas Smedegaard
Hi Caleb,

Quoting Caleb Adepitan (2022-01-26 12:27:10)
> Concerning the bug report where leaflet-image build with webpack 5 
> breaks due to an invalid configuration object, the major problem 
> wasn't from the configuration object, but the `-d` option passed in 
> build script in `debian/rules` which specifies a devtool option that 
> has become "more strict" in webpack 5. This option passed in the build 
> script overrides that in the config file.
> 
> The `node` option targeted to mock Node.js fs module with an empty 
> object is also no longer relevant. See 
> https://webpack.js.org/configuration/resolve/#resolvefallback
> 
> Here's a patch that shows my changes: 
> https://salsa.debian.org/calebpitan/leaflet-image/-/commit/ff6837954c29706d5154c9d9abb54f92ad0171b2.patch

Thanks, I did indeed not notice the relevancy of the -d option.

Unfortunately I cannot tell if your proposed patch is working or not, 
however - seems webpac5 is broken in experimental currently (undeclared 
dependency on node-import-local - which by the way horribly pulls in a 
pile of unneeded packages including babel - and even then webpack throws 
error - and horribly does not fail but continues with - I assume - 
broken code). :-(

Let's continue this when webpack5 in experimental works.


 - 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#1003260: leaflet-image: FTBFS with webpack5: Invalid configuration object

2022-01-26 Thread Caleb Adepitan

Hi Jonas,

Concerning the bug report where leaflet-image build with webpack 5 
breaks due to an invalid configuration object, the major problem wasn't 
from the configuration object, but the `-d` option passed in build 
script in `debian/rules` which specifies a devtool option that has 
become "more strict" in webpack 5. This option passed in the build 
script overrides that in the config file.


The `node` option targeted to mock Node.js fs module with an empty 
object is also no longer relevant. See 
https://webpack.js.org/configuration/resolve/#resolvefallback


Here's a patch that shows my changes: 
https://salsa.debian.org/calebpitan/leaflet-image/-/commit/ff6837954c29706d5154c9d9abb54f92ad0171b2.patch


OpenPGP_0x8A1B2CC96775D2D7.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Bug#1003260: [Pkg-javascript-devel] Bug#1003260: leaflet-image: FTBFS with webpack5: Invalid configuration object

2022-01-07 Thread Jonas Smedegaard
Control: tag +help

Quoting Caleb Adepitan (2022-01-07 05:47:38)
> We are starting to build against webpack5 in experimental and the 
> package needed for local build is webpack and node-webpack-source from 
> experimental.
> During a test rebuild, leaflet-image was found to fail to build [with 
> webpack5].

> [webpack-cli] Invalid configuration object. Webpack has been initialized 
> using a configuration object that does not match the API schema.
>   - configuration.devtool should match pattern 
> "^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$".
> BREAKING CHANGE since webpack 5: The devtool option is more strict.
> Please strictly follow the order of the keywords in the pattern.

I fail to understand what causes this failure more specifically.

File debian/webpack.config.js defines the devtool value like this:

> devtool: 'source-map',

That syntax seems perfectly valid to me, consulting 
https://webpack.js.org/configuration/devtool/#devtool


 - 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