You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2024/01/02 06:46:08 UTC

[PR] [SPARK-46559][MLLIB] Wrap the `export` in the package name with backticks [spark]

LuciferYang opened a new pull request, #44555:
URL: https://github.com/apache/spark/pull/44555

   ### What changes were proposed in this pull request?
   This pr wrap the `export` in the package name with backticks due to  `export` will become keywords in Scala 3.
   
   ### Why are the changes needed?
   `export` will become keywords in Scala 3, Scala 2.13 compiler will check for relevant cases in the code, but it does not check for cases in the package name. However, if we write a Scala file as follows and compile it with Scala 3, 
   
   ```scala
   package org.apache.spark.mllib.pmml.export
   
   private class ExportABC() {}
   ```
   
   it will throw an error:
   
   ```scala
   bin/scalac test.scala -explain                                                
   -- [E040] Syntax Error: test.scala:1:36 ----------------------------------------
   1 |package org.apache.spark.mllib.pmml.export
     |                                    ^^^^^^
     |                                an identifier expected, but 'export' found
     |-----------------------------------------------------------------------------
     | Explanation (enabled by `-explain`)
     |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     |
     | If you want to use 'export' as identifier, you may put it in backticks: `export`.
      -----------------------------------------------------------------------------
   1 error found
   ```
   
   We can workaround by wrapping `export` with backticks.
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   Pass GitHub Actions
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No
   


-- 
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


Re: [PR] [SPARK-46559][MLLIB] Wrap the `export` in the package name with backticks [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang closed pull request #44555: [SPARK-46559][MLLIB] Wrap the `export` in the package name with backticks
URL: https://github.com/apache/spark/pull/44555


-- 
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


Re: [PR] [SPARK-46559][MLLIB] Wrap the `export` in the package name with backticks [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #44555:
URL: https://github.com/apache/spark/pull/44555#issuecomment-1873669215

   cc @zhengruifeng This is a slightly ahead-of-time PR. I found that the modification did not break the mima check, so I fixed this issue on the fly. We can also wait until the Scala 2.13 compiler starts to throw errors or starts to support Scala 3 before fixing this issue.


-- 
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


Re: [PR] [SPARK-46559][MLLIB] Wrap the `export` in the package name with backticks [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #44555:
URL: https://github.com/apache/spark/pull/44555#issuecomment-1873675391

   also cc @WeichenXu123 


-- 
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


Re: [PR] [SPARK-46559][MLLIB] Wrap the `export` in the package name with backticks [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #44555:
URL: https://github.com/apache/spark/pull/44555#issuecomment-1873962940

   Merged into master. Thanks @zhengruifeng @HyukjinKwon 


-- 
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