This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Constants.scala being in three places with two implementations?

4 replies
gkossakowski
Joined: 2010-03-11,
User offline. Last seen 33 weeks 5 days ago.
Hi,
I'm wondering about this phenomena:
mac-grek:scala-trunk grek$ find . -name Constants.scala./src/compiler/scala/reflect/api/Constants.scala./src/compiler/scala/reflect/internal/Constants.scala ./src/library/scala/reflect/generic/Constants.scala
I sort of understand why we have three copies but I'm not sure if the exact shape is just sign of Work-In-Progress or that's a final state.
In particular, I wanted to fix implementation of escapedStringValue method and I'm not very sure where to put it. I'll go and put it into both internal and generic packages.
--
Grzegorz Kossakowski

odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: Constants.scala being in three places with two implementati


On Thu, Jul 21, 2011 at 6:16 PM, Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> wrote:
Hi,
I'm wondering about this phenomena:
mac-grek:scala-trunk grek$ find . -name Constants.scala./src/compiler/scala/reflect/api/Constants.scala./src/compiler/scala/reflect/internal/Constants.scala ./src/library/scala/reflect/generic/Constants.scala 
I sort of understand why we have three copies but I'm not sure if the exact shape is just sign of Work-In-Progress or that's a final state.
The comment on generic/Constants.scala says:

@deprecated("scala.reflect.generic will be removed", "2.9.1") 

So that should give one clue :-)

api/Constants is pure interface, no implementation. So, by exclusion the fix needs to go in internal/Constants,

Cheers

 -- Martin

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: Constants.scala being in three places with two implementati

On 7/21/11 9:16 AM, Grzegorz Kossakowski wrote:
> mac-grek:scala-trunk grek$ find . -name Constants.scala
> ./src/compiler/scala/reflect/api/Constants.scala
> ./src/compiler/scala/reflect/internal/Constants.scala
> ./src/library/scala/reflect/generic/Constants.scala

You'll find all the ones in generic/* are deprecated in their entirety.
It is very annoying having them in the source base, I should figure out
how I can delete them locally without git noticing. I don't know how we
landed here, but don't add anything to the generic ones.

geoff
Joined: 2008-08-20,
User offline. Last seen 1 year 25 weeks ago.
Re: Constants.scala being in three places with two implementati

On Thu, Jul 21, 2011 at 10:58:31AM -0700, Paul Phillips said
> On 7/21/11 9:16 AM, Grzegorz Kossakowski wrote:
> > mac-grek:scala-trunk grek$ find . -name Constants.scala
> > ./src/compiler/scala/reflect/api/Constants.scala
> > ./src/compiler/scala/reflect/internal/Constants.scala
> > ./src/library/scala/reflect/generic/Constants.scala
>
> You'll find all the ones in generic/* are deprecated in their entirety.
> It is very annoying having them in the source base, I should figure out
> how I can delete them locally without git noticing. I don't know how we
> landed here, but don't add anything to the generic ones.

Just found out you can

git update-index --assume-unchanged src/library/scala/reflect/generic/*

and git won't bother checking if those files are modified or even
present. It's a neat trick I could use in some other situations, like
when somebody has decided that things like configure scripts should be
stored in the repository even though they're auto-generated.

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: Constants.scala being in three places with two implementati

On 7/21/11 11:13 AM, Geoff Reedy wrote:
> Just found out you can
>
> git update-index --assume-unchanged src/library/scala/reflect/generic/*

Money! Thanks a lot.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland