On Mon, Nov 16, 2009 at 4:03 PM, Alex Boisvert <[email protected]>wrote:
> On Mon, Nov 16, 2009 at 3:33 PM, Kris Nuttycombe < > [email protected]> wrote: > >> >> On Mon, Nov 16, 2009 at 4:28 PM, David Pollak >> <[email protected]> wrote: >> > Folks, >> > >> > I'm seeing a lot of: >> > [INFO] Unable to find resource 'javax.script:script-js:pom:1.0' in >> > repository specs-repository (http://specs.googlecode.com/svn/maven2/) >> > >> > Also, I know Kris turned on type erasure warnings because he wants to >> debug >> > them.... but there's just a pile that can't be fixed and these unfixable >> > warnings get in the way of real warnings... any compromise we can find >> on >> > this situation? >> >> Oops... I didn't realize I'd committed the pom with that in! I've no >> problem putting the extra warnings into a profile. Does Scala have an >> equivalent of or support the @SuppressWarnings annotation that you >> have in Java? >> > > Speaking of warnings, which do you prefer (see patch below): > > 1) Explicit types on val extractors (as it is today) > 2) One-liner with no types (proposed) > > We could save 4 warnings... > Here's the cost of the 4 warnings: If you remove the type information and the lazy calculator thing changes how it does calculations, you'll silently get changed types (this has happened before) and that breaks things. On the other hand, if we leave the code with explicit types, we'll get a match warning (with the type erasure stuff turned back off) if the type change. Once again, this is historical (and there's a bug in Scala trac that Martin closed after 2+ years asking for multiple assignment to not be done via the pattern matcher). > > alex > > diff --git > a/lift-base/lift-webkit/src/main/scala/net/liftweb/http/Req.scala > b/lift-base/lift-webkit/src/main/scala/net/liftweb/http/Req.scal > index ab574d4..2f3bf26 100644 > --- a/lift-base/lift-webkit/src/main/scala/net/liftweb/http/Req.scala > +++ b/lift-base/lift-webkit/src/main/scala/net/liftweb/http/Req.scala > @@ -313,10 +313,7 @@ class Req(val path: ParsePath, > case _ => Empty > } > > - lazy val (paramNames: List[String], > - params: Map[String, List[String]], > - uploadedFiles: List[FileParamHolder], > - body: Box[Array[Byte]]) = paramCalculator() > + lazy val (paramNames, params, uploadedFiles, body) = paramCalculator() > > lazy val cookies = request.cookies match { > case null => Nil > > > > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
