Skip to content

Commit e4e9b5c

Browse files
only gradual mode
Reviewed By: VLanvin Differential Revision: D59971569 fbshipit-source-id: 93fdc6eb83ff3240e445152430b9063df7c1732f
1 parent d6e6421 commit e4e9b5c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+491
-1682
lines changed

eqwalizer/src/main/resources/application.conf

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ eqwalizer {
44
code_width = 100
55
ast_dir = elp-ast
66
ast_dir = ${?EQWALIZER_ELP_AST_DIR}
7-
gradual_typing = true
8-
gradual_typing = ${?EQWALIZER_GRADUAL_TYPING}
97
approximate_complex_types = true
108
eqwater = true
119
eqwater = ${?EQWALIZER_EQWATER}

eqwalizer/src/main/scala/com/whatsapp/eqwalizer/Pipeline.scala

+1-9
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ object Pipeline {
4747
case (_, Some(overloadedSpec)) =>
4848
checkOverloadedFun(ctx, f, overloadedSpec)
4949
case _ =>
50-
if (ctx.gradualTyping)
51-
checkFun(ctx, f, getDynamicFunSpecType(f))
52-
else
53-
NoSpecFuncDecl(f.id)(f.pos)
50+
checkFun(ctx, f, getDynamicFunSpecType(f))
5451
}
5552
if (noCheckFuns.contains(f.id)) {
5653
result.addOne(applyNowarnToFun(f, checkedF, noCheckFuns(f.id)))
@@ -77,11 +74,6 @@ object Pipeline {
7774
result.toList
7875
}
7976

80-
def traverseForms(forms: List[ExternalForm], listener: AstListener): Unit = {
81-
val traverse = new Traverse(listener)
82-
traverse.traverseForms(forms)
83-
}
84-
8577
private def getDynamicFunSpecType(f: FunDecl): FunSpec =
8678
FunSpec(f.id, FunType(Nil, List.fill(f.id.arity)(DynamicType), DynamicType))(f.pos)
8779

eqwalizer/src/main/scala/com/whatsapp/eqwalizer/ast/AstListener.scala

-65
This file was deleted.

eqwalizer/src/main/scala/com/whatsapp/eqwalizer/ast/Forms.scala

-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ object Forms {
8080
case class InvalidRecDecl(name: String, te: Invalid)(val pos: Pos) extends InvalidForm
8181
case class InvalidConvertTypeInRecDecl(name: String, te: Invalid)(val pos: Pos) extends InvalidForm
8282

83-
case class NoSpecFuncDecl(id: Id)(val pos: Pos) extends InternalForm
8483
case class FuncDecl(id: Id, errors: List[TypeError])(val pos: Pos) extends InternalForm
8584
case class MisBehaviour(te: BehaviourError)(val pos: Pos) extends InternalForm
8685

eqwalizer/src/main/scala/com/whatsapp/eqwalizer/ast/Show.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ case class Show(pipelineContext: Option[PipelineContext]) {
116116
if !forceShowModule &&
117117
((rid.module == "erlang" && builtinTypes.contains(rid.name)) ||
118118
rid.module == ctx.module ||
119-
(ctx.gradualTyping && rid == RemoteId("eqwalizer", "dynamic", 0)) ||
120-
(ctx.gradualTyping && rid == RemoteId("eqwalizer", "dynamic", 1))) =>
119+
(rid == RemoteId("eqwalizer", "dynamic", 0)) ||
120+
(rid == RemoteId("eqwalizer", "dynamic", 1))) =>
121121
rid.name
122122
case _ => s"${rid.module}:${rid.name}"
123123
}

0 commit comments

Comments
 (0)