Skip to content

Commit

Permalink
Travis cleanup (#326)
Browse files Browse the repository at this point in the history
* bumping SBT version for ide; fixing some warnings per https://www.scala-sbt.org/1.x/docs/Migrating-from-sbt-013x.html#slash

* fixing a bug in if-then-else
  • Loading branch information
ivoysey committed Apr 21, 2021
1 parent e7a3ad5 commit 25f5d3e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .idea/sbt.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ scalacOptions := Seq("-unchecked", "-deprecation")

libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2"

assemblyJarName in assembly := "obsidianc.jar"
assembly / assemblyJarName := "obsidianc.jar"

unmanagedResourceDirectories in Compile += baseDirectory.value / "Obsidian_Runtime/src/main/java/Runtime/edu/cmu/cs/obsidian"
includeFilter in (Compile, unmanagedResources) := "*.obs"
Compile / unmanagedResourceDirectories += baseDirectory.value / "Obsidian_Runtime/src/main/java/Runtime/edu/cmu/cs/obsidian"
Compile / unmanagedResources / includeFilter := "*.obs"

/* Don't throw TrapExitSecurityException.
* Also, allow passing return code through SBT without
Expand All @@ -44,12 +44,12 @@ libraryDependencies += "org.apache.commons" % "commons-io" % "1.3.2"
/* settings for assembly */

// don't get confused about multiple META-INF/MANIFEST.MF
assemblyMergeStrategy in assembly := {
assembly / assemblyMergeStrategy := {
case PathList("META-INF", "MANIFEST.MF") => MergeStrategy.discard
case x if x.contains("module-info.class") => MergeStrategy.discard // https://stackoverflow.com/questions/54834125/sbt-assembly-deduplicate-module-info-class
case x if x.contains("io.netty.versions.properties") => MergeStrategy.discard
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
val oldStrategy = ( assembly / assemblyMergeStrategy).value
oldStrategy(x)
}

2 changes: 1 addition & 1 deletion src/main/scala/edu/cmu/cs/obsidian/codegen/Util.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ object Util {
def callvaluecheck: YulStatement = codegen.If(FunctionCall(Identifier("callvalue"), Seq()), Block(Seq(ExpressionStatement(FunctionCall(Identifier("revert"), Seq(ilit(0), ilit(0)))))))
def unary(n: String, e: Expression): Expression = FunctionCall(Identifier(n),Seq(e))
def binary(n : String, e1: Expression, e2: Expression): Expression = FunctionCall(Identifier(n), Seq(e1, e2))
def store_then_ret(retvar:Identifier, e:Expression) = Seq(edu.cmu.cs.obsidian.codegen.Assignment(Seq(retvar),e), ExpressionStatement(e))
def store_then_ret(retvar:Identifier, e:Expression) = Seq(edu.cmu.cs.obsidian.codegen.Assignment(Seq(retvar),e)) //todo this may not be needed once i work out more cases

val true_lit: Literal = blit(true)
val false_lit: Literal = blit(false)
Expand Down

0 comments on commit 25f5d3e

Please sign in to comment.