- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Constants.scala being in three places with two implementations?
Thu, 2011-07-21, 17:17
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
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
Thu, 2011-07-21, 19:07
#2
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.
Thu, 2011-07-21, 19:17
#3
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.
Thu, 2011-07-21, 19:47
#4
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.
On Thu, Jul 21, 2011 at 6:16 PM, Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> wrote:
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