-
Notifications
You must be signed in to change notification settings - Fork 350
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
Null check operator used on a null value error since 1.76.0 #2239
Comments
I cannot reproduce your concern. Can you please provide more details on how you're running sass, and if you have more sass files? |
dart-sass/lib/src/util/map.dart Lines 22 to 24 in 85f39d5
This code path is used for importer caching. So for us to help you we really need to know how you're invoking Sass. Are you using |
This is part of a massive Rails build using Sprockets and sassc. The gems being used are dartsass-sprockets (3.1.0) The sass code that's throwing the crash comes from @UPPY, so I have the following import statement which causes the crash. This file imports another file with a bunch of variable initializations using the !default syntax. @import '@uppy/core/src/style.scss'; I'm not sure how to break it down more than that. Everything works at 1.75.0 and then breaks with 1.76.0 and 1.77.0.
|
Here is a bare minimum reproduction with embedded-host-node: npm i sass-embedded @uppy/core const sass = require('sass-embedded')
const input = `
@import '@uppy/core/src/style';
@import '@uppy/core/src/style';
`;
sass.compileString(input, {
importers: [
{
findFileUrl () {
return null
}
}
],
loadPaths: ['does_not_resolve', 'node_modules']
}) Very same reproduction for embedded-host-ruby: require 'sass-embedded'
input = <<~SCSS
@import '@uppy/core/src/style';
@import '@uppy/core/src/style';
SCSS
begin
Sass.compile_string(
input,
importers: [
{ find_file_url: ->(*) {} }
],
load_paths: ['does_not_resolve', 'node_modules']
)
rescue Sass::CompileError => e
puts e.full_message
end |
@nex3 Actually the bug is more than just this... In summary the condition is that:
In the ruby host we crash in the test case above because I delayed the implementation of tracking access of containing_url, and the first condition met. However, in embedded-host-node, it met the first condition because I forget to setting Preparing a PR right now. |
@esb https://rubygems.org/gems/sass-embedded/versions/1.77.1 has been released. Please give it a try. |
I have tested 1.77.1 in my environment and can report that the issue appears to have been resolved. |
The SASS default handling now throws an exception since release 1.76.0
This code causes the error
This is from the Ruby gem sass-embedded. Reverting to release 1.75.0 solves the problem.
The text was updated successfully, but these errors were encountered: