-
Notifications
You must be signed in to change notification settings - Fork 461
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
libsass 3.4: file context fails on missing input path, event though it is provided in constructor #2257
Comments
From looking at git blame the culprit might be 6a5444b, if I remove the call to Adding a |
recent libsass (3.4) resets the original context when setting an option (sass/libsass#2257) causing the input_path to be lost (#244). here we set the options directly on file_ctx which is a subclass of options - this might break in the future if file_ctx no longer sub-classes options. oh well.
@mgreter Ah - sorry, I did not notice that. The problem is still with libsass 3.4.0. The example exhibits the problem, If I change it to (astroidmail/astroid@b44b9fc):
it works. (on a side note: should I free |
OK, I was able to verify the issue on linux. Could not reproduce on windows with mingw64 and msys2. |
Can you try out the fix in #2259 ? Btw. your code can also be fixed to work with current version: struct Sass_File_Context* file_ctx = sass_make_file_context(scsspath);
struct Sass_Context* context = sass_file_context_get_context(file_ctx);
struct Sass_Options* options = sass_file_context_get_options(file_ctx);
sass_option_set_precision(options, 1);
sass_option_set_source_comments(options, true);
- sass_file_context_set_options(file_ctx, options);
int status = sass_compile_file_context (file_ctx); No need to set options again. They are infact the same object. You mostly just need that function if you create options via |
Hi @mgreter, thanks - your proposed fix works fine (and should be portable if you decide to change the class structure later on). I do not have libsass set up in a development environment at the moment, so I won't have the time to test #2259 now unfortunately. It does look like it would fix the issue though. |
recent libsass (3.4) deletes the original context when setting an option (sass/libsass#2257). here we get the options, and set the option without re-setting the options object.
Closing as resolved |
Thanks 😊
ons. 21. des. 2016 kl. 01.10 skrev Marcel Greter <notifications@github.com>:
… Closing as resolved
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2257 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AADd-7E5sivtMGP7bTl119Ti0qetcFr5ks5rKG5ygaJpZM4LRhQL>
.
|
Using file context with libsass based on example fails on libsass 3.4
Hi,
I am using libsass based on the example provided for the file context here. However, I've had multiple reports of breakage (astroidmail/astroid#248, astroidmail/astroid#244) with libsass 3.4.0 (default on Debian and Arch Linux), getting the error:
I am loading sass in this way (https://github.com/astroidmail/astroid/blob/master/src/modes/thread_view/theme.cc#L96):
version info:
The text was updated successfully, but these errors were encountered: