-
Notifications
You must be signed in to change notification settings - Fork 931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.13.11 regression: incremental compiler: IndexOutOfBoundsException in ExtractAPI #2497
Comments
Could it be because we're looking at erased types? Normally, varargs erase scala> :power On Fri, Mar 4, 2016 at 11:30 AM, Martin Duhem notifications@github.com
|
/cc @gkossakowski |
Have you guys considered a different approach of dealing with value classes that I mentioned before: #2261 (comment) ? My solution would avoid phase travel that I think is both confusing and error-prone. I believe this issue would go away simply because we would no longer need information at erasure. |
The previous approach to value class API (introduced by sbt/sbt#2261 and refined by sbt/sbt#2413 and sbt/sbt#2414) was to store both unerased and erased signatures so that changes to value classes forced recompilations. This is no longer necessary thanks to sbt#87: if a class type is used, then it becomes a dependency of the current class and its name is part of the used names of the current class. Since the name hash of a class changes if it stops or start extending AnyVal, this is enough to force recompilation of anything that use a value class type. If the underlying type of a value class change, its name hash doesn't change, but the name hash of <init> change and since every class uses the name <init>, we don't need to do anything special to trigger recompilations either.
The previous approach to value class API (introduced by sbt/sbt#2261 and refined by sbt/sbt#2413 and sbt/sbt#2414) was to store both unerased and erased signatures so that changes to value classes forced recompilations. This is no longer necessary thanks to sbt#87: if a class type is used, then it becomes a dependency of the current class and its name is part of the used names of the current class. Since the name hash of a class changes if it stops or start extending AnyVal, this is enough to force recompilation of anything that use a value class type. If the underlying type of a value class change, its name hash doesn't change, but the name hash of <init> change and since every class uses the name <init>, we don't need to do anything special to trigger recompilations either.
Simplify value class API handling and fix sbt/sbt#2497
Github decided to close this but this isn't actually fixed in sbt/sbt, just in sbt/zinc (sbt/zinc#95) |
This is a backport of sbt/zinc#95 The previous approach to value class API (introduced by sbt#2261 and refined by sbt#2413 and sbt#2414) was to store both unerased and erased signatures so that changes to value classes forced recompilations. This is no longer necessary thanks to sbt#2523: if a class type is used, then it becomes a dependency of the current class and its name is part of the used names of the current class. Since the name hash of a class changes if it stops or start extending AnyVal, this is enough to force recompilation of anything that uses a value class type. If the underlying type of a value class change, its name hash doesn't change, but the name hash of `<init>` changes and since every class uses the name `<init>`, we don't need to do anything special to trigger recompilations either.
Backport of the fix to sbt 0.13: #2557 |
This is a backport of sbt/zinc#95 The previous approach to value class API (introduced by sbt#2261 and refined by sbt#2413 and sbt#2414) was to store both unerased and erased signatures so that changes to value classes forced recompilations. This is no longer necessary thanks to sbt#2523: if a class type is used, then it becomes a dependency of the current class and its name is part of the used names of the current class. Since the name hash of a class changes if it stops or start extending AnyVal, this is enough to force recompilation of anything that uses a value class type. If the underlying type of a value class change, its name hash doesn't change, but the name hash of `<init>` changes and since every class uses the name `<init>`, we don't need to do anything special to trigger recompilations either.
This is a backport of sbt/zinc#95 The previous approach to value class API (introduced by sbt#2261 and refined by sbt#2413 and sbt#2414) was to store both unerased and erased signatures so that changes to value classes forced recompilations. This is no longer necessary thanks to sbt#2523: if a class type is used, then it becomes a dependency of the current class and its name is part of the used names of the current class. Since the name hash of a class changes if it stops or start extending AnyVal, this is enough to force recompilation of anything that uses a value class type. If the underlying type of a value class change, its name hash doesn't change, but the name hash of `<init>` changes and since every class uses the name `<init>`, we don't need to do anything special to trigger recompilations either.
This is a backport of sbt/zinc#95 The previous approach to value class API (introduced by sbt#2261 and refined by sbt#2413 and sbt#2414) was to store both unerased and erased signatures so that changes to value classes forced recompilations. This is no longer necessary thanks to sbt#2523: if a class type is used, then it becomes a dependency of the current class and its name is part of the used names of the current class. Since the name hash of a class changes if it stops or start extending AnyVal, this is enough to force recompilation of anything that uses a value class type. If the underlying type of a value class change, its name hash doesn't change, but the name hash of `<init>` changes and since every class uses the name `<init>`, we don't need to do anything special to trigger recompilations either.
This is a backport of sbt/zinc#95 The previous approach to value class API (introduced by sbt#2261 and refined by sbt#2413 and sbt#2414) was to store both unerased and erased signatures so that changes to value classes forced recompilations. This is no longer necessary thanks to sbt#2523: if a class type is used, then it becomes a dependency of the current class and its name is part of the used names of the current class. Since the name hash of a class changes if it stops or start extending AnyVal, this is enough to force recompilation of anything that uses a value class type. If the underlying type of a value class change, its name hash doesn't change, but the name hash of `<init>` changes and since every class uses the name `<init>`, we don't need to do anything special to trigger recompilations either.
This is a backport of sbt/zinc#95 The previous approach to value class API (introduced by sbt#2261 and refined by sbt#2413 and sbt#2414) was to store both unerased and erased signatures so that changes to value classes forced recompilations. This is no longer necessary thanks to sbt#2523: if a class type is used, then it becomes a dependency of the current class and its name is part of the used names of the current class. Since the name hash of a class changes if it stops or start extending AnyVal, this is enough to force recompilation of anything that uses a value class type. If the underlying type of a value class change, its name hash doesn't change, but the name hash of `<init>` changes and since every class uses the name `<init>`, we don't need to do anything special to trigger recompilations either.
This is a backport of sbt/zinc#95 The previous approach to value class API (introduced by sbt#2261 and refined by sbt#2413 and sbt#2414) was to store both unerased and erased signatures so that changes to value classes forced recompilations. This is no longer necessary thanks to sbt#2523: if a class type is used, then it becomes a dependency of the current class and its name is part of the used names of the current class. Since the name hash of a class changes if it stops or start extending AnyVal, this is enough to force recompilation of anything that uses a value class type. If the underlying type of a value class change, its name hash doesn't change, but the name hash of `<init>` changes and since every class uses the name `<init>`, we don't need to do anything special to trigger recompilations either.
This is a backport of sbt/zinc#95 The previous approach to value class API (introduced by sbt#2261 and refined by sbt#2413 and sbt#2414) was to store both unerased and erased signatures so that changes to value classes forced recompilations. This is no longer necessary thanks to sbt#2523: if a class type is used, then it becomes a dependency of the current class and its name is part of the used names of the current class. Since the name hash of a class changes if it stops or start extending AnyVal, this is enough to force recompilation of anything that uses a value class type. If the underlying type of a value class change, its name hash doesn't change, but the name hash of `<init>` changes and since every class uses the name `<init>`, we don't need to do anything special to trigger recompilations either.
This is a backport of sbt/zinc#95 The previous approach to value class API (introduced by sbt#2261 and refined by sbt#2413 and sbt#2414) was to store both unerased and erased signatures so that changes to value classes forced recompilations. This is no longer necessary thanks to sbt#2523: if a class type is used, then it becomes a dependency of the current class and its name is part of the used names of the current class. Since the name hash of a class changes if it stops or start extending AnyVal, this is enough to force recompilation of anything that uses a value class type. If the underlying type of a value class change, its name hash doesn't change, but the name hash of `<init>` changes and since every class uses the name `<init>`, we don't need to do anything special to trigger recompilations either.
This is a backport of sbt/zinc#95 The previous approach to value class API (introduced by sbt#2261 and refined by sbt#2413 and sbt#2414) was to store both unerased and erased signatures so that changes to value classes forced recompilations. This is no longer necessary thanks to sbt#2523: if a class type is used, then it becomes a dependency of the current class and its name is part of the used names of the current class. Since the name hash of a class changes if it stops or start extending AnyVal, this is enough to force recompilation of anything that uses a value class type. If the underlying type of a value class change, its name hash doesn't change, but the name hash of `<init>` changes and since every class uses the name `<init>`, we don't need to do anything special to trigger recompilations either.
This is a backport of sbt/zinc#95 The previous approach to value class API (introduced by sbt#2261 and refined by sbt#2413 and sbt#2414) was to store both unerased and erased signatures so that changes to value classes forced recompilations. This is no longer necessary thanks to sbt#2523: if a class type is used, then it becomes a dependency of the current class and its name is part of the used names of the current class. Since the name hash of a class changes if it stops or start extending AnyVal, this is enough to force recompilation of anything that uses a value class type. If the underlying type of a value class change, its name hash doesn't change, but the name hash of `<init>` changes and since every class uses the name `<init>`, we don't need to do anything special to trigger recompilations either.
[BPORT] Simplify value class API handling and fix #2497
I think I'm hitting this. My stacktrace is:
|
@drdozer Could you try the nightly |
The previous approach to value class API (introduced by sbt/sbt#2261 and refined by sbt/sbt#2413 and sbt/sbt#2414) was to store both unerased and erased signatures so that changes to value classes forced recompilations. This is no longer necessary thanks to scala#87: if a class type is used, then it becomes a dependency of the current class and its name is part of the used names of the current class. Since the name hash of a class changes if it stops or start extending AnyVal, this is enough to force recompilation of anything that uses a value class type. If the underlying type of a value class change, its name hash doesn't change, but the name hash of <init> change and since every class uses the name <init>, we don't need to do anything special to trigger recompilations either.
The previous approach to value class API (introduced by sbt/sbt#2261 and refined by sbt/sbt#2413 and sbt/sbt#2414) was to store both unerased and erased signatures so that changes to value classes forced recompilations. This is no longer necessary thanks to scala#87: if a class type is used, then it becomes a dependency of the current class and its name is part of the used names of the current class. Since the name hash of a class changes if it stops or start extending AnyVal, this is enough to force recompilation of anything that uses a value class type. If the underlying type of a value class change, its name hash doesn't change, but the name hash of <init> change and since every class uses the name <init>, we don't need to do anything special to trigger recompilations either. Rewritten from sbt/zinc@1e7e99e
this turned up in the Scala community build at e.g. https://scala-ci.typesafe.com/job/scala-2.11.x-jdk8-integrate-community-build/166/consoleFull, in @lihaoyi's fastparse project.
possible interested parties: @adriaanm, @Duhemm?
how to reproduce:
hub clone lihaoyi/fastparse; cd fastparse
; editproject/build.properties
and change 0.13.9 to 0.13.11;sbt sbt fastparseJVM/test
resulting stack trace:
The text was updated successfully, but these errors were encountered: