You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by sl...@apache.org on 2023/06/12 11:37:29 UTC

[daffodil] branch main updated: Update scala-library, scala-reflect to 2.12.18

This is an automated email from the ASF dual-hosted git repository.

slawrence pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil.git


The following commit(s) were added to refs/heads/main by this push:
     new de158a62d Update scala-library, scala-reflect to 2.12.18
de158a62d is described below

commit de158a62d44d00f77054385c95e35beff90a6bfb
Author: Scala Steward <sc...@virtuslab.com>
AuthorDate: Thu Jun 8 13:43:58 2023 +0000

    Update scala-library, scala-reflect to 2.12.18
    
    Also make more changes as well as bumps in main.yml and build.sbt:
    
    NOTICE: Incorporate change in years from scala/NOTICE.  Update path to
    UniquenessCache.scala (osgi changes had moved it).
    
    bin.NOTICE: Incorporate change in years from scala/NOTICE.
    
    UniquenessCache.scala: Incorporate new changes from 2.12 series.
---
 .github/workflows/main.yml                              |  8 ++++----
 NOTICE                                                  |  6 +++---
 build.sbt                                               |  4 ++--
 daffodil-cli/bin.NOTICE                                 |  4 ++--
 .../org/apache/daffodil/lib/util/UniquenessCache.scala  | 17 ++++++++++-------
 5 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 60e54ec01..7f2dbd817 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -40,14 +40,14 @@ jobs:
       matrix:
         java_distribution: [ temurin ]
         java_version: [ 8, 11, 17 ]
-        scala_version: [ 2.12.17 ]
+        scala_version: [ 2.12.18 ]
         os: [ ubuntu-22.04, windows-2022 ]
         include:
           - os: macos-12
             shell: bash
             java_distribution: temurin
             java_version: 17
-            scala_version: 2.12.17
+            scala_version: 2.12.18
             env_cc: cc
             env_ar: ar
           - os: ubuntu-22.04
@@ -70,7 +70,7 @@ jobs:
       SONARSCAN: ${{
                      matrix.os == 'ubuntu-22.04' &&
                      matrix.java_version == '11' &&
-                     matrix.scala_version == '2.12.17' &&
+                     matrix.scala_version == '2.12.18' &&
                      github.event_name == 'push' &&
                      github.repository == 'apache/daffodil' &&
                      github.ref == 'refs/heads/main'
@@ -196,7 +196,7 @@ jobs:
       matrix:
         java_distribution: [ temurin ]
         java_version: [ 17 ]
-        scala_version: [ 2.12.17 ]
+        scala_version: [ 2.12.18 ]
         os: [ ubuntu-22.04 ]
     runs-on: ${{ matrix.os }}
     env:
diff --git a/NOTICE b/NOTICE
index ebd48cb58..1e574b389 100644
--- a/NOTICE
+++ b/NOTICE
@@ -13,8 +13,8 @@ The following NOTICE information applies to components distributed with this pro
 
 This product includes derived works from Scala
   Scala
-  Copyright (c) 2002-2021 EPFL
-  Copyright (c) 2011-2021 Lightbend, Inc.
+  Copyright (c) 2002-2023 EPFL
+  Copyright (c) 2011-2023 Lightbend, Inc.
 
   Scala includes software developed at
   LAMP/EPFL (https://lamp.epfl.ch/) and
@@ -23,4 +23,4 @@ This product includes derived works from Scala
   The derived work is adapted from scala/src/library/scala/Symbol.scala:
     https://github.com/scala/scala/blob/904e3a5d2b9616b9c533d77d0c51652b138e8659/src/library/scala/Symbol.scala
   and can be found in:
-    daffodil-lib/src/main/scala/org/apache/daffodil/util/UniquenessCache.scala
+    daffodil-lib/src/main/scala/org/apache/daffodil/lib/util/UniquenessCache.scala
diff --git a/build.sbt b/build.sbt
index 5e9daf12d..9e8370c7a 100644
--- a/build.sbt
+++ b/build.sbt
@@ -214,8 +214,8 @@ lazy val testStdLayout = Project("daffodil-test-stdLayout", file("test-stdLayout
 lazy val commonSettings = Seq(
   organization := "org.apache.daffodil",
   version := "3.5.0-SNAPSHOT",
-  scalaVersion := "2.12.17",
-  crossScalaVersions := Seq("2.12.17"),
+  scalaVersion := "2.12.18",
+  crossScalaVersions := Seq("2.12.18"),
   scalacOptions ++= buildScalacOptions(scalaVersion.value),
   Compile / compile / javacOptions ++= buildJavacOptions(),
   logBuffered := true,
diff --git a/daffodil-cli/bin.NOTICE b/daffodil-cli/bin.NOTICE
index a3757f23e..dab451ff9 100644
--- a/daffodil-cli/bin.NOTICE
+++ b/daffodil-cli/bin.NOTICE
@@ -133,8 +133,8 @@ The following NOTICE information applies to binary components distributed with t
 - org.scala-lang.scala-library-<VERSION>.jar
 - org.scala-lang.scala-reflect-<VERSION>.jar
   Scala
-  Copyright (c) 2002-2022 EPFL
-  Copyright (c) 2011-2022 Lightbend, Inc.
+  Copyright (c) 2002-2023 EPFL
+  Copyright (c) 2011-2023 Lightbend, Inc.
 
   Scala includes software developed at
   LAMP/EPFL (https://lamp.epfl.ch/) and
diff --git a/daffodil-lib/src/main/scala/org/apache/daffodil/lib/util/UniquenessCache.scala b/daffodil-lib/src/main/scala/org/apache/daffodil/lib/util/UniquenessCache.scala
index 79a5d9ed6..34885849a 100644
--- a/daffodil-lib/src/main/scala/org/apache/daffodil/lib/util/UniquenessCache.scala
+++ b/daffodil-lib/src/main/scala/org/apache/daffodil/lib/util/UniquenessCache.scala
@@ -13,23 +13,26 @@
 package org.apache.daffodil.lib.util
 
 /**
- * The following code was copied unmodified from Scala source:
+ * abstract class UniquenessCache was copied from this Scala source file:
  *   https://github.com/scala/scala/blob/904e3a5d2b9616b9c533d77d0c51652b138e8659/src/library/scala/Symbol.scala
+ * and it should be kept up to date with the Scala 2.12.x branch:
+ *   https://raw.githubusercontent.com/scala/scala/2.12.x/src/library/scala/Symbol.scala
  *
  * This class provides a simple way to get unique objects for equal strings.
  * Because they are interned, they can be compared using reference equality.
- * This is normally used for scala Symbols. See also Namespaces.scala for a
- * slightly more comple xusage.
+ *
+ *  @author  Martin Odersky, Iulian Dragos
+ *  @since   1.7
  */
 abstract class UniquenessCache[K, V >: Null] {
   import java.lang.ref.WeakReference
   import java.util.WeakHashMap
   import java.util.concurrent.locks.ReentrantReadWriteLock
 
-  private[this] val rwl = new ReentrantReadWriteLock()
-  private[this] val rlock = rwl.readLock
-  private[this] val wlock = rwl.writeLock
-  private[this] val map = new WeakHashMap[K, WeakReference[V]]
+  private val rwl = new ReentrantReadWriteLock()
+  private val rlock = rwl.readLock
+  private val wlock = rwl.writeLock
+  private val map = new WeakHashMap[K, WeakReference[V]]
 
   protected def valueFromKey(k: K): V
   protected def keyFromValue(v: V): Option[K]