-
Notifications
You must be signed in to change notification settings - Fork 357
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
update flag doesn't work with absolute source paths #2199
Comments
In #2077, we (correctly) fixed a bug by making the current importer for a given file unable to load absolute URLs. Now absolute URLs are only ever handled by the set of importers the user passes in explicitly. However, this means that if the user doesn't pass in any importers that can handle absolute The first knock-on issue is the one reported here. In the stylesheet graph we use to determine when updates are necessary, the import cache doesn't have a global The second knock-on issue is maybe even worse: stylesheets compiled by path on the CLI can't load absolute The third knock-on issue is actually much broader, and actually predates #2077. The question is: what filesystem importer do we add to the import cache to fix the previous two issues? And we don't currently have a good answer. The problem is that there's currently only one type of filesystem importer: it takes a load path as an argument and handles both absolute Our current standard answer to this is |
The latest 1.74.1 release has fixed the issue for the user of our library, thanks! I won't close the issue as there's still a task open, but from my point of view it's fixed. |
FilesystemImporter.cwd
(Better handle filesystem importers when load paths aren't necessary #2203)FilesystemImporter.cwd
Hi,
I've run into a problem when using the
--update
flag with the cli and specifying an absolute path for the source file/directory. It seems to always update the output .css file(s) even if the scss file hasn't changed. This is causing a problem in a project that I maintain which integrates the dart-sass executable in a C#/ASP.NET Core application. This project is using the dart vm version which we download directly from the GitHub release assets.I've tried the following to come to the conclusion that it has something to do with specifying an absolute path for the source file/folder (I only tested this on Linux):
sass folder:folder --update
, this works as expected and only updates the css when the scss has changedsass /absolute/path/to/folder:/absolute/path/to/folder --update
orsass /absolute/path/to/folder:folder --update
, this will always update the output .css filesass folder:/absolute/path/to/folder --update
, this works as expected and only updates the css when the scss changes.Interestingly, if I specify a folder as a source and run the command multiple times it also tries to (re)compile the css file that was generated the first time. This succeeds only some of the time and fails with an error other times.
I've tried it on multiple older versions and it seems to happen since version 1.67.0. In version 1.66.1 it does work correctly.
Thanks in advance!
The text was updated successfully, but these errors were encountered: