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

Remove unused classloader settings #7288

Merged

Conversation

benmccann
Copy link
Contributor

@benmccann benmccann commented May 2, 2017

As far as I can tell these settings have never been used and just add extra complication. These are not present in the Lagom reloader, which is a little cleaner

I also reordered to parameters to startDevMode to match the ordering in Lagom, which I think was nicer, as it makes it easier for me to follow the logic across the two

After this is merged, I have just one or maybe two changes left to the reload functionality and we will then be able to use the same reloader for Play and Lagom. After the cleanup is done it may make sense to have this be a separate project with its own lifecycle

@benmccann benmccann force-pushed the rm-unused-classloader-settings branch from 863f1b4 to 2f29835 Compare May 2, 2017 08:18
@wsargent
Copy link
Member

wsargent commented May 2, 2017

So if I'm reading this correctly, the functions have been inlined and the parameters have been removed, but there are no actual changes and no external API that would hook in here.

@@ -108,10 +108,6 @@ object Reloader {

def urls(cp: Classpath): Array[URL] = cp.map(_.toURI.toURL).toArray

val createURLClassLoader: ClassLoaderCreator = (name, urls, parent) => new NamedURLClassLoader(name, urls, parent)

val createDelegatedResourcesClassLoader: ClassLoaderCreator = (name, urls, parent) => new DelegatedResourcesClassLoader(name, urls, parent)
Copy link
Member

Choose a reason for hiding this comment

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

inlined

@@ -108,10 +108,6 @@ object Reloader {

def urls(cp: Classpath): Array[URL] = cp.map(_.toURI.toURL).toArray

val createURLClassLoader: ClassLoaderCreator = (name, urls, parent) => new NamedURLClassLoader(name, urls, parent)
Copy link
Member

Choose a reason for hiding this comment

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

inlined

@@ -207,10 +202,10 @@ object Reloader {
def get: ClassLoader = { reloader.getClassLoader.orNull }
})

lazy val applicationLoader = dependencyClassLoader("PlayDependencyClassLoader", urls(dependencyClasspath), delegatingLoader)
lazy val applicationLoader = new NamedURLClassLoader("PlayDependencyClassLoader", urls(dependencyClasspath), delegatingLoader)
Copy link
Member

Choose a reason for hiding this comment

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

from function above

@@ -346,7 +340,7 @@ class Reloader(
val version = classLoaderVersion.incrementAndGet
val name = "ReloadableClassLoader(v" + version + ")"
val urls = Reloader.urls(classpath)
val loader = createClassLoader(name, urls, baseLoader)
val loader = new DelegatedResourcesClassLoader(name, urls, baseLoader)
Copy link
Member

Choose a reason for hiding this comment

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

from function above

@benmccann
Copy link
Contributor Author

Correct. Just trying to simplify the interface to startDevMode

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