aboutsummaryrefslogtreecommitdiff
path: root/stage1/Stage1Lib.scala
Commit message (Collapse)AuthorAgeFilesLines
* add sbt-resolver like restart featureChristopher Vogt2017-06-151-0/+15
|
* add process library with extracted and new functionsChristopher Vogt2017-06-151-93/+0
|
* Merge pull request #471 from cvogt/2.12-readyJan Christopher Vogt2017-04-021-1/+2
|\ | | | | 2.12 ready
| * make .scala sources 2.12 compatibleChristopher Vogt2017-04-011-1/+2
| |
* | hopefully more self-explanatory nameChristopher Vogt2017-04-011-2/+2
|/
* add support for forking the jvm process when invoking a main classChristopher Vogt2017-03-281-7/+104
| | | | | | | | 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-21/+4
|
* performance tweak: cache results of parsed pom files in memoryChristopher Vogt2017-03-271-15/+31
|
* explicitly convert to Vector everywhere for hopefully performanceChristopher Vogt2017-03-271-1/+1
| | | | benefits
* start modularizing cbt into librariesChristopher Vogt2017-03-271-97/+28
| | | | | | | | | | 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.
* Merge pull request #441 from cvogt/various-changesJan Christopher Vogt2017-03-171-2/+18
|\ | | | | Various changes
| * add helper for caching based on a status fileChristopher Vogt2017-03-171-0/+15
| |
| * fix bug in identifying main classesChristopher Vogt2017-03-171-2/+3
| |
* | Replace dependencies feature for conflict resolutionChristopher Vogt2017-03-171-2/+2
|/
* fix file watching for realChristopher Vogt2017-03-121-1/+7
| | | | | | | 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
* Merge pull request #425 from cvogt/writeIfChangedJan Christopher Vogt2017-03-121-0/+2
|\ | | | | writeIfChanged helper method
| * writeIfChanged helper methodChristopher Vogt2017-03-121-0/+2
| |
* | fix change propagationChristopher Vogt2017-03-121-1/+5
|/
* revamp loop featureChristopher Vogt2017-03-121-3/+5
| | | | | | | | | | | | | | | | | | | | | now CBT and builds pass their file names to the current build via the context. The build then simply blocks until any file changes. Then it returns with a special exit code, which the bash script picks up and restarts CBT. Thats works well for looping over project files. It works less well for looping over builds and CBT itself. For this a build has to success once, so that the .cbt-loop.tmp file exists. Then looping works for cbt and builds, but the file list is not updated in case of compile errors, etc. Fixes - https://github.com/cvogt/cbt/issues/406 - https://github.com/cvogt/cbt/issues/405 - https://github.com/cvogt/cbt/issues/202 - https://github.com/cvogt/cbt/issues/50 - https://github.com/cvogt/cbt/issues/22 We should improve for 1.0 in https://github.com/cvogt/cbt/issues/419 to handle looping over build files and cbt itself smarter.
* more concise runMain in more placesChristopher Vogt2017-03-091-3/+2
|
* comment about cleanup TODOChristopher Vogt2017-03-071-1/+1
|
* support publishing to basic-auth protected maven repositoriesChristopher Vogt2017-03-061-3/+11
|
* support resolving unsigned dependenciesChristopher Vogt2017-03-061-4/+4
|
* add comprehensive, type-safe proguard pluginChristopher Vogt2017-03-011-2/+2
| | | | | this also demonstrates how to programmatically generate an extensive, type-safe api for a stringly-typed interface
* minor logging improvementsChristopher Vogt2017-02-271-1/+1
|
* minor style enhancementChristopher Vogt2017-02-271-1/+1
|
* minor syntax fixChristopher Vogt2017-02-271-1/+1
|
* sh-like exit code combination operatorsChristopher Vogt2017-02-271-1/+4
|
* make listRecursive a File extension method for brevityChristopher Vogt2017-02-261-7/+2
|
* a few hopefully simplifying rewirings in the implicitsChristopher Vogt2017-02-221-1/+1
|
* add package to generated Build in build.scala and in-package discoveryChristopher Vogt2017-02-151-23/+31
| | | | | | | | | | | This should allow for build to add other builds to their dependencies and interact with them in a type-safe way. And ever regardless it seems like good practice to never have the same class existing in the same package or the top-level package even if they don’t end up on the same classpath. This might also help make stack traces easier to understand. Also improve error messages for mistakes with the build class, e.g. constructor, super classes, etc.
* now really cache classloaders for buildsChristopher Vogt2017-02-141-7/+3
| | | | should be safe now that we rebuild based on lastModified
* more debugging info for a bug observed with compiling dottyChristopher Vogt2017-02-141-1/+5
|
* ignore classes in randomly nested subdirectoriesChristopher Vogt2017-02-141-8/+13
| | | | useful for `dotty run <file>`
* implicitly pass classloader, might make code easierChristopher Vogt2017-02-141-6/+5
| | | | | 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-1/+1
|
* omit classpath when classpath is empty (= no dependencies, only jdk)Christopher Vogt2017-02-111-19/+16
|
* various smaller changesChristopher Vogt2017-02-091-3/+2
|
* idempotent change propagationChristopher Vogt2017-02-091-38/+43
| | | | | | 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-1/+24
|
* make full dependencies available to compile instead of only classpathChristopher Vogt2017-02-011-1/+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-1/+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.
* Merge separate hashmaps for persistent cache into oneChristopher Vogt2017-02-011-5/+8
| | | | | | | This isn’t type-safe, but re-using that same hashmap for both keys and classloaders allows to reduce the number of members in Context. Also we can re-use the same hashMap for other things as well in the coming commits, e.g. timestamps.
* swap out System.out and System.err in a way that affects JDK and ScalaChristopher Vogt2016-10-131-6/+29
| | | | | | | | Before it only affected jdk, because scala.Console captures our and err before the swap. This is needed when running main classes like Scaladoc or the compiler and wanting to redirect output to standard error
* do not interpret exceptions during redirectOutToErr as scalac crashesChristopher Vogt2016-10-131-22/+22
|
* Fix exit code trapping across classloadersChristopher Vogt2016-10-071-4/+4
| | | | | | | | | | A SecurityManager is once installed globally and stays the same across all classloaders. TrapSecurityManager was installed this way, but it looked up the `trapExitCode` in it's own classloader, while classes in other classloaders (when cbt was using another version of cbt) were writing it to their own classloader. This flag needs to be in a global place instead to fix this, so we'll put it straight into the TrapSecurityManager itself.
* fix pickOne error messagerockjam2016-10-031-1/+1
|
* clean up main class discovery mechanism and offer interactive choiceChristopher Vogt2016-10-021-36/+54
| | | | if multiple main classes are found
* Added run with package discoveryChavXO2016-09-291-0/+37
|
* Use correct main method for Dottydoc - the java interfaceChristopher Vogt2016-09-281-5/+11
| | | | and work around the fact that the main method is not static (huh?)