-
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 errors #99
Merged
Merged
Improve errors #99
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
Make some Bad Argumement messages from builtin functions match dart-sass.
Also, mark optional arguments as having a default null value.
With massive refactor of fuction declaration macros and formal args.
Fix detection of expected errors in spectest.
Mainly handlig the modules argument.
It was simple enough and only used once.
kaj
added a commit
that referenced
this pull request
Mar 14, 2021
Progress: 3371 of 5945 tests passed in dart-sass compatibility mode. ### Breaking changes * The unit of a `Numeric` is now a `UnitSet` rather than a `Unit`. * `Error` has new variants and a new field in `BadArguments`. * A sass::Value::Call now has a source position. * A `Rational` is now a `Ratio<i64>` rather than a `Ratio<isize>`. ### Improvements * Added a Contributing section to readme. * Handle values with multiple units. PR #97. * Show call position for errors in function calls, and test for type errors in many standard functions. Many error messages are made identical to dart-sass, improving test-suit progress with more than 400 tests. PR #99. * Fix issue #98: overflow in rational number arithmetic. * Allow `@at-root` at document root. * Boolean operators is truly lazy, e.g. `false and f($x)` does not call `f`. * Refactored number parsing to use overflowing rationals. PR #100. * Test suite sass-spec updated to 2021-03-02. * Updated num-rational and num-bigint to 0.4.0. Thanks to @alvra for reporting #98. Tested with rustc 1.50.0 (cb75ad5db 2021-02-10), rustc 1.48.0 (7eac88abb 2020-11-16), rustc 1.46.0 (04488afe3 2020-08-24), rustc 1.44.1 (c7087fe00 2020-06-17), rustc 1.51.0-beta.6 (6a1835ad7 2021-03-12), and rustc 1.52.0-nightly (acca81892 2021-03-13).
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.
Detect bad arguments to built-in functions and format error messages to look like dart-sass.
Also, lots of fixes in the built-in functions. This PR is way to large, I got a bit carried away.