Skip to content

Commit

Permalink
Bump houserules and Contraband
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Feb 23, 2019
1 parent 67b147d commit a7cb4be
Show file tree
Hide file tree
Showing 59 changed files with 178 additions and 168 deletions.
18 changes: 14 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ def mimaSettings: Seq[Setting[_]] = Seq(
mimaPreviousArtifacts := Set(
"1.0.0", "1.0.1", "1.0.2", "1.0.3", "1.0.4", "1.0.5",
"1.1.0", "1.1.1", "1.1.2", "1.1.3",
"1.2.0",
"1.2.0", "1.2.1", "1.2.2",
) map (version =>
organization.value %% moduleName.value % version
cross (if (crossPaths.value) CrossVersion.binary else CrossVersion.disabled)
),
)

def buildLevelSettings: Seq[Setting[_]] = Seq(
git.baseVersion := "1.2.1",
git.baseVersion := "1.3.0",
// https://github.com/sbt/sbt-git/issues/109
// Workaround from https://github.com/sbt/sbt-git/issues/92#issuecomment-161853239
git.gitUncommittedChanges := {
Expand Down Expand Up @@ -90,8 +90,6 @@ def compilerVersionDependentScalacOptions: Seq[Setting[_]] = Seq(
old filterNot Set(
"-Xfatal-warnings",
"-deprecation",
"-Ywarn-unused",
"-Ywarn-unused-import",
"-YdisableFlatCpCaching",
)
}
Expand Down Expand Up @@ -202,6 +200,11 @@ lazy val zincPersist = (project in internalPath / "zinc-persist")
name := "zinc Persist",
libraryDependencies += sbinary,
compileOrder := sbt.CompileOrder.Mixed,
Compile / scalacOptions ++= (scalaVersion.value match {
case VersionNumber(Seq(2, 12, _*), _, _) =>
List("-Ywarn-unused:-imports,-locals,-implicits,-explicits,-privates")
case _ => Nil
}),
PB.targets in Compile := List(scalapb.gen() -> (sourceManaged in Compile).value),
mimaSettings,
mimaBinaryIssueFilters ++= {
Expand Down Expand Up @@ -472,6 +475,13 @@ lazy val compilerBridgeTemplate: Project = (project in internalPath / "compiler-
baseSettings,
noSourcesForTemplate,
compilerVersionDependentScalacOptions,
// We need this for import Compat._
Compile / scalacOptions --= Seq("-Ywarn-unused-import", "-Xfatal-warnings"),
Compile / scalacOptions ++= (scalaVersion.value match {
case VersionNumber(Seq(2, 12, _*), _, _) =>
List("-Ywarn-unused:-imports,-locals,-implicits,-explicits,-privates")
case _ => Nil
}),
libraryDependencies += scalaCompiler.value % "provided",
autoScalaLibrary := false,
// precompiledSettings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ sealed class ZincCompiler(settings: Settings, dreporter: DelegatingReporter, out
if (sym.isNestedClass) b.append(nme.MODULE_SUFFIX_STRING) else b.append(separator)
b.append(chrs, symName.start, nSize)
}
()
}
loop(suffix.length(), symbol)
b.append(suffix)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package xsbt
import java.io.File
import java.util.Optional

import scala.reflect.internal.util.{ FakePos, NoPosition, Position, RangePosition }
import scala.reflect.internal.util.{ FakePos, NoPosition, Position }
// Left for compatibility
import Compat._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public static AnalyzedClass create(long _compilationTimestamp, String _name, xsb
public static AnalyzedClass of(long _compilationTimestamp, String _name, xsbti.api.Lazy<Companions> _api, int _apiHash, NameHash[] _nameHashes, boolean _hasMacro, int _extraHash) {
return new AnalyzedClass(_compilationTimestamp, _name, _api, _apiHash, _nameHashes, _hasMacro, _extraHash);
}

private long compilationTimestamp;
private String name;
private xsbti.api.Lazy<Companions> api;
Expand Down Expand Up @@ -46,6 +45,7 @@ protected AnalyzedClass(long _compilationTimestamp, String _name, xsbti.api.Lazy
hasMacro = _hasMacro;
extraHash = _extraHash;
}

public long compilationTimestamp() {
return this.compilationTimestamp;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ public static Annotated create(Type _baseType, Annotation[] _annotations) {
public static Annotated of(Type _baseType, Annotation[] _annotations) {
return new Annotated(_baseType, _annotations);
}

private Type baseType;
private Annotation[] annotations;
protected Annotated(Type _baseType, Annotation[] _annotations) {
super();
baseType = _baseType;
annotations = _annotations;
}

public Type baseType() {
return this.baseType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ public static Annotation create(Type _base, AnnotationArgument[] _arguments) {
public static Annotation of(Type _base, AnnotationArgument[] _arguments) {
return new Annotation(_base, _arguments);
}

private Type base;
private AnnotationArgument[] arguments;
protected Annotation(Type _base, AnnotationArgument[] _arguments) {
super();
base = _base;
arguments = _arguments;
}

public Type base() {
return this.base;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ public static AnnotationArgument create(String _name, String _value) {
public static AnnotationArgument of(String _name, String _value) {
return new AnnotationArgument(_name, _value);
}

private String name;
private String value;
protected AnnotationArgument(String _name, String _value) {
super();
name = _name;
value = _value;
}

public String name() {
return this.name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public static ClassLike create(String _name, Access _access, Modifiers _modifier
public static ClassLike of(String _name, Access _access, Modifiers _modifiers, Annotation[] _annotations, DefinitionType _definitionType, xsbti.api.Lazy<Type> _selfType, xsbti.api.Lazy<Structure> _structure, String[] _savedAnnotations, Type[] _childrenOfSealedClass, boolean _topLevel, TypeParameter[] _typeParameters) {
return new ClassLike(_name, _access, _modifiers, _annotations, _definitionType, _selfType, _structure, _savedAnnotations, _childrenOfSealedClass, _topLevel, _typeParameters);
}

private DefinitionType definitionType;
private xsbti.api.Lazy<Type> selfType;
private xsbti.api.Lazy<Structure> structure;
Expand All @@ -30,6 +29,7 @@ protected ClassLike(String _name, Access _access, Modifiers _modifiers, Annotati
topLevel = _topLevel;
typeParameters = _typeParameters;
}

public DefinitionType definitionType() {
return this.definitionType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ public static ClassLikeDef create(String _name, Access _access, Modifiers _modif
public static ClassLikeDef of(String _name, Access _access, Modifiers _modifiers, Annotation[] _annotations, TypeParameter[] _typeParameters, DefinitionType _definitionType) {
return new ClassLikeDef(_name, _access, _modifiers, _annotations, _typeParameters, _definitionType);
}

private DefinitionType definitionType;
protected ClassLikeDef(String _name, Access _access, Modifiers _modifiers, Annotation[] _annotations, TypeParameter[] _typeParameters, DefinitionType _definitionType) {
super(_name, _access, _modifiers, _annotations, _typeParameters);
definitionType = _definitionType;
}

public DefinitionType definitionType() {
return this.definitionType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ public static Companions create(ClassLike _classApi, ClassLike _objectApi) {
public static Companions of(ClassLike _classApi, ClassLike _objectApi) {
return new Companions(_classApi, _objectApi);
}

private ClassLike classApi;
private ClassLike objectApi;
protected Companions(ClassLike _classApi, ClassLike _objectApi) {
super();
classApi = _classApi;
objectApi = _objectApi;
}

public ClassLike classApi() {
return this.classApi;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ public static Constant create(Type _baseType, String _value) {
public static Constant of(Type _baseType, String _value) {
return new Constant(_baseType, _value);
}

private Type baseType;
private String value;
protected Constant(Type _baseType, String _value) {
super();
baseType = _baseType;
value = _value;
}

public Type baseType() {
return this.baseType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ public static Def create(String _name, Access _access, Modifiers _modifiers, Ann
public static Def of(String _name, Access _access, Modifiers _modifiers, Annotation[] _annotations, TypeParameter[] _typeParameters, ParameterList[] _valueParameters, Type _returnType) {
return new Def(_name, _access, _modifiers, _annotations, _typeParameters, _valueParameters, _returnType);
}

private ParameterList[] valueParameters;
private Type returnType;
protected Def(String _name, Access _access, Modifiers _modifiers, Annotation[] _annotations, TypeParameter[] _typeParameters, ParameterList[] _valueParameters, Type _returnType) {
super(_name, _access, _modifiers, _annotations, _typeParameters);
valueParameters = _valueParameters;
returnType = _returnType;
}

public ParameterList[] valueParameters() {
return this.valueParameters;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
package xsbti.api;
public abstract class Definition implements java.io.Serializable {


private String name;
private Access access;
private Modifiers modifiers;
Expand All @@ -18,6 +17,7 @@ protected Definition(String _name, Access _access, Modifiers _modifiers, Annotat
modifiers = _modifiers;
annotations = _annotations;
}

public String name() {
return this.name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ public static Existential create(Type _baseType, TypeParameter[] _clause) {
public static Existential of(Type _baseType, TypeParameter[] _clause) {
return new Existential(_baseType, _clause);
}

private Type baseType;
private TypeParameter[] clause;
protected Existential(Type _baseType, TypeParameter[] _clause) {
super();
baseType = _baseType;
clause = _clause;
}

public Type baseType() {
return this.baseType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public static ExternalDependency create(String _sourceClassName, String _targetP
public static ExternalDependency of(String _sourceClassName, String _targetProductClassName, xsbti.api.AnalyzedClass _targetClass, xsbti.api.DependencyContext _context) {
return new ExternalDependency(_sourceClassName, _targetProductClassName, _targetClass, _context);
}

private String sourceClassName;
private String targetProductClassName;
private xsbti.api.AnalyzedClass targetClass;
Expand All @@ -24,6 +23,7 @@ protected ExternalDependency(String _sourceClassName, String _targetProductClass
targetClass = _targetClass;
context = _context;
}

public String sourceClassName() {
return this.sourceClassName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
package xsbti.api;
public abstract class FieldLike extends xsbti.api.ClassDefinition {


private Type tpe;
protected FieldLike(String _name, Access _access, Modifiers _modifiers, Annotation[] _annotations, Type _tpe) {
super(_name, _access, _modifiers, _annotations);
tpe = _tpe;
}

public Type tpe() {
return this.tpe;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ public static Id create(String _id) {
public static Id of(String _id) {
return new Id(_id);
}

private String id;
protected Id(String _id) {
super();
id = _id;
}

public String id() {
return this.id;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ public static IdQualifier create(String _value) {
public static IdQualifier of(String _value) {
return new IdQualifier(_value);
}

private String value;
protected IdQualifier(String _value) {
super();
value = _value;
}

public String value() {
return this.value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public static InternalDependency create(String _sourceClassName, String _targetC
public static InternalDependency of(String _sourceClassName, String _targetClassName, xsbti.api.DependencyContext _context) {
return new InternalDependency(_sourceClassName, _targetClassName, _context);
}

private String sourceClassName;
private String targetClassName;
private xsbti.api.DependencyContext context;
Expand All @@ -22,6 +21,7 @@ protected InternalDependency(String _sourceClassName, String _targetClassName, x
targetClassName = _targetClassName;
context = _context;
}

public String sourceClassName() {
return this.sourceClassName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public static MethodParameter create(String _name, Type _tpe, boolean _hasDefaul
public static MethodParameter of(String _name, Type _tpe, boolean _hasDefault, ParameterModifier _modifier) {
return new MethodParameter(_name, _tpe, _hasDefault, _modifier);
}

private String name;
private Type tpe;
private boolean hasDefault;
Expand All @@ -24,6 +23,7 @@ protected MethodParameter(String _name, Type _tpe, boolean _hasDefault, Paramete
hasDefault = _hasDefault;
modifier = _modifier;
}

public String name() {
return this.name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public static NameHash create(String _name, xsbti.UseScope _scope, int _hash) {
public static NameHash of(String _name, xsbti.UseScope _scope, int _hash) {
return new NameHash(_name, _scope, _hash);
}

private String name;
private xsbti.UseScope scope;
private int hash;
Expand All @@ -22,6 +21,7 @@ protected NameHash(String _name, xsbti.UseScope _scope, int _hash) {
scope = _scope;
hash = _hash;
}

public String name() {
return this.name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ public static Package create(String _name) {
public static Package of(String _name) {
return new Package(_name);
}

private String name;
protected Package(String _name) {
super();
name = _name;
}

public String name() {
return this.name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ public static ParameterList create(MethodParameter[] _parameters, boolean _isImp
public static ParameterList of(MethodParameter[] _parameters, boolean _isImplicit) {
return new ParameterList(_parameters, _isImplicit);
}

private MethodParameter[] parameters;
private boolean isImplicit;
protected ParameterList(MethodParameter[] _parameters, boolean _isImplicit) {
super();
parameters = _parameters;
isImplicit = _isImplicit;
}

public MethodParameter[] parameters() {
return this.parameters;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ public static ParameterRef create(String _id) {
public static ParameterRef of(String _id) {
return new ParameterRef(_id);
}

private String id;
protected ParameterRef(String _id) {
super();
id = _id;
}

public String id() {
return this.id;
}
Expand Down
Loading

0 comments on commit a7cb4be

Please sign in to comment.