You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/08/30 11:26:31 UTC
[GitHub] [spark] panbingkun opened a new pull request, #37727: [SPARK-40056][BUILD] Upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
panbingkun opened a new pull request, #37727:
URL: https://github.com/apache/spark/pull/37727
### What changes were proposed in this pull request?
This PR aims to upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
### Why are the changes needed?
The last upgrade occurred 2 year ago.
<img width="810" alt="image" src="https://user-images.githubusercontent.com/15246973/184291798-b1960f0a-f5ab-4037-835a-c788fb9447fc.png">
maven repo version: https://mvnrepository.com/artifact/org.antipathy/mvn-scalafmt
The new version specifically update the following issues:
> 1.https://github.com/SimonJPegg/mvn_scalafmt/commit/6b9e0a4c4169c133729b087c587c1d542359ad75
> <img width="566" alt="image" src="https://user-images.githubusercontent.com/15246973/184291619-f77c3df3-0044-4f66-bc24-c60b8148e44b.png">
> 2.mvn_scalafmt_2.11(scala 2.11) be deprecated: https://github.com/SimonJPegg/mvn_scalafmt/commit/9f3d1095d1e4e944d1e375925fd8b9e3aad63894
> <img width="473" alt="image" src="https://user-images.githubusercontent.com/15246973/184292603-74f70241-05e7-4c4e-9ef7-60041c6d9e76.png">
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Pass GA & Manual test
> 1.mvn -Pscala-2.12 scalafmt:format -Dscalafmt.skip=false
> 2.mvn -Pscala-2.13 scalafmt:format -Dscalafmt.skip=false
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] panbingkun commented on a diff in pull request #37727: [SPARK-40056][BUILD] Upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
Posted by GitBox <gi...@apache.org>.
panbingkun commented on code in PR #37727:
URL: https://github.com/apache/spark/pull/37727#discussion_r958387933
##########
dev/.scalafmt.conf:
##########
@@ -22,6 +22,13 @@ align.tokens = []
optIn = {
configStyleArguments = false
}
-danglingParentheses = false
-docstrings = JavaDoc
+danglingParentheses.preset = false
+docstrings.style = Asterisk
maxColumn = 98
+runner.dialect = scala212
+fileOverride {
+ "glob:**/src/**/scala-2.13/**.scala" {
+ runner.dialect = scala213
+ }
+}
+version = 3.5.9
Review Comment:
ok
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] panbingkun commented on a diff in pull request #37727: [SPARK-40056][BUILD] Upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
Posted by GitBox <gi...@apache.org>.
panbingkun commented on code in PR #37727:
URL: https://github.com/apache/spark/pull/37727#discussion_r958406171
##########
dev/.scalafmt.conf:
##########
@@ -22,6 +22,13 @@ align.tokens = []
optIn = {
configStyleArguments = false
}
-danglingParentheses = false
-docstrings = JavaDoc
+danglingParentheses.preset = false
+docstrings.style = Asterisk
maxColumn = 98
+runner.dialect = scala212
+fileOverride {
+ "glob:**/src/**/scala-2.13/**.scala" {
+ runner.dialect = scala213
+ }
+}
+version = 3.5.9
Review Comment:
[ERROR]
org.scalafmt.dynamic.exceptions.ScalafmtException: missing setting 'version'. To fix this problem, add the following line to .scalafmt.conf: 'version=3.2.1'.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] panbingkun commented on a diff in pull request #37727: [SPARK-40056][BUILD] Upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
Posted by GitBox <gi...@apache.org>.
panbingkun commented on code in PR #37727:
URL: https://github.com/apache/spark/pull/37727#discussion_r958403578
##########
dev/.scalafmt.conf:
##########
@@ -22,6 +22,13 @@ align.tokens = []
optIn = {
configStyleArguments = false
}
-danglingParentheses = false
-docstrings = JavaDoc
+danglingParentheses.preset = false
+docstrings.style = Asterisk
Review Comment:
[ERROR] found : String (value: "JavaDoc")
[ERROR] expected : Object
[ERROR] docstrings = JavaDoc
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] panbingkun commented on a diff in pull request #37727: [SPARK-40056][BUILD] Upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
Posted by GitBox <gi...@apache.org>.
panbingkun commented on code in PR #37727:
URL: https://github.com/apache/spark/pull/37727#discussion_r958384633
##########
dev/.scalafmt.conf:
##########
@@ -22,6 +22,13 @@ align.tokens = []
optIn = {
configStyleArguments = false
}
-danglingParentheses = false
-docstrings = JavaDoc
+danglingParentheses.preset = false
+docstrings.style = Asterisk
maxColumn = 98
+runner.dialect = scala212
+fileOverride {
+ "glob:**/src/**/scala-2.13/**.scala" {
+ runner.dialect = scala213
+ }
+}
+version = 3.5.9
Review Comment:
### why version 3.5.9 ?
1.Buildin version(Maven plugin's dependency) is : 3.2.1
<img width="343" alt="image" src="https://user-images.githubusercontent.com/15246973/187430623-a66dd62b-92e0-430c-bc7a-13456a2ed754.png">
2.But current max version is : 3.5.9 (https://mvnrepository.com/artifact/org.scalameta/scalafmt-core)
<img width="890" alt="image" src="https://user-images.githubusercontent.com/15246973/187428866-35b7aa1e-f7b1-41b2-9222-a1e87d85aca7.png">
#### If set version = 3.5.9, plugin will dynamically download as following:
code: https://github.com/scalameta/scalafmt/blob/master/scalafmt-dynamic/src/main/scala/org/scalafmt/dynamic/ScalafmtModuleLoader.scala#L25-L39
<img width="724" alt="image" src="https://user-images.githubusercontent.com/15246973/187427653-f7feea71-4358-4ff7-96d3-5da9d3beee64.png">
### root cause
<img width="797" alt="image" src="https://user-images.githubusercontent.com/15246973/187427474-a2fe19e8-d6a4-4edb-bebc-5ea2b068f0b2.png">
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on pull request #37727: [SPARK-40056][BUILD] Upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on PR #37727:
URL: https://github.com/apache/spark/pull/37727#issuecomment-1231544445
cc @srowen FYI
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] panbingkun commented on a diff in pull request #37727: [SPARK-40056][BUILD] Upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
Posted by GitBox <gi...@apache.org>.
panbingkun commented on code in PR #37727:
URL: https://github.com/apache/spark/pull/37727#discussion_r958404099
##########
dev/.scalafmt.conf:
##########
@@ -22,6 +22,13 @@ align.tokens = []
optIn = {
configStyleArguments = false
}
-danglingParentheses = false
-docstrings = JavaDoc
+danglingParentheses.preset = false
+docstrings.style = Asterisk
maxColumn = 98
+runner.dialect = scala212
+fileOverride {
+ "glob:**/src/**/scala-2.13/**.scala" {
+ runner.dialect = scala213
+ }
+}
Review Comment:
Error formatting Scala files: Invalid config: Default dialect is deprecated; use explicit: [sbt0137,sbt1,scala211,scala212,scala212source3,scala213,scala213source3,scala3]
[ERROR] Also see https://scalameta.org/scalafmt/docs/configuration.html#scala-dialects"
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] panbingkun commented on a diff in pull request #37727: [SPARK-40056][BUILD] Upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
Posted by GitBox <gi...@apache.org>.
panbingkun commented on code in PR #37727:
URL: https://github.com/apache/spark/pull/37727#discussion_r958390087
##########
dev/.scalafmt.conf:
##########
@@ -22,6 +22,13 @@ align.tokens = []
optIn = {
configStyleArguments = false
}
-danglingParentheses = false
-docstrings = JavaDoc
+danglingParentheses.preset = false
+docstrings.style = Asterisk
Review Comment:
ref: https://scalameta.org/scalafmt/docs/configuration.html#docstringsstyle--asterisk
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon closed pull request #37727: [SPARK-40056][BUILD] Upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #37727: [SPARK-40056][BUILD] Upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
URL: https://github.com/apache/spark/pull/37727
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a diff in pull request #37727: [SPARK-40056][BUILD] Upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on code in PR #37727:
URL: https://github.com/apache/spark/pull/37727#discussion_r958365582
##########
dev/.scalafmt.conf:
##########
@@ -22,6 +22,13 @@ align.tokens = []
optIn = {
configStyleArguments = false
}
-danglingParentheses = false
-docstrings = JavaDoc
+danglingParentheses.preset = false
+docstrings.style = Asterisk
maxColumn = 98
+runner.dialect = scala212
+fileOverride {
+ "glob:**/src/**/scala-2.13/**.scala" {
+ runner.dialect = scala213
+ }
+}
+version = 3.5.9
Review Comment:
where is this version from? is it from Maven plugin's dependency?
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a diff in pull request #37727: [SPARK-40056][BUILD] Upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on code in PR #37727:
URL: https://github.com/apache/spark/pull/37727#discussion_r958366050
##########
dev/.scalafmt.conf:
##########
@@ -22,6 +22,13 @@ align.tokens = []
optIn = {
configStyleArguments = false
}
-danglingParentheses = false
-docstrings = JavaDoc
+danglingParentheses.preset = false
+docstrings.style = Asterisk
maxColumn = 98
+runner.dialect = scala212
+fileOverride {
+ "glob:**/src/**/scala-2.13/**.scala" {
+ runner.dialect = scala213
+ }
+}
+version = 3.5.9
Review Comment:
```suggestion
version = 3.5.9
```
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] panbingkun commented on a diff in pull request #37727: [SPARK-40056][BUILD] Upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
Posted by GitBox <gi...@apache.org>.
panbingkun commented on code in PR #37727:
URL: https://github.com/apache/spark/pull/37727#discussion_r958402721
##########
dev/.scalafmt.conf:
##########
@@ -22,6 +22,13 @@ align.tokens = []
optIn = {
configStyleArguments = false
}
-danglingParentheses = false
-docstrings = JavaDoc
+danglingParentheses.preset = false
Review Comment:
[ERROR] [E1] Presets$: top-level presets removed since v3.0.0; use 'danglingParentheses.preset = false' instead
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] panbingkun commented on a diff in pull request #37727: [SPARK-40056][BUILD] Upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
Posted by GitBox <gi...@apache.org>.
panbingkun commented on code in PR #37727:
URL: https://github.com/apache/spark/pull/37727#discussion_r958397758
##########
dev/.scalafmt.conf:
##########
@@ -22,6 +22,13 @@ align.tokens = []
optIn = {
configStyleArguments = false
}
-danglingParentheses = false
-docstrings = JavaDoc
+danglingParentheses.preset = false
+docstrings.style = Asterisk
maxColumn = 98
+runner.dialect = scala212
+fileOverride {
+ "glob:**/src/**/scala-2.13/**.scala" {
+ runner.dialect = scala213
+ }
+}
Review Comment:
https://scalameta.org/scalafmt/docs/configuration.html#scala-dialects
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] panbingkun commented on a diff in pull request #37727: [SPARK-40056][BUILD] Upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
Posted by GitBox <gi...@apache.org>.
panbingkun commented on code in PR #37727:
URL: https://github.com/apache/spark/pull/37727#discussion_r958384633
##########
dev/.scalafmt.conf:
##########
@@ -22,6 +22,13 @@ align.tokens = []
optIn = {
configStyleArguments = false
}
-danglingParentheses = false
-docstrings = JavaDoc
+danglingParentheses.preset = false
+docstrings.style = Asterisk
maxColumn = 98
+runner.dialect = scala212
+fileOverride {
+ "glob:**/src/**/scala-2.13/**.scala" {
+ runner.dialect = scala213
+ }
+}
+version = 3.5.9
Review Comment:
### why version 3.5.9 ?
Buildin version(Maven plugin's dependency) is : 3.2.1
But current max version is : 3.5.9 (https://mvnrepository.com/artifact/org.scalameta/scalafmt-core)
<img width="890" alt="image" src="https://user-images.githubusercontent.com/15246973/187428866-35b7aa1e-f7b1-41b2-9222-a1e87d85aca7.png">
#### If set version = 3.5.9, plugin will dynamically download as following:
code: https://github.com/scalameta/scalafmt/blob/master/scalafmt-dynamic/src/main/scala/org/scalafmt/dynamic/ScalafmtModuleLoader.scala#L25-L39
<img width="724" alt="image" src="https://user-images.githubusercontent.com/15246973/187427653-f7feea71-4358-4ff7-96d3-5da9d3beee64.png">
### root cause
<img width="797" alt="image" src="https://user-images.githubusercontent.com/15246973/187427474-a2fe19e8-d6a4-4edb-bebc-5ea2b068f0b2.png">
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on pull request #37727: [SPARK-40056][BUILD] Upgrade mvn-scalafmt from 1.0.4 to 1.1.1640084764.9f463a9
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on PR #37727:
URL: https://github.com/apache/spark/pull/37727#issuecomment-1231793926
Merged to master.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org