Skip to content

Commit

Permalink
Merge pull request #9 from Sizmek/issue-8
Browse files Browse the repository at this point in the history
Fix #8 by making of fsi.stringBuilder() call to be accessible from any package
  • Loading branch information
AnderEnder authored May 16, 2018
2 parents 06de8db + d6f2881 commit eb33bc8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions macros/src/main/scala/com/sizmek/fsi/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ package object fsi {
}

/** A method to access the thread-local pool for cached string builder instances.
* It is used internally in generated code only.
* It is used internally in generated code.
*
* WARNING: Do not reuse an instance of cached string builder in nested functions or in different threads.
*
* @return a cached instance of `java.lang.StringBuilder`
*/
private[fsi] def stringBuilder(): java.lang.StringBuilder = pool.get()
def stringBuilder(): java.lang.StringBuilder = pool.get()

private object Impl {
def fs(c: blackbox.Context)(args: c.Expr[Any]*): c.Expr[String] = fx(c)(args: _*)(treatEscapes)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sizmek.fsi.macros
package com.sizmek.specs.fsi

import com.sizmek.fsi._
import org.scalatest.exceptions.TestFailedException
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "0.1.1-SNAPSHOT"
version in ThisBuild := "0.2.0-SNAPSHOT"

0 comments on commit eb33bc8

Please sign in to comment.