Skip to content

Conversation

@nex3
Copy link
Contributor

@nex3 nex3 commented Mar 8, 2025

This also deprecates user-defined functions named "type".

See #2539

[see sass/sass#4045]
[see sass/sass-spec#2051]

@nex3 nex3 requested a review from Goodwine March 10, 2025 21:37
@nex3 nex3 marked this pull request as ready for review March 10, 2025 21:37
This also deprecates user-defined functions named "type".

See #2539
Comment on lines +169 to +175
/// Deprecation for functions named "type".
typeFunction(
'type-function',
deprecatedIn: '1.86.0',
description: 'Functions named "type".',
),

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

off-topic: for whatever reason when I generate the deprecations I end up getting a different formatting, like:

  typeFunction('type-function', deprecatedIn: '1.86.0',
    description: 'Functions named "type".'),

do you happen to know what that would be? this is when running dart run grinder... I guess I may have some config file somewhere that tells dart to behave this way 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw something similar and I couldn't figure out exactly what it was. The Dart formatter is in the process of rolling out new changes so it's probably something related to that, but I don't know what exactly. I suspect making the generator add a trailing comma would force it to behave the same way for both the old and new formatter logic, though.

@nex3 nex3 merged commit c6706e7 into main Mar 17, 2025
39 checks passed
@nex3 nex3 deleted the attr-type branch March 17, 2025 21:30

if (operator == BinaryOperator.modulo && !_lookingAtExpression()) {
addSingleExpression(StringExpression.plain(
'%', scanner.spanFromPosition(scanner.position - 1)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this take the position before consuming whitespaces, so that it is actually the operator span ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's true. Want to send a fix?

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.

4 participants