-
Notifications
You must be signed in to change notification settings - Fork 460
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
Regression in 'inline source comments' and 'source map mappings' #1513
Comments
Apparently it is happening with those changes inclusive; as my libsass submodule is pointing to 702ac5a: |
@mgreter, also tested with stable release v3.2.5 of libsass and sassc:
With current master, it is producing: /* line 1, C:/temp/test.scss */
.a {
color: #000; }
/* line 3, C:/temp/test.scss */
.b {
color: #001; }
/* line 7, C:/temp/test.scss */
.c {
color: #002; } The drive letter is present in latest, but line numbers are incorrect. |
Can you please try #1515 |
Thanks @mgreter, thanks! I can confirm that #1515 fixed the line number (source comment) issue. 👍 The last failing test is about source-mappings difference: https://travis-ci.org/am11/node-sass/jobs/78265337#L1898-L1916. Could it be due to the improvement in source map since the last release? |
Yes, source-mapping was slightly updated and improved ... |
Thanks @mgreter. We will probably need to update the expected output in node-sass test fixture. In any event, I wanted to run the difference by you before we lock it down. :) Input ( #navbar {
width: 80%;
height: 23px;
}
#navbar ul {
list-style-type: none;
}
#navbar li {
float: left;
a {
font-weight: bold;
}
} Compiled with: cd node-sass
node bin/node-sass test/fixtures/source-map/index.scss --source-map=true /test/fixtures/source-map/index.css Produces: #navbar {
width: 80%;
height: 23px; }
#navbar ul {
list-style-type: none; }
#navbar li {
float: left; }
#navbar li a {
font-weight: bold; }
/*# sourceMappingURL=index.css.map */ node-sass 3.3.2 (=> libsass 3.2.5) decompiled mappings on left and that produced with your branch |
Have you tried my source-map inspector? With it I was able to confirm the validity in 1 minute 🚑 |
Wow, The inspector is super helpful! 💯 Confirm that both the outputs are accurate and we will only need to update the node-sass test after libsass v3.3 is shipped. |
Yeah, I needed something that works, otherwise source-maps are nearly undebugable ... |
@mgreter Would that be possible to be able to paste the suspected "incorrect" source map into the inspector third window and browse that? I can paste a different map but when I click "Inspect" it switches to the generated map automatically. Another wish item from me would be to save some horizontal screen space - I think the leftmost column can go away complete - I tried to have two browser windows side-by-side with two times source map tool to compare the "bad" map and the "good" map. Would be cool to save space a bit :) |
@saper have you tried "[Analyze]". The whole UI and functionality is just hacked together, so from this point I would need to refactor it quite a bit to add more features. Also the UI is very much static and not that easy to change from this point on (it's really just a POC), but I may be able to hack some more specific js together to close the left panel ... |
What does [analyze] do? |
It should analyze the output, so you should be able to paste your own results into the output textarea.
|
@am11 saper/node-sass@5aafff7 includes the patched test, so now node-sass tests should pass. You only need to manually update libsass to bd8b50a and then you can try sass/node-sass#1040 |
Thanks @mgreter will try that one! |
With the latest libsass: 702ac5a, two of the node-sass tests are failing
https://travis-ci.org/am11/node-sass/jobs/78170861#L1888-L1937.
The first one is about source comment and is referring to this input and the corresponding expected output. The line number is off by 2 in the actual output.
The second failure is related to source-map mappings, here is the diff of decoding: https://www.diffnow.com/?report=bohl1 (left: old, right: new). Though, I have not verified yet whether old behavior was correct in this test case or the new one.
The text was updated successfully, but these errors were encountered: