Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
matthew-dean opened this issue May 8, 2016 · 19 comments
Closed

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

matthew-dean opened this issue May 8, 2016 · 19 comments

Comments

@matthew-dean
Copy link
Member

matthew-dean commented May 8, 2016

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.

@matthew-dean matthew-dean changed the title Source map bug introduced in 2.7.0. Source map bug introduced in 2.7.0, but passes tests May 8, 2016
@matthew-dean
Copy link
Member Author

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.

@wolfy1339
Copy link

wolfy1339 commented May 8, 2016

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

@sunnylqm
Copy link

sunnylqm commented May 9, 2016

better unpublish this version

@seven-phases-max
Copy link
Member

better unpublish this version

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

@antoineol
Copy link

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));

@felixfbecker
Copy link

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

@icecreamliker
Copy link

icecreamliker commented May 9, 2016

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.

@olivierlesnicki
Copy link

olivierlesnicki commented May 9, 2016

Production chaos on this side as well...

@BramVanBerkel
Copy link

Crashes my gulp build as well

@oBusk
Copy link

oBusk commented May 9, 2016

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

@gilly3
Copy link

gilly3 commented May 9, 2016

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 less@2.7.0

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

@ReidBraswell
Copy link

Any line of sight for a fix on this yet?

nknapp added a commit to bootprint/customize-engine-less that referenced this issue May 9, 2016
@matthew-dean
Copy link
Member Author

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.

nknapp added a commit to bootprint/customize-engine-less that referenced this issue May 9, 2016
- less/less.js#2896 was fixed in this version of less
@felixfbecker
Copy link

works for me, thanks @matthew-dean

@nknapp
Copy link

nknapp commented May 9, 2016

the bootprint-integration-test had failed with less@2.7.0 and it succeeds with 2.7.1. Works for me. Thanks @matthew-dean

@matthew-dean
Copy link
Member Author

matthew-dean commented May 9, 2016

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

@olivierlesnicki
Copy link

@matthew-dean good job

@matthew-dean
Copy link
Member Author

@olivierlesnicki 👍

@Piyamas2507
Copy link

Piyamas2507 commented May 27, 2016

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
Projects
None yet
Development

No branches or pull requests