-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace
OutputSetting
by OutputGroup
`OutputSetting` is like `OutputGroup` by just returns strings instead of files. I see no reason why `OutputGroup` should not be used instead, therefore simplifying the Zinc API and allowing users to have access to files and not mere strings. If they want strings, they always can do `getAbsolutePath`. N.B. This is good for machine independence.
- Loading branch information
Showing
9 changed files
with
53 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
internal/compiler-interface/src/main/java/xsbti/compile/OutputGroup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package xsbti.compile; | ||
|
||
import java.io.File; | ||
|
||
/** Define the interface of a group of outputs. */ | ||
public interface OutputGroup { | ||
/** | ||
* Return the directory where source files are stored for this group. | ||
* | ||
* Note that source directories should uniquely identify the group | ||
* for a certain source file. | ||
*/ | ||
public File sourceDirectory(); | ||
|
||
/** | ||
* Return the directory where class files should be generated. | ||
* | ||
* Incremental compilation manages the class files in this directory, so | ||
* don't play with this directory out of the Zinc API. Zinc already takes | ||
* care of deleting classes before every compilation run. | ||
* | ||
* This directory must be exclusively used for one set of sources. | ||
*/ | ||
public File outputDirectory(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
internal/zinc-core/src/main/scala/sbt/internal/inc/OutputGroup.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package sbt.internal.inc | ||
|
||
import java.io.File | ||
|
||
import xsbti.compile.OutputGroup | ||
|
||
case class SimpleOutputGroup(sourceDirectory: File, outputDirectory: File) extends OutputGroup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters