Skip to content

[SPARK-45272][BUILD][INFRA][DOCS] Remove Scala version specific comments, and scala-2.13 profile usage - #43049

Closed
HyukjinKwon wants to merge 2 commits into
apache:masterfrom
HyukjinKwon:SPARK-44113-followup-2
Closed

[SPARK-45272][BUILD][INFRA][DOCS] Remove Scala version specific comments, and scala-2.13 profile usage#43049
HyukjinKwon wants to merge 2 commits into
apache:masterfrom
HyukjinKwon:SPARK-44113-followup-2

Conversation

@HyukjinKwon

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

This PR is a followup of #43008 that cleanups Scala version specific comments, and scala-2.13 profile usage.

See also #43008 (comment)

Why are the changes needed?

To remove unnecessary profile specifications

Does this PR introduce any user-facing change?

No.

How was this patch tested?

CI in this PR should test them out. For README.md, I manually checked via GitHub.

Was this patch authored or co-authored using generative AI tooling?

No.

@HyukjinKwon

Copy link
Copy Markdown
MemberAuthor

I didn't cleanup dev/lint-scala because the Scala profile was there even before that PR.

@HyukjinKwon

Copy link
Copy Markdown
MemberAuthor

and I am intentionally using the same JIRA to make it easier to manage together (e.g., reverting).

cc @dongjoon-hyun and @LuciferYang FYI

<groupId>org.apache.spark</groupId>
<artifactId>spark-tags_${scala.binary.version}</artifactId>
</dependency>
<!-- #if scala-2.13 -->

@LuciferYangLuciferYangSep 22, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we sure about deleting these comments? I was hesitant before, because I didn't know if we would need to use a similar approach to dynamically change dependencies when supporting Scala 3, so I took a conservative approach and kept them.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Do we need to change scala-parallel-collections for Scala 3 upgrade? I would think we'd need it for other libraries. I am not removing the mechanism.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems that for Scala 3 the scala.binary.version is always 3? Then it looks like we can delete this comment, the corresponding dependency for Scala 3 is

<dependency>
<groupId>org.scala-lang.modules</groupId>
<artifactId>scala-parallel-collections_3</artifactId>
<version>1.0.4</version>
</dependency>

It seems that this dependency no longer needs to be dynamically changed.

@dongjoon-hyun

Copy link
Copy Markdown
Member

I have the same concern. I'd like to keep these because of Scala 3.

Comment threaddev/mima

SPARK_PROFILES=${1:-"-Pscala-2.13 -Pmesos -Pkubernetes -Pyarn -Pspark-ganglia-lgpl -Pkinesis-asl -Phive-thriftserver -Phive"}
TOOLS_CLASSPATH="$(build/sbt -Pscala-2.13 -DcopyDependencies=false "export tools/fullClasspath" | grep jar | tail -n1)"
OLD_DEPS_CLASSPATH="$(build/sbt -Pscala-2.13 -DcopyDependencies=false $SPARK_PROFILES "export oldDeps/fullClasspath" | grep jar | tail -n1)"

@dongjoon-hyundongjoon-hyunSep 22, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is good. What I conceded is only pom.xml file changes. Oh, sorry. I missed that this is also directly related.

@LuciferYangLuciferYangSep 22, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

While cleaning this up, I suggest removing 2.13 from VALID_VERSIONS in the change-scala-version.sh script too, otherwise if we execute dev/change-scala-version.sh 2.13, these files will generate some unnecessary git diff.

VALID_VERSIONS=( 2.13 )

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I commented dev/change-scala-version.sh usage out in the README.md :-).

Comment threadpom.xml
@dongjoon-hyun

Copy link
Copy Markdown
Member

BTW, it's surprising to me that the diff size is very small.
Screenshot 2023-09-21 at 10 42 52 PM

@dongjoon-hyun

dongjoon-hyun commented Sep 22, 2023

Copy link
Copy Markdown
Member

@HyukjinKwon and @LuciferYang .

If the proposed removal is only 53 lines, I believe this could be a cleaner way and we can recover it back easily.

To recover only this, shall we use an independent JIRA issue ID, @HyukjinKwon ?

@HyukjinKwon

Copy link
Copy Markdown
MemberAuthor

Sure, I am fine

@HyukjinKwonHyukjinKwon changed the title [SPARK-44113][BUILD][INFRA][DOCS][FOLLOW-UP] Remove Scala version specific comments, and scala-2.13 profile usage[SPARK-45272][BUILD][INFRA][DOCS] Remove Scala version specific comments, and scala-2.13 profile usageSep 22, 2023
Comment threadpom.xml
<!--
SPARK-34774 Add this property to ensure change-scala-version.sh can replace the public `scala.version`
property correctly.
-->

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Nesting a comment doesn't work .. so I took it out.

@dongjoon-hyundongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1, LGTM.

@LuciferYangLuciferYang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@dongjoon-hyun

Copy link
Copy Markdown
Member

Many builds successful including Java 21 Maven build. Let me merge this~ ;)

@HyukjinKwon
HyukjinKwon deleted the SPARK-44113-followup-2 branch January 15, 2024 00:48
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@HyukjinKwon@dongjoon-hyun@LuciferYang