Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Enable straight-to-jar compilation #597

Merged
merged 29 commits into from
Oct 8, 2018
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7b2e998
Straight to jar compilation
lukaszwawrzyk Sep 12, 2018
5932814
Close classloader after analyzing generated classes
lukaszwawrzyk Oct 1, 2018
b9caefd
Initial reworks
lukaszwawrzyk Sep 18, 2018
9f833af
Change the way of injecting javac temp dir to keep binary compatibility
lukaszwawrzyk Sep 18, 2018
b4e54c3
Refactor JaredClass
lukaszwawrzyk Sep 18, 2018
0f54b6d
Added more comments
lukaszwawrzyk Sep 20, 2018
7e4cab5
Simplified product stamps
lukaszwawrzyk Sep 24, 2018
1c93dec
Rename STJ to JarUtils
lukaszwawrzyk Sep 27, 2018
a6aab45
Renamed JaredClass to ClassInJar
lukaszwawrzyk Sep 27, 2018
596d58c
Create JarUtils only once in CallbackGlobal
lukaszwawrzyk Sep 27, 2018
31484ad
Moved prev jar path generation and resolving to AnalysisCallback
lukaszwawrzyk Sep 28, 2018
a680bcd
Add xsbti.AnalysisCallback.previousJar to mima exceptions
lukaszwawrzyk Sep 28, 2018
65cc488
Extract compileToJar as a parameter to scripted tests
lukaszwawrzyk Oct 1, 2018
5f72534
Explicitly normalize path for windows case
lukaszwawrzyk Oct 1, 2018
1d3e60f
Improved error message in checkNoGeneratedClassFiles
lukaszwawrzyk Oct 1, 2018
17bf07b
map + getOrElse => match for readability
lukaszwawrzyk Oct 1, 2018
ff27cac
Changed pause in scripted to print copy friendly message
lukaszwawrzyk Oct 1, 2018
15f631e
Move jar content logic out of bridge
lukaszwawrzyk Oct 2, 2018
a3f31c0
Disable parallel test run for compilation to jar
lukaszwawrzyk Oct 2, 2018
c128200
Switch to IndexBasedZipFsOps to list class files
lukaszwawrzyk Oct 2, 2018
2ddcd8d
Parallelize scripted tests for --to-jar enabled and disabled
lukaszwawrzyk Oct 3, 2018
6257872
Add temporaryClassesDirectory field to CompileOptions
lukaszwawrzyk Oct 3, 2018
0bbc115
Fix binary issues
lukaszwawrzyk Oct 3, 2018
ffbef5d
Revert adding flag to disable compression when storing analysis
lukaszwawrzyk Oct 3, 2018
dffbfd0
Add docs and fix OutputJarContent
lukaszwawrzyk Oct 3, 2018
72639e1
Extract preparation and cleanpu phase for prev jar to methods
lukaszwawrzyk Oct 3, 2018
0130097
Add final modifications to straight-to-jar changes
jvican Oct 4, 2018
e9920ce
Make OutputJarContent a class to allow parallelism.
lukaszwawrzyk Oct 5, 2018
a588991
Use matrix for scripted tests
lukaszwawrzyk Oct 8, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Explicitly normalize path for windows case
  • Loading branch information
lukaszwawrzyk committed Oct 1, 2018
commit 5f7253421a9f454b07a2d96d6ec1692e1c194583
Original file line number Diff line number Diff line change
@@ -346,14 +346,19 @@ case class ProjectStructure(

def checkProducts(i: IncInstance, src: String, expected: List[String]): Unit = {
val analysis = compile(i)

def isWindows: Boolean = sys.props("os.name").toLowerCase.startsWith("win")
def relativeClassDir(f: File): File = f.relativeTo(classesDir) getOrElse f
def normalizePath(path: String): String = {
if (isWindows) path.replace('\\', '/') else path
}
def products(srcFile: String): Set[String] = {
val productFiles = analysis.relations.products(baseDirectory / srcFile)
productFiles.map { file =>
if (JarUtils.isClassInJar(file)) {
JarUtils.ClassInJar.fromFile(file).relClass
} else {
relativeClassDir(file).getPath.replace('\\', '/')
normalizePath(relativeClassDir(file).getPath)
}
}
}