Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-37714

js-builder bundle transform not taking dedupe into account when translating fullPaths to Ids

    Details

    • Similar Issues:
    • Epic Link:
    • Sprint:
      1.0-beta-1

      Description

      js-builder does some transforms on the browserify bundles as part of it's "thing". At the very end, it translates the bundle pack entry IDs from being long "fullPath" IDs to short numbers. Something we missed in this was how browserify dedupes bundle pack entries that are identical, with the deduped pack entry containing the pack ID ... we need to find these too and translate the pack IDs here too.

        Attachments

          Issue Links

            Activity

            Hide
            tfennelly Tom FENNELLY added a comment -

            BTW ... these duplicates seem to be happening because of deps being dragged in by jsonwebtoken, where these deps are also deps of other packages, but having different versions. The diff versions results in npm hanging them on subbranches down inside node_modules, which means they end up having different paths and fullPath IDs, but often having identical module file content => resulting in the dedupe.

            Show
            tfennelly Tom FENNELLY added a comment - BTW ... these duplicates seem to be happening because of deps being dragged in by jsonwebtoken, where these deps are also deps of other packages, but having different versions. The diff versions results in npm hanging them on subbranches down inside node_modules, which means they end up having different paths and fullPath IDs, but often having identical module file content => resulting in the dedupe.
            Hide
            tfennelly Tom FENNELLY added a comment -
            Show
            tfennelly Tom FENNELLY added a comment - Have a Wip PR: https://github.com/jenkinsci/js-builder/pull/8
            Hide
            tfennelly Tom FENNELLY added a comment -

            And the BlueO PR pulling in the js-builder fixes ... https://github.com/jenkinsci/blueocean-plugin/pull/444

            Show
            tfennelly Tom FENNELLY added a comment - And the BlueO PR pulling in the js-builder fixes ... https://github.com/jenkinsci/blueocean-plugin/pull/444
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Tom Fennelly
            Path:
            internal/bundlegen.js
            internal/pipeline-transforms/require-stub-transform.js
            package.json
            spec/modules/dedupe-main.js
            spec/modules/dedupe-one.js
            spec/modules/dedupe-two.js
            spec/require-stub-transform-spec.js
            http://jenkins-ci.org/commit/blueocean-js-builder/b2e6eedcc7e775aa879ec5ef5f1a477715e3ac5e
            Log:
            JENKINS-37714 Take dedupe into account when translating fullPaths to Ids (#8)

            • [FIX JENKINS-37714] Take dedupe into account when translating fullPaths to Ids
            • 0.0.38-beta2
            • Search for the list of modules to be imported using a rouch string search

            Vs using a require transform and explicitly searching the require statements, which can fail ala https://github.com/benbria/browserify-transform-tools/issues/23

            • 0.0.38-beta3
            • 0.0.38
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Tom Fennelly Path: internal/bundlegen.js internal/pipeline-transforms/require-stub-transform.js package.json spec/modules/dedupe-main.js spec/modules/dedupe-one.js spec/modules/dedupe-two.js spec/require-stub-transform-spec.js http://jenkins-ci.org/commit/blueocean-js-builder/b2e6eedcc7e775aa879ec5ef5f1a477715e3ac5e Log: JENKINS-37714 Take dedupe into account when translating fullPaths to Ids (#8) [FIX JENKINS-37714] Take dedupe into account when translating fullPaths to Ids 0.0.38-beta2 Search for the list of modules to be imported using a rouch string search Vs using a require transform and explicitly searching the require statements, which can fail ala https://github.com/benbria/browserify-transform-tools/issues/23 0.0.38-beta3 0.0.38

              People

              • Assignee:
                tfennelly Tom FENNELLY
                Reporter:
                tfennelly Tom FENNELLY
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: