Comments (9)
If I build Play with 3.3.2 will it be necessary to make people also upgrade to Scala 3.3.2 in their projects?
No, that should not be necessary. I'll investigate your issue.
from playframework.
I can confirm Scala 3.3.3 fixes the problem. Thanks!
from playframework.
What I ask myself is: If I build Play with 3.3.2 will it be necessary to make people also upgrade to Scala 3.3.2 in their projects? I thought this would not be necessary (but please correct me if I am wrong).
Thanks for your help!
from playframework.
Running with -Ydebug
gives more info:
java.util.NoSuchElementException: contextual$
at dotty.tools.dotc.util.ReadOnlyMap.apply(ReadOnlyMap.scala:29)
at dotty.tools.dotc.core.tasty.TastyUnpickler.readNameContents(TastyUnpickler.scala:72)
at dotty.tools.dotc.core.tasty.TastyUnpickler.$init$$$anonfun$1(TastyUnpickler.scala:94)
at dotty.tools.tasty.TastyReader.until(TastyReader.scala:125)
at dotty.tools.dotc.core.tasty.TastyUnpickler.<init>(TastyUnpickler.scala:94)
at dotty.tools.dotc.core.tasty.TastyUnpickler.<init>(TastyUnpickler.scala:34)
at dotty.tools.dotc.core.tasty.DottyUnpickler.<init>(DottyUnpickler.scala:48)
/cc @bishabosha
from playframework.
I have my doubts right now that Scala 3.3.1 can handle the Tasty files Scala 3.3.2 generates just by looking (grep'ing) at the source code:
./dotty ((3.3.1))$ grep -ir 'contextual\$'
./dotty ((3.3.2))$
# No results
./dotty ((3.3.1))$ grep -ir 'ContextFunctionParamName'
./dotty ((3.3.1))$
# No results
./dotty ((3.3.2))$ grep -ir 'contextual\$'
tests/neg/i11350.check: | Could not infer type for parameter contextual$1 of anonymous function
tests/neg/i11350.check: | Could not infer type for parameter contextual$2 of anonymous function
tests/run-staging/quote-nested-5.check: ((q2: scala.quoted.Quotes) ?=> ((contextual$2: scala.quoted.Quotes) ?=> a).apply(using q2))
tests/run-staging/quote-nested-2.check: ((contextual$2: scala.quoted.Quotes) ?=> a).apply(using q)
tests/run-staging/multi-staging.check: scala.quoted.runtime.Expr.quote[scala.Int](1.+(scala.quoted.runtime.Expr.splice[scala.Int](((contextual$5: scala.quoted.Quotes) ?=> scala.quoted.Expr.apply[scala.Int](x1)(scala.quoted.ToExpr.IntToExpr[scala.Int])(contextual$5))))).apply(using q1)
compiler/src/dotty/tools/dotc/core/NameKinds.scala: * val x: A ?=> B = (contextual$1: A) ?=> b
compiler/src/dotty/tools/dotc/core/NameKinds.scala: val ContextFunctionParamName: UniqueNameKind = new UniqueNameKind("contextual$")
./dotty ((3.3.2))$
./dotty ((3.3.2))$ grep -ir 'ContextFunctionParamName'
compiler/src/dotty/tools/dotc/semanticdb/Scala3.scala: && !name.is(NameKinds.ContextFunctionParamName)
compiler/src/dotty/tools/dotc/ast/Desugar.scala:import NameKinds.{UniqueName, ContextBoundParamName, ContextFunctionParamName, DefaultGetterName, WildcardParamName}
compiler/src/dotty/tools/dotc/ast/Desugar.scala: val params = makeImplicitParameters(formals, mods, mkParamName = () => ContextFunctionParamName.fresh())
compiler/src/dotty/tools/dotc/core/NameKinds.scala: val ContextFunctionParamName: UniqueNameKind = new UniqueNameKind("contextual$")
./dotty ((3.3.2))$
But maybe I am wrong and there are other mechanism I am not aware of which might make things work.
from playframework.
A workaround might be to make PathBindableMacros.scala emit evidence$
again instead of contextual$
somehow even when build with Scala 3.3.2.
from playframework.
So while these name prefixes such as contextual$
are not special in TASTy format, it seems that the compiler's own implementation of name reading is inflexible in receiving prefixes it doesn't know about, basically baking them into compatibility by proxy
from playframework.
@sharable private val simpleNameKinds = util.HashMap[Int, ClassifiedNameKind]()
@sharable private val qualifiedNameKinds = util.HashMap[Int, QualifiedNameKind]()
@sharable private val numberedNameKinds = util.HashMap[Int, NumberedNameKind]()
@sharable private val uniqueNameKinds = util.HashMap[String, UniqueNameKind]()
unique names is the outlier, in using any user-defined string as the key, rather than tag int defined in TastyFormat.NameTags.
from playframework.
from playframework.
Related Issues (20)
- Set up dependabot to update GitHub actions HOT 1
- POST request fails with java.lang.IllegalStateException: Sink.asPublisher(fanout = false) only supports one subscriber HOT 2
- Play 2.9.0 and JDK 17.0.9 com.typesafe.sslconfig.ssl.FakeKeyStore cannot access class sun.security HOT 2
- [Feature] Add option to disable Javascript routers HOT 10
- Evolutions generated in wrong place in `PlayService` project HOT 6
- InjectedController trait not working with scala 3 HOT 9
- The link for guiding user to source in document is broken HOT 2
- COPY button in document code section would move along with the scroll bar HOT 3
- The link for Zenexity has been broken in Play Philosophy page HOT 1
- sbt-heroku plugin no longer maintained HOT 3
- `TestServer.isRunning` throws an exception when the server is not running. HOT 3
- Loss `Result` attributes by any modification HOT 4
- Requests with Large POST Body Immediately Goes into Delay Cancellation Right After the Server Received the Request HOT 6
- Caffeine cache API has inconsistent behavior with differing types and between sync/async HOT 1
- play hangs on console interacton when using jblas library HOT 4
- 2.9 with Scala 2.13 not supporting pack4j 6.00 dependency :Jackson Data-bind 2.15.x
- Documentation spelling fix HOT 3
- Replace `3.0.x` with next version HOT 5
- SSL certificate for www.playframework.com is expired HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from playframework.