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

Skip mappings with nil importer in Source::Map#to_json #2092

Merged
merged 1 commit into from
Jul 8, 2016

Conversation

djudd
Copy link

@djudd djudd commented Jun 29, 2016

This was already happening in the case where options[:type] != :inline, but would cause an error in the case of :inline

I'm not sure exactly under what circumstances this condition was triggered, or if it's a valid state, but it occurred in my production Rails app, and an equivalent monkeypatch got everything working.

This was already happening in the case where `options[:type] !=
:inline`, but would cause an error in the case of :inline
@chriseppstein
Copy link

It seems to me that the issue is with this line. Skipping when there's no importer shouldn't be necessary in the case of :inline as we have the contents of the file (E.g. this may be the case when reading from stdin).

@nex3 knows this part of the code better than me, so I'll defer to her.

@nex3
Copy link
Contributor

nex3 commented Jul 8, 2016

I think this is correct. Even though we should have the source text for the file somewhere, we don't have any means of accessing it in this code except through the importer, which may not exist. If we want source maps generated for importer-less templates, it may be necessary to refactor the code such that they always have an importer of some sort.

@nex3 nex3 merged commit f7ff268 into sass:stable Jul 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants