Page MenuHomeSoftware Heritage

webpack/weblabels-plugin: Fix Web Labels table in production mode
ClosedPublic

Authored by anlambert on Mar 12 2021, 5:05 PM.

Details

Summary

Recent changes in webpack modified the content of the JSON stats object
when compiling assets in production mode. Notably a module chunk is now
identified by an integer instead of its name.

So add an extra mapping between a chunk id and its name in order to fix
the generated Web Labels table.

This plugin definitely needs to have some tests.

@vlorentz started this work in D1215 but I will create a task to not forget
about it.

Diff Detail

Repository
rDWAPPS Web applications
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 19883
Build 30883: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 30882: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D5241 (id=18785)

Rebasing onto 20da34e958...

Current branch diff-target is up to date.
Changes applied before test
commit 584887952476547dbdeba04eb9bdf227d2b537e1
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Mar 12 16:54:56 2021 +0100

    webpack/weblabels-plugin: Fix Web Labels table in production mode
    
    Recent changes in webpack modified the content of the JSON stats object
    when compiling assets in production mode. Notably a module chunk is now
    identified by an integer instead of its name.
    
    So add an extra mapping between a chunk id and its name in order to fix
    the generated Web Labels table.

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/621/ for more details.

I will create a task to not forget about it.

T3122

This revision is now accepted and ready to land.Mar 15 2021, 10:31 AM