Skip to content
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 importer 'contents' invalid type tests to bogus object rather … #1837

Closed
wants to merge 1 commit into from

Conversation

Goodwine
Copy link
Member

@Goodwine Goodwine commented Nov 5, 2022

…than a Buffer

The Buffer seems to be replaced as a string correctly in dart-sass-embedded, making these tests fail for the wrong reason. Instead of failing for the wrong type it was failing for invalid Sass.

See - #1834

…than a Buffer

The Buffer seems to be replaced as a string correctly in dart-sass-embedded, making these tests fail for the wrong reason. Instead of failing for the wrong type it was failing for invalid Sass.

See - #1834
@Goodwine
Copy link
Member Author

Goodwine commented Nov 5, 2022

NVM it seems like dart-sass-embedded just renders it like a toString() 🤔

@ntkme
Copy link
Contributor

ntkme commented Nov 6, 2022

For embedded-host-node, it only sets a string on protobuf messages:

  • Whether a type can be converted to string or not is actually done via protobuf, therefore the printed error message is not the same.
  • When a type can be converted to string, protobuf will implicitly convert it as string, and then for URL it will be checked on the dart side, thus again producing a different error message.

Finally there is an issue where if an object is implicitly converted to a string sourceMapUrl, and the sourceMapUrl is not absolute, the dart side do thrown an error but span is missing.

@Goodwine
Copy link
Member Author

Goodwine commented Nov 8, 2022

I see where to make the fixes now, I will revert this PR and reopen another with updated tests in a bit

@Goodwine Goodwine closed this Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants