Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

working on 2.11, builds except missing deps, tests don't compile #1527

Closed
wants to merge 1 commit into from

8 participants

@nafg

No description provided.

@dpp
Owner
dpp commented

Naftoli, you are banned from participating in the Lift community in any way including pull requests.

@dpp dpp closed this
@BukhariH

What kind of stupid thought process are you guys at lift following banning someone from contributing to an open source product.

The fact is that open source developers put in a lot of effort for little in return. Hence putting up idiotic political barriers doesn't help the community at all.

Value each commit on it's merit and not the commiter.

@tonymorris

You protest now, but this is typical, long-standing behaviour.

@dpp
Owner
dpp commented

We have specific policies: https://groups.google.com/forum/#!topic/liftweb/oUWj52jzbdc and http://liftweb.net/community

Other open source communities have codes of conduct https://www.python.org/psf/codeofconduct/ and eject people for not adhering to the codes of conduct.

If you do not like the policies, you're welcome to not participate in the community.

@kaidenshi

@dpp From the very first line of the policy you linked to:

"A top-level goal of the Lift community is to be a warm and welcoming place. Helping people who invest their time and effort in Lift and build applications with Lift be successful is a core value in the community. The Lift community is a place where the open exchange of ideas is very important. I personally take the Lift culture very seriously."

I don't have a dog in this fight, but I'm curious what Nafg/Naftoli did that caused him/her to be banned. It seems at first glance that you are going against your own policy of being a warm and welcoming place. Obviously, there is more to this than what has been said here, and if it's internal politics so be it. But you might want to consider the contrast between comments like those you've made here, and what your policy states about it being a warm and welcoming place, and at least offer some sort of explanation. Of course, you don't owe me anything, just trying to speak out for those who can't speak for themselves. Openness in an open source project should be a given.

EDIT: So I did some research and I see that it's a years long personal catfight between the two of you. I stand by what I wrote, but I understand now (even if I don't agree with letting personal gripes impact your project...but it's your project).

@dpp
Owner
dpp commented

Naftoli has had many years of being hostile in the committer community when he doesn't get his way. Has had a ton of help playing well with others from a number of the lift committers. I will not go into the specifics, but there were many warnings, many interventions, and he was finally banned from the committers and the community a few months back.

Even as recently as 5 days ago he demeaned the approach we've taken: "That is, in Lift-paranoia land."

@tonymorris

@kaidenshi From my experience, making a correction in a very direct manner, on a beginner topic (e.g. algebra), is enough to warrant a ban, followed up (in my case) with threats.

I too have no dog in this fight, except to the extent that I like interesting, functional, useful software. As many have worked out by now, this goal is not consistent with liftweb policies. Never mind the threats that idle off to the side.

@kaidenshi

@dpp He sounds like a troublemaker then, according to your view. I've seen the damage than can be done by a rogue community member, so I understand. Thanks for giving your side of the story.

@tonymorris As I'm not a member of the Lift community (I saw this on Hacker News and got curious) I can't speak to their attitude towards their contributors. I have seen some pretty elitist and contributor-hostile attitudes in other open source projects; Arch Linux stands out as a shining example of "we are better than you noob, go away" the moment someone comes along and wants to join the community. I have no idea if Lift is like that of course; again this is obviously a years-long fight.

@Shadowfiend
Owner

@tonymorris Your assertion that interesting, functional, and useful software is “not consistent” with our policies is trivially false by virtue of Lift's being used to great success by many companies. That it disagrees with what seems to be (based on historical interactions on the list) your rather pedantic view of the world and this translates in your mind to inconsistencies with useful software is simply evidence that you would not have fared well in the community as it was envisioned. That's fine. Every project has a mindset that it is built with, and that produces a target audience, and it appears you were not in Lift's.

@BukhariH “The fact is that open source developers put in a lot of effort for little in return.” That is correct. Thus, we don't have the energy to deal with community members who complain and behave passive-aggressively, particularly when they are considered committers and therefore should be exemplary of expected behavior. Please feel free to read my reply in the original thread where the ban occurred at https://groups.google.com/d/msg/liftweb/7vvVPmi53Kc/MVTZy6b06xwJ to see some of the issues here.

By the way, “What kind of stupid thought process are you guys at lift following…” -> the kind that ensures exactly this kind of interaction is unacceptable in the community. If you have no context, ask for it or simply do not speak. Speaking without context is an excellent way to make a complete fool of yourself. What exactly gave you the impression that you knew enough about the situation to come here and comment authoritatively on our community's approach to managing its members?

@BukhariH

@Shadowfiend Sorry if I've offended your community and I recognise your right to run your community how you like it but don't you think actions like banning users will make future developers wary of commiting to a project which seems pretty useful?

And, what if the code being committed is pretty useful are you going to jeopardise the product for the ban?

@dpp
Owner
dpp commented

My perspective is that the community is more important than code. With a healthy, vibrant community, code and features flow naturally. I summarized this in the community expectations:

Taken in isolation, an individual instance of being right (right about a feature or a design or about an unexpected behavior being a bug) may have value if it is addressed. But the cost of having a harsh community over the long term is that the loud, harsh, confrontational people are the ones who dominate. When you have a community shaped by confrontation, over the long term, it's harder to get things done right. It's harder for people with different perspectives to be heard because they will either not speak up at all or get shouted down. I would rather lose harsh community members and keep the Lift community being nice than have the community dominated by the harsh even if some of them are "smart" because almost every innovation I can think of in Lift has been driven by a quiet voice planting a seed in the community that's led to radical improvements in Lift including the Designer Friendly stuff, the current REST support, Wizard, etc.

In practical terms, we invite people to be committers based on how they help others in the community. Helping others is a useful proxy for understanding Lift and understanding how to code because if you can explain something, it means you've got a much better chance of having mastered it. If you've mastered the use of Lift, then you are likely to have the skills to contribute to Lift where the contribution is going to mostly be aligned with the rest of the Lift code.

So, yes, this does mean that n00bs don't get to be committers. It does mean that those who are committers are very helpful of n00bs.

In terms of small contributions to the codebase, up until a year and a half ago, we had a committer's only policy. We relaxed the policy as described in this post. The reason for the original policy was mostly legal (I'm a lawyer by training).

In terms of Lift being a successful open source project, I think time has borne this out. Lift is 7+ years old. Lift is used in a wide variety of places including acting as the front end for a service that processes $300B/yr in transactions. Lift has transitioned from the founder/BDFL to a mostly democratically run committer pool. Given that Scala is a niche language and Lift is a framework in a niche language, I think those stats are pretty good indicators that how we've grown the Lift community and the Lift committers has been successful. Has it been perfect? No. Have we learned things along the way? Yes. Would I have done anything differently with Naftoli? Yes... I would have banned him permanently from the Lift community the night he was IMing me non-stop to review his code instead of taking care of my son who I had just brought home from the emergency room.

@bitemyapp

@dpp

Why is business success being used to justify software design? By that rationale we'd all be using PHP and Java because Facebook and Google do.

front end for a service that processes $300B/yr in transactions

To quote the US President, "you didn't build that".

@japgolly

Would I have done anything differently with Naftoli? Yes... I would have banned him permanently from the Lift community the night he was IMing me non-stop to review his code instead of taking care of my son who I had just brought home from the emergency room.

I don't have full context here but this seems like an unfair, emotional response. If you need to take care of your son, no worries, no one in their right mind would take issue with that...but if you're on IM at the time is it fair to get angry at, and ban people for IM'ing you? Just get off IM.

@Shadowfiend
Owner

@BukhariH, in a project that is run by a community, the community is the most important thing. Otherwise we wouldn't have one, and we'd just do periodic releases and ignore everyone's input. This isn't a new idea. If you want another perspective on this, see this Google Tech Talk from 2007 entitled “How Open Source Projects Survive Poisonous People (And You Can Too)”.

@bitemyapp

“Why is business success being used to justify software design?”

The original argument made was that this was not interesting, functional, and useful software. Many businesses have chosen it, which means it's interesting, and among those is one using it to process $300B/year in transactions, which means it is both useful and functional. While software design does have something to do with business success, we are not discussing software design here except tangentially.

To quote the US President, "you didn't build that".’

Exactly zero people said that we did. David said that Lift's success as an open source project is borne out by the fact that several companies have used the project to great success, including one that is processing $300B/year in transactions. So I don't understand why you felt the need to make this remark.

@japgolly

I don't have full context here…

I can't emphasize how important this is. There is a lot of context around these decisions, and they are no longer up for debate. They were debated at the time that they were taken, both publicly and privately. Participation in a community involves a certain amount of faith in its stewards. If you do not have faith in us as stewards of this one, there are a number of recourses you can take.

And by the way, victim-blaming isn't any better when the victim is perfectly capable of defending themselves. If you as a volunteer tell someone “I can't look at your code”, that's it, no matter what the situation. Respecting other people's time is a core value in a volunteer-based project. Our spare time is split among many things, and Lift is only one of them. How we allocate that split varies due to many outside circumstances, and the ultimate arbiter of that is the contributor. Disrespecting that fact is one way to be toxic to the community—because energy I waste fighting the person who demands my time is energy I can't spend helping those who behave properly.

Anyway, as far as I'm concerned, this discussion is over. The original ban decision was discussed at the time it was taken, and it is still valid. Discussions about the community guidelines can happen on the Lift list, but there is nothing here that merits further discussion, so please don't bring it up there unless you have something significant to add. We're clear about how community interactions are expected to work, and about the importance we place on respect of people's time and work. If you think the project is failing, that's unfortunate; please feel free to either go elsewhere or create your own community. Lift is licensed under the Apache License 2.0.

Other committers may offer more, but that's it for me. Thanks for swinging by!

@nafg

I want to preface that in case anyone is leaning towards believing the picture that @dpp is painting of me is welcome to review my posts to many communities in addition to lift, such as all the scala forums (scala-user, scala-internals, scala-debate, scalaquery/slick, etc., and decide for themselves whether my personality or behavior is anything even remotely similar to what @dpp would have you think.
It's telling that in all of the above communites no one besides @dpp has had any complaint about my behavior (many people, including in Lift, at least whoever is still around from my days, will tell you that I contribute a significant amount in terms of input of ideas) --- and that @dpp has issues with huge numbers of people. The number of people that have been banned from the Lift community is topped only by the number of people who have left of their own when they had the chance, or who do their best not to make a peep out of fear that @dpp will find something to rant at them about (I've had enough people tell me that by private email).

@kaidenshi

EDIT: So I did some research and I see that it's a years long personal catfight between the two of you. I stand by what I wrote, but I understand now (even if I don't agree with letting personal gripes impact your project...but it's your project).

To clarify: it's been a years long situation where the following situation happens every once in a while:
1. I make some comment, perhaps a suggestion about how lift can improve, etc. Sometimes I write things too tersely. I admit that the tone of voice that is my intent is sometimes made ambiguous by the textual medium, and while I have improved in this area, other readings that people make have often surprised me.
2. @dpp reads the most malicious reading possible into my words. Rather, a far more malicious reading than the words can possibly mean.
3. @dpp replies, with a really lengthy rant on everything indirectly related to the perceived offense.
4. I wonder to myself whether it's best to clarify my original intention or refute all the mistakes in the reply, likely accomplishing nothing but making him angrier, or instead to remain silent and let his picture of me be even worse and more certain.
5. I nearly always choose the latter option, with its stated consequence.

I have observed quite often @dpp mis-comprehending what people mean (as he once told me, "I understand code better than English"). That's okay, I'm not perfect either. But the question is, why do you have to always assume the worst?

@dpp

Naftoli has had many years of being hostile in the committer community when he doesn't get his way. Has had a ton of help playing well with others from a number of the lift committers. I will not go into the specifics, but there were many warnings, many interventions, and he was finally banned from the committers and the community a few months back.

This is just plain lying and character assassination. Unless the translation of "hostile" is "trying to defend yourself against unfair rants."

Perhaps there have been a few instances over the last five years where I haven't been absolutely perfectly courteous. If you want to know what "hostile" is, look for someone who it takes next to nothing to launch into a terrible rant at an unfortunate individual.

Even as recently as 5 days ago he demeaned the approach we've taken: "That is, in Lift-paranoia land."

Yes that's right folks --- Lift bans people for "demeaning" code!

There's no reason to take that personally, nor was it meant in an unfriendly manner. (@Shadowfiend's reply seems to indicate that he for one understands this.)

For the record, here's the code I'm describing; I'm curious how other people would term it.

  /**
   * Return the value contained in this Box if it is Full;
   * throw an exception otherwise.
   *
   * Using open_! in an example posted to the Lift mailing list
   * may disqualify you for a helpful response.
   *
   * The method has a '!' in its name.  This means "don't use it unless
   * you are 100% sure that the Box is Full and you should probably
   * comment your code with the explanation of the guaranty."
   * The better case for extracting the value out of a Box can
   * be found at http://lift.la/scala-option-lift-box-and-how-to-make-your-co
   *
   * @return the value contained in this Box if it is full; throw an exception otherwise
   */
  @deprecated("use openOrThrowException, or better yet, do the right thing with your code and use map, flatMap or foreach", "2.4")
  final def open_! : A = openOrThrowException("Legacy method implementation")
  /**
   * Return the value contained in this Box if it is Full;
   * throw an exception otherwise.
   * This means "don't use it unless
   * you are 100% sure that the Box is Full and you should probably
   * comment your code with the explanation of the guaranty.
   * The better case for extracting the value out of a Box can
   * be found at http://lift.la/scala-option-lift-box-and-how-to-make-your-co
   *
   * @return the value contained in this Box if it is full; throw an exception otherwise
   */
  @deprecated("use openOrThrowException, or better yet, do the right thing with your code and use map, flatMap or foreach", "2.4")
  final def openTheBox: A = openOrThrowException("Legacy method implementation")

...

  /**
   * If you grew up on Java, you're used to Exceptions as part of your program logic.
   * The Scala philosophy and the Lift philosophy is that exceptions are for exceptional
   * conditions such as failure of an external resource (e.g., your database goes offline)
   * rather than simply indicating that a parameter wasn't supplied or couldn't be parsed.
   *
   * Lift's Box and Scala's Option provide a mechanism for being explicit about a value
   * existing or not existing rather than relying on a reference being not-null.  However,
   * extracting a value from a Box should be done correctly.  Correctly can be (in order of use
   * in David Pollak's code): a for comprehension; using map, flatMap or foreach; or using pattern matching.
   *
   * The only times when you should be using this method are: the value is guaranteed to be available based
   * on a guard outside of the method using the Box or in tests.  For example,
   * User.currentUser.openOrThrowException("This snippet is used on pages where the user is logged in")
   *
   * A valid justification for using this method should not be "I want my code to fail fast when I call it."
   * Using exceptions in the core logic of your application should be strongly discouraged.
   *
   * This method replaces open_! because people used open_! and generally ignored the reason for the "!",
   * so we're making it more explicit that this method should not commonly be used and should be justified
   * when used.
   *
   * @param justification Justify why calling this method is okay and why it will not result in an Exception
   *
   * @return The contents of the Box if it has one or an exception if not
   */
  def openOrThrowException(justification: String) =
  throw new NullPointerException("An Empty Box was opened.  The justification for allowing the openOrThrowException was "+justification)

...

  /**
   * If you grew up on Java, you're used to Exceptions as part of your program logic.
   * The Scala philosophy and the Lift philosophy is that exceptions are for exceptional
   * conditions such as failure of an external resource (e.g., your database goes offline)
   * rather than simply indicating that a parameter wasn't supplied or couldn't be parsed.
   *
   * Lift's Box and Scala's Option provide a mechanism for being explicit about a value
   * existing or not existing rather than relying on a reference being not-null.  However,
   * extracting a value from a Box should be done correctly.  Correctly can be (in order of use
   * in David Pollak's code): a for comprehension; using map, flatMap or foreach; or using pattern matching.
   *
   * The only times when you should be using this method are: the value is guaranteed to be available based
   * on a guard outside of the method using the Box or in tests.  For example,
   * User.currentUser.openOrThrowException("This snippet is used on pages where the user is logged in")
   *
   * A valid justification for using this method should not be "I want my code to fail fast when I call it."
   * Using exceptions in the core logic of your application should be strongly discouraged.
   *
   * This method replaces open_! because people used open_! and generally ignored the reason for the "!",
   * so we're making it more explicit that this method should not commonly be used and should be justified
   * when used.
   *
   * @param justification Justify why calling this method is okay and why it will not result in an Exception
   *
   * @return The contents of the Box if it has one or an exception if not
   */
  override def openOrThrowException(justification: String) =
    throw new NullPointerException("An Failure Box was opened.  Failure Message: "+msg+
      ".  The justification for allowing the openOrThrowException was "+justification)  {
      override def getCause() = exception openOr null
    }

@kaidenshi

@dpp He sounds like a troublemaker then, according to your view. I've seen the damage than can be done by a rogue community member, so I understand. Thanks for giving your side of the story.

Yes that is his view... as is his view of countless other people. They include such luminaries as Daniel Spiewak, some of the founders of Lift such as Tim Perett, and many other people who everyone else in the world have a lot of respect and gratitude towards. He can't even get along with Martin Odersky.

@BukhariH

@Shadowfiend Sorry if I've offended your community and I recognise your right to run your community how you like it but don't you think actions like banning users will make future developers wary of commiting to a project which seems pretty useful?

