-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: drop old stdlib plugin in favour of internal project #23202
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
Open
hamzaremmal
wants to merge
5
commits into
scala:main
Choose a base branch
from
hamzaremmal:drop-stdlib-plugin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
68869dd
chore: drop old stdlib plugin in favour of internal project
hamzaremmal 94f03ff
chore: add library-internal-tasty
hamzaremmal 1a6cd8d
chore: disable cc files present in library-internal
hamzaremmal 5b2ae84
chore: use library-internal in scala2-bootstrap libraries
hamzaremmal b1f5dad
chore: adapt tastyMiMa to not add library-internal in the cp
hamzaremmal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Scala (https://www.scala-lang.org) | ||
* | ||
* Copyright EPFL and Lightbend, Inc. dba Akka | ||
* | ||
* Licensed under Apache License 2.0 | ||
* (http://www.apache.org/licenses/LICENSE-2.0). | ||
* | ||
* See the NOTICE file distributed with this work for | ||
* additional information regarding copyright ownership. | ||
*/ | ||
|
||
package scala | ||
|
||
/** `AnyVal` is the root class of all ''value types'', which describe values | ||
* not implemented as objects in the underlying host system. Value classes | ||
* are specified in Scala Language Specification, section 12.2. | ||
* | ||
* The standard implementation includes nine `AnyVal` subtypes: | ||
* | ||
* [[scala.Double]], [[scala.Float]], [[scala.Long]], [[scala.Int]], [[scala.Char]], | ||
* [[scala.Short]], and [[scala.Byte]] are the ''numeric value types''. | ||
* | ||
* [[scala.Unit]] and [[scala.Boolean]] are the ''non-numeric value types''. | ||
* | ||
* Other groupings: | ||
* | ||
* - The ''subrange types'' are [[scala.Byte]], [[scala.Short]], and [[scala.Char]]. | ||
* - The ''integer types'' include the subrange types as well as [[scala.Int]] and [[scala.Long]]. | ||
* - The ''floating point types'' are [[scala.Float]] and [[scala.Double]]. | ||
* | ||
* A subclass of `AnyVal` is called a ''user-defined value class'' | ||
* and is treated specially by the compiler. Properly-defined user value classes provide a way | ||
* to improve performance on user-defined types by avoiding object allocation at runtime, and by | ||
* replacing virtual method invocations with static method invocations. | ||
* | ||
* User-defined value classes which avoid object allocation... | ||
* | ||
* - must have a single `val` parameter that is the underlying runtime representation. | ||
* - can define `def`s, but no `val`s, `var`s, or nested `trait`s, `class`es or `object`s. | ||
* - typically extend no other trait apart from `AnyVal`. | ||
* - cannot be used in type tests or pattern matching. | ||
* - may not override `equals` or `hashCode` methods. | ||
* | ||
* A minimal example: | ||
* {{{ | ||
* class Wrapper(val underlying: Int) extends AnyVal { | ||
* def foo: Wrapper = new Wrapper(underlying * 19) | ||
* } | ||
* }}} | ||
* | ||
* It's important to note that user-defined value classes are limited, and in some circumstances, | ||
* still must allocate a value class instance at runtime. These limitations and circumstances are | ||
* explained in greater detail in the [[https://docs.scala-lang.org/overviews/core/value-classes.html Value Classes and Universal Traits]]. | ||
*/ | ||
abstract class AnyVal extends Any { | ||
def getClass(): Class[_ <: AnyVal] = null | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Scala (https://www.scala-lang.org) | ||
* | ||
* Copyright EPFL and Lightbend, Inc. dba Akka | ||
* | ||
* Licensed under Apache License 2.0 | ||
* (http://www.apache.org/licenses/LICENSE-2.0). | ||
* | ||
* See the NOTICE file distributed with this work for | ||
* additional information regarding copyright ownership. | ||
*/ | ||
|
||
// GENERATED CODE: DO NOT EDIT. | ||
// genprod generated these sources at: 2022-01-17T20:47:12.170348200Z | ||
|
||
package scala | ||
|
||
|
||
/** A function of 0 parameters. | ||
* | ||
* In the following example, the definition of `greeting` is | ||
* shorthand, conceptually, for the anonymous class definition | ||
* `anonfun0`, although the implementation details of how the | ||
* function value is constructed may differ: | ||
* | ||
* {{{ | ||
* object Main extends App { | ||
* val name = "world" | ||
* val greeting = () => s"hello, $name" | ||
* | ||
* val anonfun0 = new Function0[String] { | ||
* def apply(): String = s"hello, $name" | ||
* } | ||
* assert(greeting() == anonfun0()) | ||
* } | ||
* }}} | ||
*/ | ||
trait Function0[@specialized(Specializable.Primitives) +R] extends AnyRef { self => | ||
/** Apply the body of this function to the arguments. | ||
* @return the result of function application. | ||
*/ | ||
def apply(): R | ||
|
||
override def toString(): String = "<function0>" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Scala (https://www.scala-lang.org) | ||
* | ||
* Copyright EPFL and Lightbend, Inc. dba Akka | ||
* | ||
* Licensed under Apache License 2.0 | ||
* (http://www.apache.org/licenses/LICENSE-2.0). | ||
* | ||
* See the NOTICE file distributed with this work for | ||
* additional information regarding copyright ownership. | ||
*/ | ||
|
||
// GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. | ||
|
||
package scala | ||
|
||
|
||
/** A function of 2 parameters. | ||
* | ||
* In the following example, the definition of `max` is | ||
* shorthand, conceptually, for the anonymous class definition | ||
* `anonfun2`, although the implementation details of how the | ||
* function value is constructed may differ: | ||
* | ||
* {{{ | ||
* object Main extends App { | ||
* val max = (x: Int, y: Int) => if (x < y) y else x | ||
* | ||
* val anonfun2 = new Function2[Int, Int, Int] { | ||
* def apply(x: Int, y: Int): Int = if (x < y) y else x | ||
* } | ||
* assert(max(0, 1) == anonfun2(0, 1)) | ||
* } | ||
* }}} | ||
*/ | ||
trait Function2[@specialized(Specializable.Args) -T1, @specialized(Specializable.Args) -T2, @specialized(Specializable.Return) +R] extends AnyRef { self => | ||
/** Apply the body of this function to the arguments. | ||
* @return the result of function application. | ||
*/ | ||
def apply(v1: T1, v2: T2): R | ||
/** Creates a curried version of this function. | ||
* | ||
* @return a function `f` such that `f(x1)(x2) == apply(x1, x2)` | ||
*/ | ||
@annotation.unspecialized def curried: T1 => T2 => R = { | ||
(x1: T1) => (x2: T2) => apply(x1, x2) | ||
} | ||
/** Creates a tupled version of this function: instead of 2 arguments, | ||
* it accepts a single [[scala.Tuple2]] argument. | ||
* | ||
* @return a function `f` such that `f((x1, x2)) == f(Tuple2(x1, x2)) == apply(x1, x2)` | ||
*/ | ||
|
||
@annotation.unspecialized def tupled: ((T1, T2)) => R = { | ||
case ((x1, x2)) => apply(x1, x2) | ||
} | ||
override def toString(): String = "<function2>" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Scala (https://www.scala-lang.org) | ||
* | ||
* Copyright EPFL and Lightbend, Inc. dba Akka | ||
* | ||
* Licensed under Apache License 2.0 | ||
* (http://www.apache.org/licenses/LICENSE-2.0). | ||
* | ||
* See the NOTICE file distributed with this work for | ||
* additional information regarding copyright ownership. | ||
*/ | ||
|
||
// GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. | ||
|
||
package scala | ||
|
||
object Product1 { | ||
def unapply[T1](x: Product1[T1]): Option[Product1[T1]] = | ||
Some(x) | ||
} | ||
|
||
/** Product1 is a Cartesian product of 1 component. | ||
*/ | ||
trait Product1[@specialized(Int, Long, Double) +T1] extends Any with Product { | ||
/** The arity of this product. | ||
* @return 1 | ||
*/ | ||
override def productArity: Int = 1 | ||
|
||
|
||
/** Returns the n-th projection of this product if 0 <= n < productArity, | ||
* otherwise throws an `IndexOutOfBoundsException`. | ||
* | ||
* @param n number of the projection to be returned | ||
* @return same as `._(n+1)`, for example `productElement(0)` is the same as `._1`. | ||
* @throws IndexOutOfBoundsException if the `n` is out of range(n < 0 || n >= 1). | ||
*/ | ||
|
||
@throws(classOf[IndexOutOfBoundsException]) | ||
override def productElement(n: Int): Any = n match { | ||
case 0 => _1 | ||
case _ => throw new IndexOutOfBoundsException(s"$n is out of bounds (min 0, max 0)") | ||
} | ||
|
||
/** A projection of element 1 of this Product. | ||
* @return A projection of element 1. | ||
*/ | ||
def _1: T1 | ||
|
||
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Scala (https://www.scala-lang.org) | ||
* | ||
* Copyright EPFL and Lightbend, Inc. dba Akka | ||
* | ||
* Licensed under Apache License 2.0 | ||
* (http://www.apache.org/licenses/LICENSE-2.0). | ||
* | ||
* See the NOTICE file distributed with this work for | ||
* additional information regarding copyright ownership. | ||
*/ | ||
|
||
// GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. | ||
|
||
package scala | ||
|
||
object Product2 { | ||
def unapply[T1, T2](x: Product2[T1, T2]): Option[Product2[T1, T2]] = | ||
Some(x) | ||
} | ||
|
||
/** Product2 is a Cartesian product of 2 components. | ||
*/ | ||
trait Product2[@specialized(Int, Long, Double) +T1, @specialized(Int, Long, Double) +T2] extends Any with Product { | ||
/** The arity of this product. | ||
* @return 2 | ||
*/ | ||
override def productArity: Int = 2 | ||
|
||
|
||
/** Returns the n-th projection of this product if 0 <= n < productArity, | ||
* otherwise throws an `IndexOutOfBoundsException`. | ||
* | ||
* @param n number of the projection to be returned | ||
* @return same as `._(n+1)`, for example `productElement(0)` is the same as `._1`. | ||
* @throws IndexOutOfBoundsException if the `n` is out of range(n < 0 || n >= 2). | ||
*/ | ||
|
||
@throws(classOf[IndexOutOfBoundsException]) | ||
override def productElement(n: Int): Any = n match { | ||
case 0 => _1 | ||
case 1 => _2 | ||
case _ => throw new IndexOutOfBoundsException(s"$n is out of bounds (min 0, max 1)") | ||
} | ||
|
||
/** A projection of element 1 of this Product. | ||
* @return A projection of element 1. | ||
*/ | ||
def _1: T1 | ||
/** A projection of element 2 of this Product. | ||
* @return A projection of element 2. | ||
*/ | ||
def _2: T2 | ||
|
||
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Scala (https://www.scala-lang.org) | ||
* | ||
* Copyright EPFL and Lightbend, Inc. dba Akka | ||
* | ||
* Licensed under Apache License 2.0 | ||
* (http://www.apache.org/licenses/LICENSE-2.0). | ||
* | ||
* See the NOTICE file distributed with this work for | ||
* additional information regarding copyright ownership. | ||
*/ | ||
|
||
// GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. | ||
|
||
package scala | ||
|
||
|
||
/** A tuple of 1 elements; the canonical representation of a [[scala.Product1]]. | ||
* | ||
* @constructor Create a new tuple with 1 elements. | ||
* @param _1 Element 1 of this Tuple1 | ||
*/ | ||
final case class Tuple1[@specialized(Int, Long, Double) +T1](_1: T1) extends Product1[T1] | ||
{ | ||
override def toString(): String = "(" + _1 + ")" | ||
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Scala (https://www.scala-lang.org) | ||
* | ||
* Copyright EPFL and Lightbend, Inc. dba Akka | ||
* | ||
* Licensed under Apache License 2.0 | ||
* (http://www.apache.org/licenses/LICENSE-2.0). | ||
* | ||
* See the NOTICE file distributed with this work for | ||
* additional information regarding copyright ownership. | ||
*/ | ||
|
||
// GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. | ||
|
||
package scala | ||
|
||
|
||
/** A tuple of 2 elements; the canonical representation of a [[scala.Product2]]. | ||
* | ||
* @constructor Create a new tuple with 2 elements. Note that it is more idiomatic to create a Tuple2 via `(t1, t2)` | ||
* @param _1 Element 1 of this Tuple2 | ||
* @param _2 Element 2 of this Tuple2 | ||
*/ | ||
final case class Tuple2[@specialized(Int, Long, Double, Char, Boolean/*, AnyRef*/) +T1, @specialized(Int, Long, Double, Char, Boolean/*, AnyRef*/) +T2](_1: T1, _2: T2) | ||
extends Product2[T1, T2] | ||
{ | ||
override def toString(): String = "(" + _1 + "," + _2 + ")" | ||
|
||
/** Swaps the elements of this `Tuple`. | ||
* @return a new Tuple where the first element is the second element of this Tuple and the | ||
* second element is the first element of this Tuple. | ||
*/ | ||
def swap: Tuple2[T2,T1] = Tuple2(_2, _1) | ||
|
||
} | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems missing and end line here.