Details

      Description

      00:22 ~/Projects/210x/sandbox (2.10.x)$ scala
      Welcome to Scala version 2.10.2-20130329-164357-00fcd46ed0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_43).
      Type in expressions to have them evaluated.
      Type :help for more information.
      
      scala> val tb = cm.mkToolBox()
      tb: scala.tools.reflect.ToolBox[reflect.runtime.universe.type] = scala.tools.reflect.ToolBoxFactory$ToolBoxImpl@5101a031
      
      scala> tb.parse("x").pos
      res0: tb.u.Position = NoPosition
      

        Activity

        Show
        Eugene Burmako added a comment - https://github.com/scala/scala/pull/2357
        Hide
        Jean-Remi Desjardins added a comment -

        Hi,

        Is there anything I can do to help get this bug fixed?

        I have a project (https://github.com/jedesah/scala-codesheet-api if your curious) which has just under 100 tests and almost all of them will fail with unpositioned trees.

        Having to use a custom version of Scala is giving me trouble in regard to integrating my evaluation engine into my Play! webapp. For what it's worth in regard to Paul's questions, I patched the compiler by removing the assert in setPos and therefore the guard against emptyValDef because that makes the most sense to me.

        While we're at it. Once the patch is applied the lines of the positions are off by one. I believe this is due to the Wrapper Object that is added in order to support compiling standalone expressions. I just handle it in my client code but it would probably be nicer to fix this internally.

        Like I said is there anything I can do to help advance this issue. I would be very happy if this could be fixed as part of the next stable release of the 2.10.x branch.

        Thx for your time

        Show
        Jean-Remi Desjardins added a comment - Hi, Is there anything I can do to help get this bug fixed? I have a project ( https://github.com/jedesah/scala-codesheet-api if your curious) which has just under 100 tests and almost all of them will fail with unpositioned trees. Having to use a custom version of Scala is giving me trouble in regard to integrating my evaluation engine into my Play! webapp. For what it's worth in regard to Paul's questions, I patched the compiler by removing the assert in setPos and therefore the guard against emptyValDef because that makes the most sense to me. While we're at it. Once the patch is applied the lines of the positions are off by one. I believe this is due to the Wrapper Object that is added in order to support compiling standalone expressions. I just handle it in my client code but it would probably be nicer to fix this internally. Like I said is there anything I can do to help advance this issue. I would be very happy if this could be fixed as part of the next stable release of the 2.10.x branch. Thx for your time
        Hide
        Eugene Burmako added a comment -

        Since you mentioned that you already have a patched version of the compiler, could you submit a pull request to scala/scala? You could also include the fix to the off-by-one problem.

        Show
        Eugene Burmako added a comment - Since you mentioned that you already have a patched version of the compiler, could you submit a pull request to scala/scala? You could also include the fix to the off-by-one problem.
        Hide
        Jean-Remi Desjardins added a comment -
        Show
        Jean-Remi Desjardins added a comment - Here we go: https://github.com/scala/scala/pull/2794
        Hide
        Eugene Burmako added a comment -

        Thank you! I will take a look today.

        Show
        Eugene Burmako added a comment - Thank you! I will take a look today.
        Show
        Adriaan Moors added a comment - https://github.com/scala/scala/pull/2830
        Show
        Adriaan Moors added a comment - https://github.com/scala/scala/pull/2830

          People

          • Assignee:
            Denys Shabalin
            Reporter:
            Eugene Burmako
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development