Skip to content

ClassPathFactory and PathResolver constructors: restore source compat and bincompat#7822

Merged
SethTisue merged 1 commit intoscala:2.12.xfrom
SethTisue:pathresolver-backcompat
Mar 7, 2019
Merged

ClassPathFactory and PathResolver constructors: restore source compat and bincompat#7822
SethTisue merged 1 commit intoscala:2.12.xfrom
SethTisue:pathresolver-backcompat

Conversation

@SethTisue
Copy link
Member

@SethTisue SethTisue commented Mar 7, 2019

small followup to #7712. the community build found that a couple of
projects (mima, classpath-shrinker) were using the old constructors. since
it's easy to do, let's keep both source compat (with the default
argument) and bincompat (with the extra constructor, which we can
toss for 2.13)

review by @retronym, is this a bad idea? idk what this code even does, I'm
just making the changes mechanically.

I've marked the extra constructors for removal in 2.13.x, should
the default arguments also be marked with the same TODO, or should
it stay going forward?

@scala-jenkins scala-jenkins added this to the 2.12.9 milestone Mar 7, 2019
@SethTisue SethTisue requested a review from retronym March 7, 2019 00:30
@SethTisue
Copy link
Member Author

SethTisue commented Mar 7, 2019

https://scala-ci.typesafe.com/view/scala-2.12.x/job/scala-2.12.x-integrate-community-build/4223/

[mima] [error] /home/jenkins/workspace/scala-2.12.x-integrate-community-build/target-0.9.16/project-builds/mima-b7586d2a68ca81f34a34d0eab500d40fc58962f4/core/src/main/scala/com/typesafe/tools/mima/core/package.scala:13:40: not enough arguments for constructor PathResolver: (settings: scala.tools.nsc.Settings, closeableRegistry: scala.tools.nsc.CloseableRegistry)scala.tools.util.PathResolver.
[mima] [error] Unspecified value parameter closeableRegistry.
[mima] [error]     AggregateClassPath.createAggregate(new PathResolver(Config.settings).containers: _*)
[mima] [error]                                        ^

[classpath-shrinker] [error] /home/jenkins/workspace/scala-2.12.x-integrate-community-build/target-0.9.16/project-builds/classpath-shrinker-955423258e1a83908790d5c6229b273c639d16c3/plugin/src/main/scala-2.12/io/github/retronym/classpathshrinker/Compat.scala:10: not enough arguments for constructor ClassPathFactory: (settings: scala.tools.nsc.Settings, closeableRegistry: scala.tools.nsc.CloseableRegistry)scala.tools.nsc.classpath.ClassPathFactory.
[classpath-shrinker] [error] Unspecified value parameter closeableRegistry.
[classpath-shrinker] [error]   def getClassPathFrom(settings: Settings) = new ClassPathFactory(settings)

@SethTisue SethTisue force-pushed the pathresolver-backcompat branch from 7643f90 to 689d3b3 Compare March 7, 2019 00:31
@SethTisue SethTisue changed the title PathResolver constructor: restore source compat and bincompat ClassPathFactory and PathResolver constructors: restore source compat and bincompat Mar 7, 2019
@SethTisue SethTisue force-pushed the pathresolver-backcompat branch from 689d3b3 to 7ea180e Compare March 7, 2019 00:34
@retronym
Copy link
Member

retronym commented Mar 7, 2019

Thanks, Seth.

@SethTisue SethTisue force-pushed the pathresolver-backcompat branch from 7ea180e to f00cb65 Compare March 7, 2019 03:39
@SethTisue
Copy link
Member Author

SethTisue commented Mar 7, 2019

gah, I failed to look at all of the compile errors, and so

[mima] [error] Unspecified value parameter closeableRegistry.
[mima] [error]     ClassPathFactory.newClassPath(dir, Config.settings)
[mima] [error]                                  ^
[mima] [error] /Users/tisue/community.212/target-0.9.16/project-builds/mima-8506013a3891b61c470f1f488ca2e85b58da30b4/core/src/main/scala/com/typesafe/tools/mima/core/package.scala:36:34: not enough arguments for method newClassPath: (file: scala.reflect.io.AbstractFile, settings: scala.tools.nsc.Settings, closeableRegistry: scala.tools.nsc.CloseableRegistry)scala.tools.nsc.util.ClassPath.
[mima] [error] Unspecified value parameter closeableRegistry.
[mima] [error]     ClassPathFactory.newClassPath(dir, Config.settings)
[mima] [error]                                  ^

well, easy to fix.

restore source compat and bincompat

small followup to scala#7712. the community build found that a couple of
projects (mima, classpath-shrinker) were using the old
constructors. since it's easy to do, let's keep both source compat
(with the default arguments) and bincompat (with the extra
constructors, which we can toss for 2.13)
@SethTisue SethTisue force-pushed the pathresolver-backcompat branch from f00cb65 to ca8c69d Compare March 7, 2019 05:54
@SethTisue
Copy link
Member Author

in local testing,

[info] Project classpath-shrinker----------: SUCCESS (project rebuilt ok)
[info] Project mima------------------------: SUCCESS (project rebuilt ok)
[info] Project twotails--------------------: SUCCESS (project rebuilt ok)

(where the twotails part is a test of #7825, which I rebased this PR on top of)

@SethTisue SethTisue merged commit 7ae6995 into scala:2.12.x Mar 7, 2019
@SethTisue SethTisue deleted the pathresolver-backcompat branch March 7, 2019 17:01
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.

3 participants