Skip to content

Caching problems #7

@greew

Description

@greew

After having upgraded from 1.0.9 to 1.5.1, the caching no longer works as expected.

As an example - I have three files:

# a.scss
@import 'b';
@import 'c';

body {
    height: 100%;
}

# b.scss
body {
    height: 100%;
}

# c.scss
body {
    height: 100%;
}

This produces the following metafiles

# Version 1.5.1
a:3:{s:4:"etag";s:32:"601fc4bcc19b878a97a57ae8927cd4e5";s:7:"imports";a:2:{s:33:"/var/www/css/theme/othello/b.scss";i:1636627636;s:33:"/var/www/css/theme/othello/c.scss";i:1636627636;}s:4:"vars";i:2723407904;}

# Version 1.0.9
a:3:{s:4:"etag";s:32:"ce69e5d65310f5daaec2885e5d070987";s:7:"imports";a:3:{s:33:"/var/www/css/theme/othello/a.scss";i:1636627636;s:33:"/var/www/css/theme/othello/b.scss";i:1636627636;s:33:"/var/www/css/theme/othello/c.scss";i:1636627636;}s:4:"vars";i:2723407904;}

The version 1.0.9 also includes the a.scss file, but version 1.5.1 does not.

I can see that when

'imports' => $this->makeParsedFilesFromIncludeFiles($result->getIncludedFiles()),
changed from $this->scss->getParsedFiles() to the current version, the original file isn't anymore a part of the returned filed.

I'd like to help and mostly need to know, whether the line https://github.com/scssphp/scssphp/blob/eba0633bf8a527738d2aca210b4a0cb182599c5d/src/CompilationResult.php#L54 ought to also include the originally parsed file, or if we should add it manually in this repository?

Best regards
/Jesper

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions