incubator-esme-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Hirsch <hirsch.d...@gmail.com>
Subject Re: Move to latest Lift release for 1.2
Date Sat, 11 Dec 2010 10:38:28 GMT
On Sat, Dec 11, 2010 at 5:09 AM, Vladimir Ivanov <lester.mail@gmail.com> wrote:
> Guys,
> I suppose most of the issues above have been already fixed by more
> experienced developers, but might be this info would be useful. I managed to
> fix following compile-time errors:

The other ESME developers are pretty busy right now between other work
and ESME, so we need all the help we can get to get this next release.

If you feel up to it, you might like to take a look at our JIRA list
for this release (
https://issues.apache.org/jira/secure/BrowseVersion.jspa?id=12310850&versionId=12315284&showOpenIssuesOnly=true)
- maybe you'll see some other issues that you might be able to solve.

> 1) Problem with net.liftweb.http.testing._ package was fixed by changing
> Maven scope of lift-testkit module from 'test' to 'compile'
> 2) AccessPool.getPoolName(poolId: long) method should have parameter with
> explicit type Long instead of long which used to be in Scala.Predef in
> 2.7.7. I also added explicit type declaration Full(p : AccessPool) to
> pattern matching in the same method two lines below; same was done for
> User.getNickname(userId: Long) method and Full(u : User)
> 3) Message class: due to User.nickname is an object, 'is' method should be
> used to get String value: following.map(user => user.nickname.is)
> 4) In SchedulerActor and UserActor new element was added to the end of
> (immutable, i.e. new) List with '+=' method. I suppose now it should be
> changed to ':+' method in scala.collection.immutable.List, which, an
> according to Scaladoc, performs the same operation (Appends an element to
> this list, returns a new list consisting of all elements of this list
> followed by elem).
>       SchedulerActor: regularsPerAction(id) :+ regularActor
>       UserActor: case AllowPool(poolId) => pools :+ poolId
> 5) Concerning AccessPoolMgr, because SHtml.select method accepts Seq[String.
> String] as a first parameter and Enumeration.map method is
> deprecated, Permission.values.map and toSeq should be used instead:
>     val permissions = Permission.values.map(perm => (perm.id.toString,
> perm.toString)).toSeq
> 6) It seems ServiceTracker.startAdmin() method in Boot class currently
> accepts com.twitter.ostrich.RuntimeEnvironment comparing to old version
> with net.lag.configgy.RuntimeEnvironment as a parameter, so I changed
> imports accordingly
> import com.twitter.ostrich.{ServiceTracker, Stats, StatsMBean,
> RuntimeEnvironment}
> import net.lag.configgy.Config
>
> Now I'm observing only 3 errors related to TwitterAPI and API2 which I
> haven't looked into.
> I have no access to SVN repository, so I attached files that had been
> changed to this message - may be someone from ESME developer team find some
> time to look at the differences with kdiff or similar tool. Hope it helps.

Awesome . Thanks a lot

Usually it is difficult to post files to the esme-dev mailing list. It
is probably better to attach the files to the JIRA item:
https://issues.apache.org/jira/browse/ESME-313.

D.

