Ughhhhhhhhhhhhhhhhhhhhhh source maps #205
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change the default value of source maps to
[1, 0]
since since[0, 0]
is an invalid line number.Unfortunately even with this value it will sort circuit
combine_source_maps
method which is used when building coffee script source maps and sass source maps. I fixed this issue by adding a default value check. I'm not 100% sure it's the right thing to fix things.Another potential fix is to not call this method inside of the
coffee_script_processor
heresprockets/lib/sprockets/coffee_script_processor.rb
Line 27 in 030b7cc
Another possible solution would be as previously suggested in #203 (comment) to " replace [the default source map] with the actual source maps of the root file". This is kinda what the above solutions are doing for coffee and sass files, but falling short for non-compiled files like js and css. All in all, i'm not sure how to move forwards on that angle.
There's 4 failing tests that need to be updated, this is going to be a tough process since the values are not easily produced by another verifiable source. I'll see what I can do later.