Comments (6)
The main issue with this change is that it's a problem that manifests down to the application level. We cannot simply just silence the warnings at the library level. Meaning that any library that experiences this, now needs its own migration guide for its users.
from scala3.
@lenguyenthanh We did tests in the open CB and there was only a tiny minority of projects that broke (something like 5 out of 1500). I was myself very surprised by this and that was the main reason why we decided that we could do the change. After all the change is a huge improvement, without it you cannot really do serious typeclass-based development.
Most of the breakage traced back to Reactive Mongo which is also the root error for Lichess. There were more warnings before but since our latest fixes to avoid spurious warnings it should be much better.
We should do a careful analysis of ReactiveMongo and advise downstream projects of possible breakages. The implicits in Reactive Mongo's BSON handling that cause the switch in priority are unfortunately extremely complex and inscrutable (at least to my eyes).
from scala3.
I "successful" migrated lila to 3.5.0-RC3 with -source:3.6-migration
: lichess-org/lila#15664. But I'm quite afraid that #19300 will cause a lot of trouble to the community/industry as @soronpo said above.
I believe that there are a lot of projects out there depend on the rule of choosing the most specific implicit (before #19300). Which is kinda intuitive in OOP sense.
I really think that We have to have some migration guide before 3.5 release.
from scala3.
cc @odersky
from scala3.
@bracevac this would be covered by scala/scala-lang#1675, right?
from scala3.
@lenguyenthanh We did tests in the open CB and there was only a tiny minority of projects that broke (something like 5 out of 1500). I was myself very surprised by this and that was the main reason why we decided that we could do the change. After all the change is a huge improvement, without it you cannot really do serious typeclass-based development.
I'm 100% behind this change. It does indeed improve Scala given semantic and I'm very optimistic that this change combining with scala/improvement-proposals#81 It'll easier for new comers understand and use contextual abstraction. Which is one of the power of Scala IMHO.
Most of the breakage traced back to Reactive Mongo which is also the root error for Lichess. There were more warnings before but since our latest fixes to avoid spurious warnings it should be much better.
We should do a careful analysis of ReactiveMongo and advise downstream projects of possible breakages. The implicits in Reactive Mongo's BSON handling that cause the switch in priority are unfortunately extremely complex and inscrutable (at least to my eyes).
My concern is mostly about the migration works for the industry. If the errors is "obvious" like in reactive-mongo, We (the industry) can solve it (maybe somewhat difficult but it's solvable, I solved it in lila by reading the PR and reactive-mongo code). But sometime, We make it compiles, no warning anymore, but the business logic is reversed. And I think this kind of errors is the one We should focus on the migration documentation.
Here are some issues We have had after 3.5.0-RC4 (with given prioritisation change) migrations:
p/s: I agree that the way reactive-mongo and lila using implicit and given are over complicated (I would say "abusing") but I guess that not to abnormal in the industry.
edited to fix typo and add some more information.
from scala3.
Related Issues (20)
- 3.5.0-RC7 Release procedure HOT 1
- "method apply must be called with () argument" must be generated for scala.Function0 HOT 5
- Regression in `softwaremill/tapir` - StaleSymbolException when compiling macros
- type variable resolution contradicts language spec in a case of an inner class extending an outer class HOT 3
- static final null character crashes parser HOT 1
- quoted Symbol.spliceOwner should not be the current class in extends clauses
- Unexpected type representation reached the compiler backend
- a type defined in a trait is "not found" in an object that extends the trait (under certain circumstances) HOT 1
- Anonymous givens for two different types with same name create "Duplicate definition" HOT 1
- Unexpected warning when `@main` is used twice within a single object HOT 2
- Match type with opaque type among cases does not resolve HOT 1
- Cannot do a map on a Map with Scala 3, with Scala 2.13 it works ok HOT 6
- 3.5.0 & 3.5.1-RC2 Release procedure HOT 2
- -Yexplicit-nulls fails to detect null pointer dereference HOT 3
- `-indent` `-rewrite` can produce inparsable code for curried methods taking triple-quote arguments HOT 3
- assertion failed: position not set for new com.augustnagro.magnum.SqlName # -1 of class dotty.tools.dotc.ast.Trees$Select HOT 1
- 3.4.3 Release procedure HOT 1
- Need a way to specify a method's charging a capture set parameter
- Match type fails to reduce when it doesn't look like it needs to reduce
- Nil and LinearSeq cannot be compared HOT 1
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 scala3.