> Vladimir
>
> 2010/12/8 Richard Hirsch <hirsch.dick@gmail.com>
>>
>> It looks like twitter has moved its libraries to 2.8 - so we are fine
>> there as well.
>>
>> Done all that I can - somebody else with more scala skills has to continue
>> now
>>
>> Here are the new errors:
>>
>> [WARNING]
>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\bootstrap\liftweb\Boot.scala:231:
>> error: overloaded method value startAdmin with alternatives:
>> [WARNING]   (config: com.twitter.ostrich.Config,runtime:
>> com.twitter.ostrich.RuntimeEnvironment)Unit <and>
>> [WARNING]   (configgy: net.lag.configgy.ConfigMap,runtime:
>> com.twitter.ostrich.RuntimeEnvironment)Unit
>> [WARNING]  cannot be applied to (net.lag.configgy.Config,
>> net.lag.configgy.RuntimeEnvironment)
>> [WARNING]     ServiceTracker.startAdmin(config, runtime)
>> [WARNING]                    ^
>> [WARNING]
>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\actor\HttpSender.scala:27:
>> error: value testing is not a member of package net.liftweb.http
>> [WARNING] import net.liftweb.http.testing._
>> [WARNING]                         ^
>> [WARNING]
>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\actor\HttpSender.scala:39:
>> error: missing parameter type for expanded function ((x0$1) => x0$1
>> match {
>> [WARNING]   case SendAMessage((action @ _), (msg @ _), (user @ _),
>> (reason @ _), (token @ _)) => send(action, msg, user, reason, token)
>> [WARNING]   case _ => ()
>> [WARNING] })
>> [WARNING]   protected def messageHandler = {
>> [WARNING]                                  ^
>> [WARNING]
>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\actor\SchedulerActor.scala:43:
>> error: type mismatch;
>> [WARNING]  found   : org.apache.esme.actor.SchedulerActor.SchedulerActor
>> [WARNING]  required: String
>> [WARNING]         regularsPerAction(id) += regularActor
>> [WARNING]                                  ^
>> [WARNING]
>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\actor\UserActor.scala:193:
>> error: type mismatch;
>> [WARNING]  found   : Long
>> [WARNING]  required: String
>> [WARNING]       case AllowPool(poolId) => pools += poolId
>> [WARNING]                                          ^
>> [WARNING]
>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\actor\UserActor.scala:264:
>> error: value ! is not a member of object
>> org.apache.esme.actor.HttpSender
>> [WARNING]                 HttpSender ! HttpSender.SendAMessage(m, msg,
>> u, reason, td.uniqueId))
>> [WARNING]                 ^
>> [WARNING]
>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\actor\UserActor.scala:268:
>> error: value ! is not a member of object
>> org.apache.esme.actor.HttpSender
>> [WARNING]                 HttpSender ! HttpSender.SendAMessage(h, msg,
>> u, reason, td.uniqueId))
>> [WARNING]                 ^
>> [WARNING]
>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\api\API2.scala:726:
>> error: type mismatch;
>> [WARNING]  found   : net.liftweb.common.Full[(Int,
>> scala.collection.immutable.Map[Nothing,Nothing], object
>> net.liftweb.common.Empty)]
>> [WARNING]  required: net.liftweb.http.LiftResponse
>> [WARNING]     Full((403,Map(),Empty))
>> [WARNING]         ^
>> [WARNING]
>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\api\TwitterAPI.scala:422:
>> error: not found: value nodeSeqToResponse
>> [WARNING]       {() => Full(nodeSeqToResponse(toXml(unbox(x)))) }
>> [WARNING]                   ^
>> [WARNING]
>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\api\TwitterAPI.scala:444:
>> error: value next is not a member of Iterable[Any]
>> [WARNING]     case m: Map[String, Any] => toJson(m.values.next)
>> [WARNING]                                                
^
>> [WARNING]
>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\lib\AccessPoolMgr.scala:185:
>> error: missing arguments for method collect in trait Iterator;
>> [WARNING] follow this method with `_' if you want to treat it as a
>> partially applied function
>> [WARNING]     val permissions = Permission.map(perm =>
>> (perm.id.toString, perm.toString)).collect
>> [WARNING]
>>                   ^
>> [WARNING]
>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\model\AccessPool.scala:47:
>> error: not found: type long
>> [WARNING]   def getPoolName(poolId: long) = {
>> [WARNING]                           ^
>> [WARNING]
>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\model\AccessPool.scala:49:
>> error: value getName is not a member of Any
>> [WARNING]       case Full(p) => p.getName
>> [WARNING]                         ^
>> [WARNING]
>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\model\User.scala:190:
>> error: not found: type long
>> [WARNING]   def getNickname(userId: long) = {
>> [WARNING]                           ^
>> [WARNING]
>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\model\User.scala:192:
>> error: value nickname is not a member of Any
>> [WARNING]       case Full(u) => u.nickname.is
>> [WARNING]                         ^
>> [WARNING]
>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\model\Message.scala:148:
>> error: type mismatch;
>> [WARNING]  found   : List[object org.apache.esme.model.User#nickname]
>> [WARNING]  required: scala.List[String]
>> [WARNING]     val users:List[String] = following.map(user =>
>> user.nickname)
>> [WARNING]                                           ^
>> [WARNING] 16 errors found
>>
>>
>> On Wed, Dec 8, 2010 at 3:04 PM, Richard Hirsch <hirsch.dick@gmail.com>
>> wrote:
>> > Got answer to last problem from lift list - here are the new errors.
>> >
>> > Some of the problemsare associated with our use of ostrich and the
>> > other libraries from twitter which are based on an older scala version
>> > - https://github.com/stevej/ostrich/blob/master/project/build.properties
>> >
>> >
>> > D.
>> >
>> >
>> > [WARNING] error: error while loading StatsMBean, Scala signature
>> > StatsMBean has wrong version
>> > [WARNING]  expected: 5.0
>> > [WARNING]  found: 4.1 in C:\Documents and
>> >
>> > Settings\atw10dw4\.m2\repository\com\twitter\ostrich\1.1.26\ostrich-1.1.26.jar(com/twitter/ostrich/StatsMBean.class)
>> > [WARNING] error: error while loading Stats, Scala signature Stats has
>> > wrong version
>> > [WARNING]  expected: 5.0
>> > [WARNING]  found: 4.1 in C:\Documents and
>> >
>> > Settings\atw10dw4\.m2\repository\com\twitter\ostrich\1.1.26\ostrich-1.1.26.jar(com/twitter/ostrich/Stats.class)
>> > [WARNING] error: error while loading RuntimeEnvironment, Scala
>> > signature RuntimeEnvironment has wrong version
>> > [WARNING]  expected: 5.0
>> > [WARNING]  found: 4.1 in C:\Documents and
>> >
>> > Settings\atw10dw4\.m2\repository\net\lag\configgy\1.5.3\configgy-1.5.3.jar(net/lag/configgy/RuntimeEnvironment.class)
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\bootstrap\liftweb\Boot.scala:227:
>> > error: net.lag.configgy.RuntimeEnvironment does not have a constructor
>> > [WARNING]     val runtime = new RuntimeEnvironment(getClass)
>> > [WARNING]                   ^
>> > [WARNING] error: error while loading Config, Scala signature Config
>> > has wrong version
>> > [WARNING]  expected: 5.0
>> > [WARNING]  found: 4.1 in C:\Documents and
>> >
>> > Settings\atw10dw4\.m2\repository\net\lag\configgy\1.5.3\configgy-1.5.3.jar(net/lag/configgy/Config.class)
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\bootstrap\liftweb\Boot.scala:228:
>> > error: net.lag.configgy.Config does not have a constructor
>> > [WARNING]     val config = new Config
>> > [WARNING]                  ^
>> > [WARNING] error: error while loading ServiceTracker, Scala signature
>> > ServiceTracker has wrong version
>> > [WARNING]  expected: 5.0
>> > [WARNING]  found: 4.1 in C:\Documents and
>> >
>> > Settings\atw10dw4\.m2\repository\com\twitter\ostrich\1.1.26\ostrich-1.1.26.jar(com/twitter/ostrich/ServiceTracker.class)
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\actor\HttpSender.scala:27:
>> > error: value testing is not a member of package net.liftweb.http
>> > [WARNING] import net.liftweb.http.testing._
>> > [WARNING]                         ^
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\actor\HttpSender.scala:39:
>> > error: missing parameter type for expanded function ((x0$1) => x0$1
>> > match {
>> > [WARNING]   case SendAMessage((action @ _), (msg @ _), (user @ _),
>> > (reason @ _), (token @ _)) => send(action, msg, user, reason, token)
>> > [WARNING]   case _ => ()
>> > [WARNING] })
>> > [WARNING]   protected def messageHandler = {
>> > [WARNING]                                  ^
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\actor\SchedulerActor.scala:43:
>> > error: type mismatch;
>> > [WARNING]  found   : org.apache.esme.actor.SchedulerActor.SchedulerActor
>> > [WARNING]  required: String
>> > [WARNING]         regularsPerAction(id) += regularActor
>> > [WARNING]                                  ^
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\actor\UserActor.scala:193:
>> > error: type mismatch;
>> > [WARNING]  found   : Long
>> > [WARNING]  required: String
>> > [WARNING]       case AllowPool(poolId) => pools += poolId
>> > [WARNING]                                          ^
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\actor\UserActor.scala:264:
>> > error: value ! is not a member of object
>> > org.apache.esme.actor.HttpSender
>> > [WARNING]                 HttpSender ! HttpSender.SendAMessage(m, msg,
>> > u, reason, td.uniqueId))
>> > [WARNING]                 ^
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\actor\UserActor.scala:268:
>> > error: value ! is not a member of object
>> > org.apache.esme.actor.HttpSender
>> > [WARNING]                 HttpSender ! HttpSender.SendAMessage(h, msg,
>> > u, reason, td.uniqueId))
>> > [WARNING]                 ^
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\api\API2.scala:726:
>> > error: type mismatch;
>> > [WARNING]  found   : net.liftweb.common.Full[(Int,
>> > scala.collection.immutable.Map[Nothing,Nothing], object
>> > net.liftweb.common.Empty)]
>> > [WARNING]  required: net.liftweb.http.LiftResponse
>> > [WARNING]     Full((403,Map(),Empty))
>> > [WARNING]         ^
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\api\TwitterAPI.scala:422:
>> > error: not found: value nodeSeqToResponse
>> > [WARNING]       {() => Full(nodeSeqToResponse(toXml(unbox(x)))) }
>> > [WARNING]                   ^
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\api\TwitterAPI.scala:444:
>> > error: value next is not a member of Iterable[Any]
>> > [WARNING]     case m: Map[String, Any] => toJson(m.values.next)
>> > [WARNING]                                            
    ^
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\lib\AccessPoolMgr.scala:185:
>> > error: missing arguments for method collect in trait Iterator;
>> > [WARNING] follow this method with `_' if you want to treat it as a
>> > partially applied function
>> > [WARNING]     val permissions = Permission.map(perm =>
>> > (perm.id.toString, perm.toString)).collect
>> > [WARNING]
>> >                   ^
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\model\AccessPool.scala:47:
>> > error: not found: type long
>> > [WARNING]   def getPoolName(poolId: long) = {
>> > [WARNING]                           ^
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\model\AccessPool.scala:49:
>> > error: value getName is not a member of Any
>> > [WARNING]       case Full(p) => p.getName
>> > [WARNING]                         ^
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\model\User.scala:190:
>> > error: not found: type long
>> > [WARNING]   def getNickname(userId: long) = {
>> > [WARNING]                           ^
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\model\User.scala:192:
>> > error: value nickname is not a member of Any
>> > [WARNING]       case Full(u) => u.nickname.is
>> > [WARNING]                         ^
>> > [WARNING]
>> > D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apache\esme\model\Message.scala:148:
>> > error: type mismatch;
>> > [WARNING]  found   : List[object org.apache.esme.model.User#nickname]
>> > [WARNING]  required: scala.List[String]
>> > [WARNING]     val users:List[String] = following.map(user =>
>> > user.nickname)
>> > [WARNING]                                           ^
>> > [WARNING] 22 errors found
>> >
>> >
>> > On Wed, Dec 8, 2010 at 2:09 PM, Richard Hirsch <hirsch.dick@gmail.com>
>> > wrote:
>> >> I fixed the first problem with the definition.
>> >>
>> >> I have no idea how to fix the second problem in User.scala.
>> >>
>> >> D.
>> >>
>> >> On Wed, Dec 8, 2010 at 1:20 PM, Richard Hirsch <hirsch.dick@gmail.com>
>> >> wrote:
>> >>> Created a branch and changed the pom.xml to be based on lift 2.2 RC1
>> >>> and scala 2.8.1
>> >>>
>> >>> Here are the errors:
>> >>>
>> >>> [INFO] suggestion: remove the scalaVersion from pom.xml
>> >>> [ERROR] D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala
>> >>> [ERROR]
>> >>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\..\scala
>> >>> [INFO] Compiling 62 source files to
>> >>> D:\apache\esme\branches\lift-2.2\trunk\serve
>> >>> r\target\classes
>> >>> [WARNING]
>> >>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apach
>> >>> e\esme\model\Message.scala:489: error: expected start of definition
>> >>> [WARNING]   @SearchableProperty{val termVector=TermVector.YES, val
>> >>> analyzer="ste
>> >>> mming"}
>> >>> [WARNING]                      ^
>> >>> [WARNING]
>> >>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apach
>> >>> e\esme\model\Message.scala:495: error: expected start of definition
>> >>> [WARNING]   @SearchableProperty{val termVector=TermVector.YES, val
>> >>> analyzer="def
>> >>> ault"}
>> >>> [WARNING]                      ^
>> >>> [WARNING]
>> >>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apach
>> >>> e\esme\model\Message.scala:498: error: expected start of definition
>> >>> [WARNING]   @SearchableProperty{val format="yyyy-MM-dd mm:ss"}
>> >>> [WARNING]                      ^
>> >>> [WARNING]
>> >>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apach
>> >>> e\esme\model\Message.scala:501: error: expected start of definition
>> >>> [WARNING]   @SearchableProperty{val termVector=TermVector.YES, val
>> >>> analyzer="def
>> >>> ault"}
>> >>> [WARNING]                      ^
>> >>> [WARNING]
>> >>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apach
>> >>> e\esme\model\Message.scala:508: error: expected start of definition
>> >>> [WARNING]   @SearchableProperty{val termVector=TermVector.YES, val
>> >>> analyzer="poo
>> >>> l"}
>> >>> [WARNING]                      ^
>> >>> [WARNING]
>> >>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apach
>> >>> e\esme\model\User.scala:118: error: illegal start of simple expression
>> >>> [WARNING]     ) ++ SHtml.hidden(doSubmit _)
>> >>> [WARNING]     ^
>> >>> [WARNING]
>> >>> D:\apache\esme\branches\lift-2.2\trunk\server\src\main\scala\org\apach
>> >>> e\esme\model\User.scala:119: error: ')' expected but '}' found.
>> >>> [WARNING]     }
>> >>> [WARNING]     ^
>> >>> [WARNING] 7 errors found
>> >>>
>> >>> Maybe somebody can take a quick look.  Thanks.
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> On Wed, Dec 8, 2010 at 11:06 AM, Ethan Jewett <esjewett@gmail.com>
>> >>> wrote:
>> >>>> I can look at it, but it would be better if someone else could take
>> >>>> it
>> >>>> on. I still haven't gotten to the user timeline work that I said
I
>> >>>> would do :-)
>> >>>>
>> >>>> Do we currently have a branch with the 2.2 snapshot that we can
work
>> >>>> in?
>> >>>>
>> >>>> Ethan
>> >>>>
>> >>>> On Tue, Dec 7, 2010 at 1:10 PM, Richard Hirsch
>> >>>> <hirsch.dick@gmail.com> wrote:
>> >>>>> I tried it a while back and it didn't compile right away. There
were
>> >>>>> scala changes that were necessary that I couldn't fix, so I
left it.
>> >>>>>
>> >>>>> Anyone else want to take a crack at it?
>> >>>>>
>> >>>>> D.
>> >>>>>
>> >>>>> On Tue, Dec 7, 2010 at 1:08 PM, Ethan Jewett <esjewett@gmail.com>
>> >>>>> wrote:
>> >>>>>> Sure, as long as it doesn't cause any major issues.
>> >>>>>>
>> >>>>>> Ethan
>> >>>>>>
>> >>>>>> On Tue, Dec 7, 2010 at 1:05 PM, Richard Hirsch
>> >>>>>> <hirsch.dick@gmail.com> wrote:
>> >>>>>>> Do we want to move to the latest lift release for 1.2?
We could
>> >>>>>>> get
>> >>>>>>> all the latest LAP code that is currently being developed?
>> >>>>>>>
>> >>>>>>> D.
>> >>>>>>>
>> >>>>>>
>> >>>>>
>> >>>>
>> >>>
>> >>
>> >
>
>
>
> --
> Best Regards,
> Vladimir Ivanov
>

Mime
View raw message