You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "laglangyue (via GitHub)" <gi...@apache.org> on 2024/04/14 06:50:13 UTC
[PR] fix scalafmt HeadersSpec error because illegal unicode [pekko-grpc]
laglangyue opened a new pull request, #297:
URL: https://github.com/apache/pekko-grpc/pull/297
## motivation
can't execute sbt scalafmtAll
```
invalid unicode surrogate pair
[error] ("my favorite character is \ud801", "my favorite character is ?")
```
according to test in grpc-java, we should use 0xD801.toChar
https://github.com/grpc/grpc-java/blob/79e75bace40cea7e4be72e7dcd1f41c3ad6ee857/api/src/test/java/io/grpc/StatusTest.java#L82-L92
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] chore:fix scalafmt HeadersSpec error because illegal unicode [pekko-grpc]
Posted by "raboof (via GitHub)" <gi...@apache.org>.
raboof commented on PR #297:
URL: https://github.com/apache/pekko-grpc/pull/297#issuecomment-2077268948
huh, I could've sworn this syntax was allowed in Scala, but indeed I don't see it in https://scala-lang.org/files/archive/spec/2.13/01-lexical-syntax.html#string-literals
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] chore:fix scalafmt HeadersSpec error because illegal unicode [pekko-grpc]
Posted by "laglangyue (via GitHub)" <gi...@apache.org>.
laglangyue commented on PR #297:
URL: https://github.com/apache/pekko-grpc/pull/297#issuecomment-2079512091
@raboof
Here is a timeline:
I started to discover the problem, and I thought it was a problem with scalafmt, but members of scalafmt thought it was an abandoned unicode, which is actually very rare. This symbol has a universal unicode
Then I submitted a PR.
Finally, I argued with scalafmt that they are compatible with this Unicode form and will not throw exceptions
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] chore:fix scalafmt HeadersSpec error because illegal unicode [pekko-grpc]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin merged PR #297:
URL: https://github.com/apache/pekko-grpc/pull/297
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] chore:fix scalafmt HeadersSpec error because illegal unicode [pekko-grpc]
Posted by "laglangyue (via GitHub)" <gi...@apache.org>.
laglangyue commented on PR #297:
URL: https://github.com/apache/pekko-grpc/pull/297#issuecomment-2079520387
Both writing methods are okay in Scala, and grpc-java uses `(char) "xxx"`. This pr will not affect the our test.
here is issue
https://github.com/scalameta/scalameta/issues/3690
Because this issue occurs after this PR, So I didn't give any feedback on what happened afterwards to the Pekko community
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] chore:fix scalafmt HeadersSpec error because illegal unicode [pekko-grpc]
Posted by "raboof (via GitHub)" <gi...@apache.org>.
raboof commented on PR #297:
URL: https://github.com/apache/pekko-grpc/pull/297#issuecomment-2079529899
> both writing methods are okay in Scala
I agree the compiler currently appears to supports it, but I don't see anything in the language specification that says it must - so perhaps it would be best not to make assumptions? Or did I miss the part of the specification that covers this case?
> https://github.com/scalameta/scalameta/issues/3690
Thanks for bringing the issue up there and adding the reference here!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org