Skip to content

Source map bug introduced in 2.7.0, but passes tests #2896

Closed

Description

@matthew-dean

Will put out a hotfix soon if the fix can be confirmed. It looks like PR #2834 introduced a bug that produces a blank source map, and throws an error like:

Invalid mapping: {"generated":{"line":1103,"column":2},"source":"file.less","original":{"line":1,"column":null},"name":null}

(Also discussed at #2881.)

Reverting #2834 seems to fix it, but looking for confirmation.

Activity

  1. changed the title [-]Source map bug introduced in 2.7.0.[/-] [+]Source map bug introduced in 2.7.0, but passes tests[/+] on May 8, 2016
  2. matthew-dean commented on May 8, 2016

    @matthew-dean
    MemberAuthor

    This issue should stay open until a Less.js test is added which catches this issue, since the source map tests didn't detect the bug.

  3. wolfy1339 commented on May 8, 2016

    @wolfy1339

    I'm experiencing the same issue.
    I executed a git bisect and the first commit that broke the build was 470af20 which is in the PR you noted in your issue

  4. sunnylqm commented on May 9, 2016

    @sunnylqm

    better unpublish this version

  5. seven-phases-max commented on May 9, 2016

    @seven-phases-max
    Member

    better unpublish this version

    It depends. For some the sourcemaps are totally insignificant if compared to for example #2841 of the previous release.

  6. antoineol commented on May 9, 2016

    @antoineol

    In case it can help, I could reproduce the issue with something like:

    Less:

    .dl-horizontal {
        @media (min-width: 768px) {
            dt {
                float: left;
            }
        }
    }

    Gulp task:

    return gulp.src('./src/lib.less')
        .pipe(sourcemaps.init())
        .pipe(less())
        .pipe(sourcemaps.write('.'))
        .pipe(gulp.dest(bundleFolder));
  7. felixfbecker commented on May 9, 2016

    @felixfbecker

    This just broke my builds, need a patch asap...

  8. icecreamliker commented on May 9, 2016

    @icecreamliker

    Please fix this bug asap, or I can only froze the version to 2.6.X.
    And I wish this bug could be fixed before tomorrow morning.
    Appreciate it very much.

  9. olivierlesnicki commented on May 9, 2016

    @olivierlesnicki

    Production chaos on this side as well...

  10. BramVanBerkel commented on May 9, 2016

    @BramVanBerkel

    Crashes my gulp build as well

  11. oBusk commented on May 9, 2016

    @oBusk

    If you're having trouble with a dependency using less as a dependency and simply can't downgrade in package.json.
    Do a npm shrinkwrap --dev and then modify the version of less to 2.6.1 then full npm reinstall will fix it until less.js is fixed

  12. gilly3 commented on May 9, 2016

    @gilly3

    Clearly the impact is widespread. It blocked my production release. Yes, please implement a hotfix, and provide workarounds, but in the meantime, for the love of all that is good and holy:

    $ npm unpublish [email protected]
    

    Unless you will have 2.7.1 published within, say, the next hour, nip this in the bud and unpublish.

  13. ReidBraswell commented on May 9, 2016

    @ReidBraswell

    Any line of sight for a fix on this yet?

  14. added a commit that references this issue on May 9, 2016
  15. matthew-dean commented on May 9, 2016

    @matthew-dean
    MemberAuthor

    I've published 2.7.1 as a hotfix for 2.7.0, but it's unclear from #2881 if there isn't still an outstanding bug affecting source maps (multiple intersecting bugs from same commit?), or if that was a pre-existing bug which was introduced separately.

    Please report back if 2.7.1 is working for you.

  16. added a commit that references this issue on May 9, 2016
  17. felixfbecker commented on May 9, 2016

    @felixfbecker

    works for me, thanks @matthew-dean

  18. nknapp commented on May 9, 2016

    @nknapp

    the bootprint-integration-test had failed with [email protected] and it succeeds with 2.7.1. Works for me. Thanks @matthew-dean

  19. matthew-dean commented on May 9, 2016

    @matthew-dean
    MemberAuthor

    Awesome. Sorry for the broken build everyone, but glad it's working now. Will close this.

  20. olivierlesnicki commented on May 9, 2016

    @olivierlesnicki

    @matthew-dean good job

  21. matthew-dean commented on May 9, 2016

    @matthew-dean
    MemberAuthor
  22. Piyamas2507 commented on May 27, 2016

    @Piyamas2507

    Hi, If my project have been compile all less file to css file already with chrun2 program.
    I'm not use less.js.
    Could you tell me how to do about debug css show less in get element inspector develope.
    How to config sauce map?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions