Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move scalaInstanceTopLoader to compileBase settings #6480

Merged
merged 3 commits into from Jul 8, 2021

Conversation

adpi2
Copy link
Member

@adpi2 adpi2 commented Apr 29, 2021

  • Move scalaInstanceTopLoader and useScalaReplJLine to compileBase:
    They are/should only be used in the JvmPlugin to create the scalaInstance.

  • Move jansiExclusionLoader (for Scala 2.10 only) to the scalaInstanceTopLoader implementation

  • Remove the ClassLoaderCache hack for dotty:
    It is not needed anymore, since dotty uses sbt 1.5

  • Make Defaults.makeScalaInstance public:
    ScalaInstance and the scalaInstance task are public. But, to create a custom scalaInstance we need the extendedClassLoaderCache which is package private. That's why I think makeScalaInstance should be public.

This will allow us to properly bootstrap the Scala compiler in the dotty repository. See scala/scala3#12259.

@adpi2 adpi2 requested a review from eed3si9n April 29, 2021 12:36
@adpi2 adpi2 marked this pull request as ready for review April 29, 2021 12:36
@eed3si9n
Copy link
Member

I haven't branched out develop to 1.5.x yet. Is this more of a 1.6.0-M1 feature or can this be "backported" to 1.5.x without going through the RC cycle?

@adpi2
Copy link
Member Author

adpi2 commented Apr 29, 2021

It is not forward compatible because I changed the scope of scalaInstanceTopLoader. So it should go to 1.6.x.

I can backport a lighter version, that just makes makeScalaInstance public.

@adpi2
Copy link
Member Author

adpi2 commented Apr 29, 2021

Maybe we can merge #6481 and put this one on hold for now.

eed3si9n added a commit that referenced this pull request May 3, 2021
Backport #6480: Expose makeScalaInstance publicly
@adpi2 adpi2 mentioned this pull request May 10, 2021
@adpi2
Copy link
Member Author

adpi2 commented Jul 8, 2021

@eed3si9n This one should be ready to merge.

@eed3si9n eed3si9n merged commit 9c10fe4 into sbt:develop Jul 8, 2021
@eed3si9n eed3si9n added this to the 1.6.0 milestone Sep 19, 2021
@eed3si9n eed3si9n changed the title Expose makeScalaInstance publicly Move scalaInstanceTopLoader to compileBase settings Sep 19, 2021
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.

None yet

2 participants