aboutsummaryrefslogtreecommitdiff
path: root/stage1/resolver.scala
Commit message (Collapse)AuthorAgeFilesLines
* add basic support for maven version rangesChristopher Vogt2017-06-221-1/+14
|
* add process library with extracted and new functionsChristopher Vogt2017-06-151-17/+9
|
* verify classpath feature to identify duplicate classesChristopher Vogt2017-04-021-2/+3
|
* make .scala sources 2.12 compatibleChristopher Vogt2017-04-011-7/+7
|
* add support for forking the jvm process when invoking a main classChristopher Vogt2017-03-281-0/+8
| | | | | | | | and add example of using akka-http that doesn’t work without this. Also add functionality to emulate inheritIO when running via nailgun process. Only caveat right now: user has to press ENTER to terminate the input strea.
* minor reflection related refactorChristopher Vogt2017-03-281-9/+13
|
* performance: avoid compiling regex every timeChristopher Vogt2017-03-271-1/+1
|
* performance: cache moduleKey and make it’s string concat quickerChristopher Vogt2017-03-271-4/+4
|
* performance tweak: cache maven URI pathChristopher Vogt2017-03-271-2/+3
|
* performance tweak: cache hashes in memoryChristopher Vogt2017-03-271-4/+9
|
* performance tweak: cache lastModifiedChristopher Vogt2017-03-271-1/+3
|
* performance tweak: cache results of parsed pom files in memoryChristopher Vogt2017-03-271-3/+10
|
* performance tweak: cache classloaderChristopher Vogt2017-03-271-1/+1
|
* performance tweak: cache dependencyClasspath (major)Christopher Vogt2017-03-271-5/+7
|
* io performance tweak: cache cbtLastModifiedChristopher Vogt2017-03-271-2/+1
|
* explicitly convert to Vector everywhere for hopefully performanceChristopher Vogt2017-03-271-1/+1
| | | | benefits
* start modularizing cbt into librariesChristopher Vogt2017-03-271-15/+14
| | | | | | | | | | this extracts certain parts of cbt into stand-alone libraries, which can be published to maven and used outside of cbt. This also adds scalariform for these parts of the code. This slows down cbt’s own build a lot because of the number of projects involved! So we’ll follow this by a bunch of performance tweak commits.
* Unify reflectively loading builds from directories.Christopher Vogt2017-03-201-0/+6
| | | | | | | | | | THis is mostly cleanup and a little bit feature. Before it was done partially in 3 places, BuildBuild, loadRoot and GitDependency. Now DirectoryDependencies also support referencing sub-builds. Also introduce scalariform for the first few files of cbt's core code :).
* get rid of NameTransformer in favor of using Scala’s oneChristopher Vogt2017-03-191-1/+2
|
* Merge pull request #441 from cvogt/various-changesJan Christopher Vogt2017-03-171-0/+1
|\ | | | | Various changes
| * better show for PostBuildDependencyChristopher Vogt2017-03-171-0/+1
| |
* | Replace dependencies feature for conflict resolutionChristopher Vogt2017-03-171-32/+36
|/
* recursive pom variable substitutionPiotr Trzpil2017-03-151-18/+24
|
* fix file watching for realChristopher Vogt2017-03-121-2/+0
| | | | | | | last file watching update didn’t work well enough. This now - rips out barbary watch service as it seems buggy crashing the jvm - make cbt exclusively write files to watch to a file - uses fswatch instead watching all files in that file
* more concise runMain in more placesChristopher Vogt2017-03-091-2/+2
|
* make sure binary dependencies existChristopher Vogt2017-03-071-1/+2
|
* support resolving unsigned dependenciesChristopher Vogt2017-03-061-4/+4
|
* equality for BoundMavenDependencyChristopher Vogt2017-02-271-0/+5
|
* remove dead codeChristopher Vogt2017-02-271-7/+0
|
* minor logging improvementsChristopher Vogt2017-02-271-1/+4
|
* important fixme message for usability issueChristopher Vogt2017-02-271-0/+4
|
* colors for resolving loggingChristopher Vogt2017-02-221-1/+1
|
* support flatClassLoader and run at Dependency levelChristopher Vogt2017-02-141-0/+13
|
* implicitly pass classloader, might make code easierChristopher Vogt2017-02-141-25/+32
| | | | | and prepares for allowing `run` and `runFlat` at Dependency instead of Build level
* remove some unnecessary Context fields while we are modifying contextChristopher Vogt2017-02-131-2/+4
|
* various smaller changesChristopher Vogt2017-02-091-2/+3
|
* idempotent change propagationChristopher Vogt2017-02-091-55/+47
| | | | | | using lastModified instead of a non-idempotent needsUpdate flag this fixes a bug where dependees would not be rebuilt if cbt exited or was killed after dependencies were already rebuilt.
* memoize task results across classes within a single runChristopher Vogt2017-02-091-48/+54
|
* make full dependencies available to compile instead of only classpathChristopher Vogt2017-02-011-2/+2
| | | | | this will make it possible to access lastModified times and cache them in the following commits
* replace flawed concurrent hashmap cache with consistent replacementChristopher Vogt2017-02-011-2/+0
| | | | | | | | | | | | | | | | | | | | | | | The concurrent hashmap approach to classloader caching was flawed. Assume you have two concurrently running builds A and B and projects P2 and P3 depending on project P1. And assume a time sequence where A compiles P1, then compiles P2, then P1’s sources change, then B compiles P1, then A compiles P3. At the end P2 and P3 will have different versions of P1 as their parent classloaders. This is inconsistent. The easiest way to work around this is making sure only one thread is changing the classloader cache during it’s entire run. This would mean either no concurrency or what we have done here, which is letting threads work on a copy of the cache and replace the original cache in the end using an atomic operation. This means the thread that finishes last wins, but for caching that’s fine. Worst case some things aren’t cached in a concurrent execution. This change also means that we don’t need concurrent hashmaps for the classloader cache anymore since no two theads will access the same hashmap. We still need a concurrent hashmap for the class caches inside of the classloaders as multiple threads can access the same classloaders.
* Remove classifier from pom files.mchav2016-11-251-12/+11
|
* fix java.lang.LinkageError due to cache invalidation bugChristopher Vogt2016-11-091-3/+10
| | | | | | | | | | | | cbtHasChanged does never change across one run. However classLoaderRecursion removes the corresponding classloader if needsUpdate is true. It is called multiple times meaning it removes and re-creates the classloader on every call leading to potentially multiple conflicting cbt classloaders. needsUpdate should never be returning true more than ones across a single run. Otherwise it can lead to this error: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "Build.lib()Lcbt/Lib;" the class loader (instance of cbt/URLClassLoader) of the current class, Build, and the class loader (instance of cbt/URLClassLoader) for interface cbt/BaseBuild have different Class objects for the type cbt/Lib used in the signature
* make BuildInterfaces an abstract class so it can have default valuesChristopher Vogt2016-10-031-2/+2
| | | | | and it becomes slightly easier to maintain source compatibility between cbt versions
* Get rid of Build default imports to reduce noise in build files. This also ↵Christopher Vogt2016-06-151-8/+4
| | | | changes builds from using immutable.Seq to using Predef.Seq in favor of simplicity over purity. This has been discussed on gitter.
* Fix BoundMavenDependency string representationChristopher Vogt2016-05-031-1/+2
|
* Convenience factory methods for ResolversChristopher Vogt2016-05-031-13/+13
|
* Fix use compatibility interfaces from main cbtChristopher Vogt2016-04-291-2/+4
|
* Reproducible builds, composing different CBT version and various improvementsChristopher Vogt2016-04-281-155/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One large commit, because it is was hard to do these things in isolation or to separate them now. CBT now knows how to load other versions of itself - Support for reproducible builds (!), by providing a CBT git URL and hash to tie build to - Support for composing builds using different CBT versions (!) - introduce (in compatibility/) Java interfaces all CBT versions need to stay compatible with, so they can talk to each other. And put extension methods to these interfaces in cbt package object Class loading - add some sanity checks for class loading - improve class loader invalidation to fix bugs - implement caching in Java land class loaders. In particular to prevent the system class loader to repeatedly generate ClassNotFound exceptions in each sink of the class loader DAG for non JDK classes (meaning major speed up for projects with many classes). - getting rid of transient class loader cache unifying into "persistent" one instead (which is still wrong as invalidation eventually needs to invalidate entire sub graphs of the class loading DAG, not single class loaders. Seems like we'll have to abandon the hashmap based approach and tie caching to dependency objects) Other Caching - cache dependencies extracted from xml files, which was one major time killer, but invalidate cache when cbt changed (maven dependency user facing api needs simplification now!) - memorize last successful compile time in the file system rather than memory, to guard against unnecessary recompiling even across launches (or when using cbt direct) Structural improvements - Factor out ClassLoaderCache on Java land into its own class. - Port MultiClassLoader to Java land, to better compose classloaders in NailgunLauncher. - Remove many global constants and variables (in object paths and in NailgunLauncher) and pass them through instead. Needed for composing of builds. - move more code from resolver into Lib for less entanglement with classes (needed to compatibility interfaces) and better re-usability - remove canBeCached. Everything can be cached now, but we need to be careful about correct invalidation. - remove build announcing produced jars. We can add if ever needed. - change callNullary to return exit code instead of Unit as preparation for next commit introducing "recursive" ScalaTest - Makes ScalaTest support work (still a bit too inflexible, but mostly works well)
* minor improvements to docs, imports, visibilitiesChristopher Vogt2016-04-281-5/+6
|
* remove dead codeChristopher Vogt2016-04-281-13/+0
|