You've hit the nail on the head. Over the last five years that I've been watching, the brain drain away from the Lift community is scary. Almost all of the most talented committers are long since gone. I suppose I should be proud to join their ranks... :(

@Shadowfiend

Please feel free to read my reply in the original thread where the ban occurred at https://groups.google.com/d/msg/liftweb/7vvVPmi53Kc/MVTZy6b06xwJ to see some of the issues here.

You mean that thread, where @dpp invented a bunch of fabrications and distortions against me, and then prevented me from responding by banning me?

@dpp

IMing me non-stop to review his code instead of taking care of my son who I had just brought home from the emergency room.

...such as this one? How's that for a white-ish lie? Some context:

  • This happened about five years ago. I apologized for whatever perceived injustice shortly after. However from then on he pretty much refused to help me with any question I posted to the lift group. That's pretty harsh considering that much of lift-webkit is a spaghetti-code black box that no one besides him could be of help for most of the years for anything non-trivial.
  • "non-stop" is just a flat-out lie.
  • He makes it sound as if he told me that he was attending to an emergency and I stubbornly persisted. In fact I hadn't the faintest clue.
  • It was far from the first time I pinged him on gchat, and he was always friendly and helpful. He never indicated before that he preferred otherwise.
@nafg

Separate point: why is any of this a reason to punish @farmdawgnation or whoever else was planning on doing this work?
@farmdawgnation etc. - feel free to fork my branch and submit a separate pull request that includes my commits, as far as I'm concerned. However, just to be clear, no one has permission (and it would be really disgusting) to copy my work and put it into a new commit or commits that don't include me as the author.

@nafg

Another point, regarding the character assassination over here: Whether or not it happened once in a blue moon that my tone of voice was imperfect, it is also the case that I contributed several very useful, fundamental parts of lift (like Mapper's OneToMany and ManyToMany, which others duplicated into lift-record, and like the pagination functionality) --- as well as some useless or naively "harmful" things like ModelSnippet/ModelView :) --- and there are scores of more parts of lift that were influenced to no small degree by my constant input of ideas.
So we're not discussing banning some fringe grump. We're talking about blocking a longstanding, core contributor from fixing bugs in his own code, or defects in Lift that affect open source libraries that he publishes and projects he makes for his clients.
In this instance, we're talking about preventing the scala community from knowing whether there are any lines of code in the lift codebase or its dependent projects that reveal regressions in the soon-to-be-released Scala 2.11.0.

@nafg
@nafg
@tonymorris

@nafg Mate seriously, there is no purpose to having to defend yourself. There are plenty of people who are not afraid to disagree with socially inept people who deploy bullying tactics to masquerade behind profound incompetence. Make no mistake, they are out there.

This is just a matter of whether it is worth bothering to do so. Sometimes it is worth it. Sometimes you can make progress. I think you need to ask yourself this question and however you do, respond accordingly. Defending yourself against the typical dysfunction of posturing scala users achieves no reasonable goals. Perhaps try to convince yourself of this.

@BukhariH

@nafg I can see your point of view and I can see there's aswell.

If there are plenty of other developers who agree with you then why not create your own fork?

From reading the original thread posted by @Shadowfiend it seems like you have a following in the community and according to HN you won and award for your contributions to lift.

Forking is the only solution if you have disagreements on how the project should be run.

@dpp
Owner
dpp commented

@japgolly Yeah... I was IMing with my wife about my son's status because she was out of town. I guess I should have unplugged the phone and disconnected the doorbell, too.

Or maybe Naftoli should have respected my personal space. The night of my son's ER visit was not the first time Naftoli disrespected my personal space. But it was a night when I had little energy to make it a polite teaching moment.

But this is an issue we're facing related to women in tech. When someone clearly marks their personal space, they deserve to have that space respected. Most individual incidents are not big enough to take action on. This allows the disrespectful to gain an advantage. But the folks who lose time, energy, focus, safety have little recourse other than to not participate. I am very clear that in the Lift community, we will not have silence/death by 1,000 cuts. We will have a warm, welcoming environment and that includes taking actions against people who violate the spirit of the Lift community.

And not to put too fine a point on it, but even after Naftoli was ejected from the Lift community, he did not respect the ejection, he came to GitHub to post snide comments and then open pull requests. And when I rejected his pull request, he make a posting on HN. So... I think we're seeing the same pattern of disrespect played out on this thread.

Also note, that this is not a comment on Naftoli's technical skills. Nor is it a binary comment that he's a bad person. But he did engage in enough bad behavior in the Lift community to be banned. No amount of badgering, pestering, complaining, or shaming is going to change that. In fact each act of badgering, pestering, complaining, and shaming just reinforces that Naftoli does not respect other people's personal boundaries and reinforces that his banishment from the Lift community was the right thing.

Lift is open source and anyone can fork it and start a new community. If there's something better to be done with the code, Naftoli and Tony and anyone else can go do it. But they are not welcome in the Lift community.

No more comments from me.

@Shadowfiend
Owner

Ok folks, while you're free to discuss this at will, I will be deleting messages on this ticket that add vitriol but nothing else to the discussion. I will for posterity note the posters whose remarks have been deleted, so that folks are aware that a deletion has taken place, below:

  • aloiscochard
  • naftoligug, who was using a different account to get around a ban from involvement here
@bitemyapp

@Shadowfiend

The original argument made was that this was not interesting, functional, and useful software. Many businesses have chosen it, which means it's interesting, and among those is one using it to process $300B/year in transactions, which means it is both useful and functional. While software design does have something to do with business success, we are not discussing software design here except tangentially.

"both useful and functional" why not pack-up shop and just use PHP then? I'm sure many more dollars get processed through sites running on PHP. Clearly because there's a higher dollar amount associated, PHP is vastly superior to Lift and should be used in preference of any Scala based web framework.

Contributors to Lift should be focused on engineering excellence and keeping the community happy, not popularity independent of UX and documentation issues.

Utility is relative. If you asked a classical period Roman citizen if dung was useful, they'd say it absolutely is useful because it can be used to cure many conditions.

Lift is a bucket of code. Making Lift not suck is about making the bucket of code not suck. The bucket and the code.

Talking about other peoples' accomplishments as if they were your own is crass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
87 core/util/src/main/scala/scala/io/Position-TempCompat.scala
@@ -0,0 +1,87 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+package scala.io
+
+/** The object Position provides convenience methods to encode
+ * line and column number in one single integer. The encoded line
+ * (column) numbers range from 0 to `LINE_MASK` (`COLUMN_MASK`),
+ * where `0` indicates that the line (column) is undefined and
+ * `1` represents the first line (column).
+ *
+ * Line (Column) numbers greater than `LINE_MASK` (`COLUMN_MASK`) are
+ * replaced by `LINE_MASK` (`COLUMN_MASK`). Furthermore, if the encoded
+ * line number is `LINE_MASK`, the column number is always set to 0.
+ *
+ * The following properties hold:
+ *
+ * the undefined position is 0: `encode(0,0) == 0`
+ * encodings are non-negative : `encode(line,column) >= 0`
+ * position order is preserved:
+ * {{{
+ * (line1 <= line2) || (line1 == line2 && column1 <= column2)
+ * }}}
+ * implies
+ * {{{
+ * encode(line1,column1) <= encode(line2,column2)
+ * }}}
+ * @author Burak Emir (translated from work by Matthias Zenger and others)
+ */
+@deprecated("This class will be removed.", "2.10.0")
+abstract class Position {
+ /** Definable behavior for overflow conditions.
+ */
+ def checkInput(line: Int, column: Int): Unit
+
+ /** Number of bits used to encode the line number */
+ final val LINE_BITS = 20
+ /** Number of bits used to encode the column number */
+ final val COLUMN_BITS = 31 - LINE_BITS // no negatives => 31
+ /** Mask to decode the line number */
+ final val LINE_MASK = (1 << LINE_BITS) - 1
+ /** Mask to decode the column number */
+ final val COLUMN_MASK = (1 << COLUMN_BITS) - 1
+
+ /** Encodes a position into a single integer. */
+ final def encode(line: Int, column: Int): Int = {
+ checkInput(line, column)
+
+ if (line >= LINE_MASK)
+ LINE_MASK << COLUMN_BITS
+ else
+ (line << COLUMN_BITS) | scala.math.min(COLUMN_MASK, column)
+ }
+
+ /** Returns the line number of the encoded position. */
+ final def line(pos: Int): Int = (pos >> COLUMN_BITS) & LINE_MASK
+
+ /** Returns the column number of the encoded position. */
+ final def column(pos: Int): Int = pos & COLUMN_MASK
+
+ /** Returns a string representation of the encoded position. */
+ def toString(pos: Int): String = line(pos) + ":" + column(pos)
+}
+
+object Position extends Position {
+ /** The undefined position */
+ @deprecated("This will be removed", "2.9.0")
+ final val NOPOS = 0
+
+ /** The first position in a source file */
+ @deprecated("This will be removed", "2.9.0")
+ final val FIRSTPOS = encode(1, 1)
+
+ def checkInput(line: Int, column: Int) {
+ if (line < 0)
+ throw new IllegalArgumentException(line + " < 0")
+ if ((line == 0) && (column != 0))
+ throw new IllegalArgumentException(line + "," + column + " not allowed")
+ if (column < 0)
+ throw new IllegalArgumentException(line + "," + column + " not allowed")
+ }
+}
View
2  liftsh
@@ -17,4 +17,4 @@ DEFAULT_OPTS=""
cd `dirname $0`
# Call with INTERNAL_OPTS followed by LIFTSH_OPTS (or DEFAULT_OPTS). java always takes the last option when duplicate.
-exec java ${INTERNAL_OPTS} ${LIFTSH_OPTS:-${DEFAULT_OPTS}} -jar project/sbt-launch-0.12.1.jar "$@"
+exec java ${INTERNAL_OPTS} ${LIFTSH_OPTS:-${DEFAULT_OPTS}} -jar project/sbt-launch-0.13.1.jar "$@"
View
4 persistence/mapper/src/main/scala/net/liftweb/mapper/ManyToMany.scala
@@ -27,8 +27,8 @@ import net.liftweb.common._
trait ManyToMany extends BaseKeyedMapper {
this: KeyedMapper[_, _] =>
- type K = TheKeyType
- type T = KeyedMapperType
+ type K = (TheKeyType @annotation.unchecked.uncheckedVariance)
+ type T = (KeyedMapperType @annotation.unchecked.uncheckedVariance)
private var manyToManyFields: List[MappedManyToMany[_,_,_]] = Nil
View
41 project/Build.scala
@@ -38,8 +38,15 @@ object BuildDef extends Build {
lazy val common =
coreProject("common")
- .settings(description := "Common Libraties and Utilities",
- libraryDependencies ++= Seq(slf4j_api, logback, slf4j_log4j12))
+ .settings(description := "Common Libraries and Utilities",
+ libraryDependencies ++= Seq(slf4j_api, logback, slf4j_log4j12),
+ libraryDependencies ++= (CrossVersion.partialVersion(scalaVersion.value) match {
+ case Some((2, scalaMajor)) if scalaMajor >= 11 =>
+ List("org.scala-lang.modules" %% "scala-xml" % "1.0.1")
+ case _ =>
+ Nil
+ })
+ )
lazy val actor =
coreProject("actor")
@@ -51,10 +58,20 @@ object BuildDef extends Build {
coreProject("markdown")
.settings(description := "Markdown Parser",
parallelExecution in Test := false,
- libraryDependencies ++= Seq(
- "org.scalatest" %% "scalatest" % "1.9.1" % "test",
+ libraryDependencies <++= scalaVersion { sv => Seq(
+ "org.scalatest" %% "scalatest" % (if(sv=="2.11.0-RC3") "2.1.2" else "1.9.1") % "test",
"junit" % "junit" % "4.8.2" % "test"
- ))
+ ) },
+ libraryDependencies ++= (CrossVersion.partialVersion(scalaVersion.value) match {
+ case Some((2, scalaMajor)) if scalaMajor >= 11 =>
+ List(
+ "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.1",
+ "org.scala-lang.modules" %% "scala-xml" % "1.0.1"
+ )
+ case _ =>
+ Nil
+ })
+ )
lazy val json =
coreProject("json")
@@ -85,8 +102,18 @@ object BuildDef extends Build {
.dependsOn(actor, json, markdown)
.settings(description := "Utilities Library",
parallelExecution in Test := false,
- libraryDependencies <++= scalaVersion {sv => Seq(scala_compiler(sv), joda_time,
- joda_convert, commons_codec, javamail, log4j, htmlparser)})
+ libraryDependencies <++= scalaVersion {sv =>
+ Seq(
+ scala_compiler(sv),
+ joda_time,
+ joda_convert,
+ commons_codec,
+ javamail,
+ log4j,
+ htmlparser
+ )
+ }
+ )
// Web Projects
View
4 project/Dependencies.scala
@@ -31,7 +31,7 @@ object Dependencies {
lazy val scalazGroup = defaultOrMapped("org.scalaz")
lazy val scalazVersion = defaultOrMapped("6.0.4")
- lazy val scalaz7Version = defaultOrMapped("7.0.0")
+ lazy val scalaz7Version = defaultOrMapped("7.0.0", "2.11.0-RC3" -> "7.0.6")
// Compile scope:
// Scope available in all classpath, transitive by default.
@@ -85,6 +85,6 @@ object Dependencies {
lazy val mockito_all = "org.mockito" % "mockito-all" % "1.9.0" % "test"
lazy val scalacheck = "org.scalacheck" %% "scalacheck" % "1.10.0" % "test"
lazy val specs2: ModuleMap =
- "org.specs2" %% "specs2" % defaultOrMapped("1.12.3")(_) % "test"
+ "org.specs2" %% "specs2" % defaultOrMapped("1.12.3", "2.11.0-RC3" -> "2.3.10")(_) % "test"
}
View
2  project/build.properties
@@ -1,2 +1,2 @@
# Deprecate using build.properties, use -Dsbt.version=... in launcher arg instead
-sbt.version=0.12.4
+sbt.version=0.13.1
View
4 project/plugins.sbt
@@ -1,7 +1,5 @@
DefaultOptions.addPluginResolvers
-addSbtPlugin("in.drajit.sbt" % "sbt-yui-compressor" % "0.2.1")
-
resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/"
-addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.1.0")
+addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")
View
5 project/project/Plugin.scala
@@ -1,6 +1,7 @@
import sbt._
object PluginDef extends Build {
- lazy val root = Project("plugins", file(".")) dependsOn(buildPlugin)
- lazy val buildPlugin = uri("git://github.com/lift/sbt-lift-build.git#c78f617f62")
+ lazy val root = Project("plugins", file(".")) dependsOn(buildPlugin, yuiPlugin)
+ lazy val buildPlugin = uri("git://github.com/nafg/sbt-lift-build.git#master")
+ lazy val yuiPlugin = uri("git://github.com/nafg/sbt-yui-compressor#patch-1")
}
View
BIN  project/sbt-launch-0.12.1.jar
Binary file not shown
View
BIN  project/sbt-launch-0.13.1.jar
Binary file not shown
View
6 web/webkit/src/main/scala/net/liftweb/http/LiftResponse.scala
@@ -117,8 +117,10 @@ case class UnauthorizedResponse(realm: String) extends LiftResponse {
def toResponse = InMemoryResponse(Array(), List("WWW-Authenticate" -> ("Basic realm=\"" + realm + "\"")), Nil, 401)
}
-object Qop extends Enumeration(0, "auth", "auth-int", "auth,auth-int") {
- val AUTH, AUTH_INT, AUTH_AND_AUTH_INT = Value
+object Qop extends Enumeration(0) {
+ val AUTH = Value("auth")
+ val AUTH_INT = Value("auth-int")
+ val AUTH_AND_AUTH_INT = Value("auth,auth-int")
}
/**
View
4 web/webkit/src/main/scala/net/liftweb/http/LiftSession.scala
@@ -20,7 +20,7 @@ package http
import java.lang.reflect.Method
import java.util.concurrent.ConcurrentHashMap
-import collection.mutable.{ConcurrentMap, HashMap, ListBuffer}
+import collection.mutable.{HashMap, ListBuffer}
import collection.JavaConversions
import xml._
@@ -155,7 +155,7 @@ object LiftSession {
/**
* Cache for findSnippetClass lookups.
*/
- private val snippetClassMap: ConcurrentMap[String, Box[Class[AnyRef]]] = JavaConversions.asScalaConcurrentMap(new ConcurrentHashMap())
+ private val snippetClassMap: collection.concurrent.Map[String, Box[Class[AnyRef]]] = JavaConversions.mapAsScalaConcurrentMap(new ConcurrentHashMap())
/*
* Given a Snippet name, try to determine the fully-qualified Class
View
2  web/webkit/src/main/scala/net/liftweb/http/S.scala
@@ -307,7 +307,7 @@ trait S extends HasParams with Loggable with UserAgentCalculator {
* @see # attrs
* @see # attr
*/
- private val _attrs = new ThreadGlobal[(MetaData,List[(Either[String, (String, String)], String)])]
+ private[S] val _attrs = new ThreadGlobal[(MetaData,List[(Either[String, (String, String)], String)])]
/**
* Holds the per-request LiftSession instance.
View
5 web/webkit/src/main/scala/net/liftweb/http/SHtml.scala
@@ -2324,8 +2324,9 @@ trait SHtml {
}
-object AjaxType extends Enumeration("javascript", "json") {
- val JavaScript, JSON = Value
+object AjaxType extends Enumeration() {
+ val JavaScript = Value("javascript")
+ val JSON = Value("json")
}
object AjaxContext {
Something went wrong with that request. Please try again.