-
Notifications
You must be signed in to change notification settings - Fork 27
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
Improve relative path handling for @use
#137
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kaj
force-pushed
the
use-path-stuff
branch
4 times, most recently
from
April 20, 2022 18:11
91340c8
to
c52b8a1
Compare
kaj
force-pushed
the
use-path-stuff
branch
5 times, most recently
from
May 14, 2022 20:28
c7a03cc
to
5ddf0a3
Compare
This should fix some problems with relative paths in `@use`, while making some more error messages dart-sass compatible and maybe exposing a windows path problem.
Paths in sass are url paths, but the path to the initial file to open from command-line or api is a std::fs::Path. On unix this does not really matter, but on other operating systems, like windows, there might be important differences. So isolate the std::fs::Path handling to where it is needed and try to keep the url-path handling clean in other places.
Fixes #139. Plain css `@import` rules is only allowed on a few condtions. Currently rsass considers any unresolved `@import` a plain css import, but in many cases it should signal an error instead. https://sass-lang.com/documentation/at-rules/import#plain-css-imports
kaj
added a commit
that referenced
this pull request
May 17, 2022
Released 2022-05-17 (On the Norwegian Constitution day 🇳🇴). Progress: 4331 of 6523 tests passed in dart-sass compatibility mode. * Update minimum supported rust version to 1.49.0 (from 1.45.2). * `SourceFile.parse()` now returns a `Result<Parsed>` rahter than a `Result<Vec<sass::Item>>`, and `Format::write_root` now takes a `Parsed` (PR #140). * `FsFileContext::file` is replaced by `FsFileContext::for_path`, which initializes a file context and loads a file from it (PR 137). * Hopefully improved relative file finding on windows (PR #137). * Plain css `@import` rules is only allowed [on a few condtions](https://sass-lang.com/documentation/at-rules/import#plain-css-imports), in other cases an error is reported (Issue #139, PR #137). * Rsass can now parse (some) plain css as well as scss. Css files can be referenced in `@use` and `@import` directives, as well as in the `meta.load-css` mixin (PR #140). * Make the `calc(...)` function signal an error when args are known to be invalid css (PR #138). * Change `map.deep-merge` to match recent change in dart sass. * Minor fix in whitespace around at-rules. * Instrumented attempted file loading with `tracing` (PR #137). * Fix a typo in LICENSE (Issue #136). * Update sass-spec test suite to 2022-05-10. * Make rust version of sass-spec more directory-aware (which fixes one of 5825 tests). * Use a crates badge that actually works. Thanks to @jonassmedegaard for #136, and to @fasterthanlime for reporting the problem that #137 attempts to fix.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should fix some problems with relative paths in
@use
, while making some more error messages dart-sass compatible.It also exposes, and hopefully fixes, a windows path problem, first reported by @fasterthanlime on twitter, and fixes #139.