Comments (12)
@som-snytt not obvious me to what the cause might be. I'll keep digging.
from community-build.
[warn] 1 deprecation (since 18); re-run with -deprecation for details
I think this is our first time seeing Java since.
Nice comment is cold comfort:
* NOTE(olafurpg). The pattern match in this file has gotten out of hand. It's
* difficult even for myself to keep track of what's going on
It turns out that Scalameta has (where IndexedSeqOptimized
is a dummy trait for 2.13)
@data class Tokens private (
private val tokens: Array[Token],
private val start: Int,
private val end: Int
) extends immutable.IndexedSeq[Token] with IndexedSeqOptimized[Token] {
def apply(idx: Int): Token = tokens(start + idx)
def length: Int = end - start
head
is defined as apply(0)
(the old implementation) and last
is inherited, which used to be apply(length-1)
but now checks isEmpty
first. Since start
is typically an index into the large tokens
array, apply(-1)
does not throw but generally supplies a scala.meta.tokens.Token$Space
.
Probably that is just a bug in Scalameta, and the additional bug in Scalafmt is not to assume non-empty tokens (see added filter):
defnBeforeTemplate(leftOwner).filter(_.tokens.nonEmpty).map { x =>
val policyEnd = Policy.End.On(x.tokens.last)
delayedBreakPolicy(policyEnd)(forceNewlineBeforeExtends)
}
or what have you.
For a while, I assumed the problem would be brittle inheritance in IndexedSeq
, which may still be an issue. Not sure if the following comment just means compatibility between 2.12 and 2.13, etc.
/* Both head and headOption need to be implemented here due to
* binary incompatibility caused by
* https://github.com/scala/scala/commit/b20dd00b11f06c14c823d277cdfb58043a2586fc
*/
override def head: Token = apply(0)
from community-build.
Jenkins is currently chewing on the sbt 1.9.1->2 upgrade. after that, #1681 should get us to where we would be able to pull in a Scalameta fix
fyi @kitbellew
from community-build.
@lrytz does this give you cold feet about scala/scala#10392 ?
while you ponder that, I'll try making Som's suggested changes in scalacommunitybuild forks of scalameta and scalafmt.
from community-build.
@SethTisue revealing bugs in library code is a good thing. I'm using "good thing" in its generic, non-trademarked sense.
from community-build.
ah, @som-snytt is way ahead of me... I'm just now seeing scalameta/scalameta#3235 and scalameta/scalafmt#3581. I'll give those a try
from community-build.
yup that did it 🎉 , thx @som-snytt
from community-build.
Related Issues (20)
- add JDK 17 build HOT 8
- radically simplify the build HOT 6
- Add Cats Effect 3 to the community build HOT 6
- dbuild launcher JARs seem to have gone missing HOT 3
- policy for advancing project SHAs? HOT 1
- Move the JDK 17 build off early-access, onto 17 final HOT 3
- install latest scala-cli on behemoths HOT 2
- Delete and archive the Gitter room HOT 1
- Run the build on JDK 20 HOT 15
- Upgrade to sbt 1.8.0 HOT 1
- Upgrade to JDK 20 final once Temurin is available HOT 2
- fix failing sbt 0.13 builds in 2.12 build HOT 2
- Add JDK 21 to build matrix HOT 22
- add more scalafix projects HOT 12
- Scaladoc generation failing in Scalafix repo after recent updates HOT 2
- Add JDK 22-ea to build matrix HOT 4
- Add Akka resolver so I can unfreeze some downstream-from-Akka repos
- Upgrade behemoths to JDK 22 final HOT 1
- Add JDK 23 to matrix
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 community-build.