<@U0CHHN4F4> I did more refactoring, and tried a d...
# scripting
a
@ilya.chernikov I did more refactoring, and tried a different approach for plugable resolvers. You can configure a list of multiple resolvers and they run in declared order, as well as their annotations in the order as specified by the resolver (i.e. repositories before artifact fectching) in case that matters. They automatically setup their own imports and the manager makes sure the classpath is updated on the first script call for anything that is used. Basic test is simplified because all of the typical defaults are set: https://github.com/kohesive/keplin/blob/master/common/src/test/kotlin/uy/kohesive/keplin/common/TestResettableReplEngine.kt The resolvers are simpler now because more common code is in the manager, here is the test setting up the ReplEngine for file + maven resolving, simple constructor parameters: https://github.com/kohesive/keplin/blob/master/maven-resolver/src/test/kotlin/uy/kohesive/keplin/util/scripting/resolver/maven/TestMavenScriptDependencies.kt The issue I had with the previous model is that it only allowed a limited set of annotations that had to be shared by resolvers, and it may be that each could be radically different. Or maybe maven wants to expose two different ones. one for the form of
DependsOnMavenGAV(“g:a:v”)
and other for
DependsOnMaven(“group”, “artificat”, “version”)
or whatever else comes along. I put the maven in a separate module whereas file direct JAR usage is in the common. I could re-wrap your annotation based
acceptedAnnotations
model into this one easily enough, but you can’t go the other way. I’m going to do the thread safety check, and then wait for your thumbs up before turning this into the pull requests.