diff --git a/build.sbt b/build.sbt index 5e71a3ac4a8d..2fd85a8fbe4b 100644 --- a/build.sbt +++ b/build.sbt @@ -369,7 +369,6 @@ lazy val enso = (project in file(".")) `test-utils`, `text-buffer`, `version-output`, - yaml, `ydoc-server` ) .settings(Global / concurrentRestrictions += Tags.exclusive(Exclusive)) @@ -440,7 +439,7 @@ val circeVersion = "0.14.7" val circeGenericExtrasVersion = "0.14.3" val circe = Seq("circe-core", "circe-generic", "circe-parser") .map("io.circe" %% _ % circeVersion) -val snakeyamlVersion = "2.2" +val snakeyamlVersion = "2.3" // === Commons ================================================================ @@ -910,15 +909,6 @@ lazy val `syntax-rust-definition` = project Compile / compile / javacOptions ++= Seq("-source", "11", "-target", "11") ) -lazy val yaml = (project in file("lib/java/yaml")) - .settings( - frgaalJavaCompilerSetting, - version := "0.1", - libraryDependencies ++= Seq( - "org.yaml" % "snakeyaml" % snakeyamlVersion % "provided" - ) - ) - lazy val `scala-yaml` = (project in file("lib/scala/yaml")) .enablePlugins(JPMSPlugin) .configs(Test) @@ -3616,7 +3606,6 @@ lazy val `engine-runner` = project }.value ) .dependsOn(`version-output`) - .dependsOn(yaml) .dependsOn(pkg) .dependsOn(cli) .dependsOn(`profiling-utils`) diff --git a/distribution/engine/THIRD-PARTY/NOTICE b/distribution/engine/THIRD-PARTY/NOTICE index 6e2221a492a6..ab7e36138b04 100644 --- a/distribution/engine/THIRD-PARTY/NOTICE +++ b/distribution/engine/THIRD-PARTY/NOTICE @@ -598,5 +598,5 @@ Copyright notices related to this dependency can be found in the directory `org. 'snakeyaml', licensed under the Apache License, Version 2.0, is distributed with the engine. The license file can be found at `licenses/APACHE2.0`. -Copyright notices related to this dependency can be found in the directory `org.yaml.snakeyaml-2.2`. +Copyright notices related to this dependency can be found in the directory `org.yaml.snakeyaml-2.3`. diff --git a/distribution/engine/THIRD-PARTY/org.yaml.snakeyaml-2.2/NOTICES b/distribution/engine/THIRD-PARTY/org.yaml.snakeyaml-2.3/NOTICES similarity index 100% rename from distribution/engine/THIRD-PARTY/org.yaml.snakeyaml-2.2/NOTICES rename to distribution/engine/THIRD-PARTY/org.yaml.snakeyaml-2.3/NOTICES diff --git a/distribution/launcher/THIRD-PARTY/NOTICE b/distribution/launcher/THIRD-PARTY/NOTICE index a82fd5ac1607..9f5326ae53c2 100644 --- a/distribution/launcher/THIRD-PARTY/NOTICE +++ b/distribution/launcher/THIRD-PARTY/NOTICE @@ -158,5 +158,5 @@ Copyright notices related to this dependency can be found in the directory `org. 'snakeyaml', licensed under the Apache License, Version 2.0, is distributed with the launcher. The license file can be found at `licenses/APACHE2.0`. -Copyright notices related to this dependency can be found in the directory `org.yaml.snakeyaml-2.2`. +Copyright notices related to this dependency can be found in the directory `org.yaml.snakeyaml-2.3`. diff --git a/distribution/launcher/THIRD-PARTY/org.yaml.snakeyaml-2.2/NOTICES b/distribution/launcher/THIRD-PARTY/org.yaml.snakeyaml-2.3/NOTICES similarity index 100% rename from distribution/launcher/THIRD-PARTY/org.yaml.snakeyaml-2.2/NOTICES rename to distribution/launcher/THIRD-PARTY/org.yaml.snakeyaml-2.3/NOTICES diff --git a/distribution/project-manager/THIRD-PARTY/NOTICE b/distribution/project-manager/THIRD-PARTY/NOTICE index a2d85053533f..132257d49336 100644 --- a/distribution/project-manager/THIRD-PARTY/NOTICE +++ b/distribution/project-manager/THIRD-PARTY/NOTICE @@ -418,5 +418,5 @@ Copyright notices related to this dependency can be found in the directory `org. 'snakeyaml', licensed under the Apache License, Version 2.0, is distributed with the project-manager. The license file can be found at `licenses/APACHE2.0`. -Copyright notices related to this dependency can be found in the directory `org.yaml.snakeyaml-2.2`. +Copyright notices related to this dependency can be found in the directory `org.yaml.snakeyaml-2.3`. diff --git a/distribution/project-manager/THIRD-PARTY/org.yaml.snakeyaml-2.2/NOTICES b/distribution/project-manager/THIRD-PARTY/org.yaml.snakeyaml-2.3/NOTICES similarity index 100% rename from distribution/project-manager/THIRD-PARTY/org.yaml.snakeyaml-2.2/NOTICES rename to distribution/project-manager/THIRD-PARTY/org.yaml.snakeyaml-2.3/NOTICES diff --git a/lib/java/yaml/src/main/java/org/yaml/snakeyaml/introspector/MethodProperty.java b/lib/java/yaml/src/main/java/org/yaml/snakeyaml/introspector/MethodProperty.java deleted file mode 100644 index 720e719d0d3d..000000000000 --- a/lib/java/yaml/src/main/java/org/yaml/snakeyaml/introspector/MethodProperty.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * Copyright (c) 2008, SnakeYAML - * - *

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of the License at - * - *

http://www.apache.org/licenses/LICENSE-2.0 - * - *

Unless required by applicable law or agreed to in writing, software distributed under the - * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.yaml.snakeyaml.introspector; - -// remove once https://github.com/snakeyaml/snakeyaml/pull/12 gets integrated -import java.beans.FeatureDescriptor; -import java.beans.IntrospectionException; -import java.beans.Introspector; -import java.beans.PropertyDescriptor; -import java.lang.annotation.Annotation; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.lang.reflect.Type; -import java.util.List; -import java.util.Map; -import org.yaml.snakeyaml.error.YAMLException; -import org.yaml.snakeyaml.util.ArrayUtils; - -/** - * A MethodProperty is a Property which is accessed through accessor - * methods (setX, getX). It is possible to have a MethodProperty which has only setter, - * only getter, or both. It is not possible to have a MethodProperty which has neither - * setter nor getter. - */ -public class MethodProperty extends GenericProperty { - - private final PropertyDescriptor property; - private final boolean readable; - private final boolean writable; - - private static Type discoverGenericType(PropertyDescriptor property) { - Method readMethod = property.getReadMethod(); - if (readMethod != null) { - return readMethod.getGenericReturnType(); - } - - Method writeMethod = property.getWriteMethod(); - if (writeMethod != null) { - Type[] paramTypes = writeMethod.getGenericParameterTypes(); - if (paramTypes.length > 0) { - return paramTypes[0]; - } - } - /* - * This actually may happen if PropertyDescriptor is of type IndexedPropertyDescriptor and it - * has only IndexedGetter/Setter. ATM we simply skip type discovery. - */ - return null; - } - - public MethodProperty(PropertyDescriptor property) { - super( - property.getName(), - property.getPropertyType(), - MethodProperty.discoverGenericType(property)); - this.property = property; - this.readable = property.getReadMethod() != null; - this.writable = property.getWriteMethod() != null; - } - - @Override - public void set(Object object, Object value) throws Exception { - if (!writable) { - throw new YAMLException( - "No writable property '" + getName() + "' on class: " + object.getClass().getName()); - } - property.getWriteMethod().invoke(object, value); - } - - @Override - public Object get(Object object) { - try { - property.getReadMethod().setAccessible(true); // issue 50 - return property.getReadMethod().invoke(object); - } catch (Exception e) { - throw new YAMLException( - "Unable to find getter for property '" - + property.getName() - + "' on object " - + object - + ":" - + e); - } - } - - /** - * Returns the annotations that are present on read and write methods of this property or empty - * {@code List} if there're no annotations. - * - * @return the annotations that are present on this property or empty {@code List} if there're no - * annotations - */ - @Override - public List getAnnotations() { - List annotations; - if (isReadable() && isWritable()) { - annotations = - ArrayUtils.toUnmodifiableCompositeList( - property.getReadMethod().getAnnotations(), - property.getWriteMethod().getAnnotations()); - } else if (isReadable()) { - annotations = ArrayUtils.toUnmodifiableList(property.getReadMethod().getAnnotations()); - } else { - annotations = ArrayUtils.toUnmodifiableList(property.getWriteMethod().getAnnotations()); - } - return annotations; - } - - /** - * Returns property's annotation for the given type or {@code null} if it's not present. If the - * annotation is present on both read and write methods, the annotation on read method takes - * precedence. - * - * @param annotationType the type of the annotation to be returned - * @return property's annotation for the given type or {@code null} if it's not present - */ - @Override - public A getAnnotation(Class annotationType) { - A annotation = null; - if (isReadable()) { - annotation = property.getReadMethod().getAnnotation(annotationType); - } - if (annotation == null && isWritable()) { - annotation = property.getWriteMethod().getAnnotation(annotationType); - } - return annotation; - } - - @Override - public boolean isWritable() { - return writable; - } - - @Override - public boolean isReadable() { - return readable; - } - - private static final String TRANSIENT = "transient"; - - private static boolean isTransient(FeatureDescriptor fd) { - return Boolean.TRUE.equals(fd.getValue(TRANSIENT)); - } - - static void addProperties( - Class type, Map properties, boolean[] inaccessableFieldsExist) { - try { - for (PropertyDescriptor property : Introspector.getBeanInfo(type).getPropertyDescriptors()) { - Method readMethod = property.getReadMethod(); - if ((readMethod == null || !readMethod.getName().equals("getClass")) - && !isTransient(property)) { - properties.put(property.getName(), new MethodProperty(property)); - } - } - } catch (IntrospectionException e) { - throw new YAMLException(e); - } - - // add public fields - for (Class c = type; c != null; c = c.getSuperclass()) { - for (Field field : c.getDeclaredFields()) { - int modifiers = field.getModifiers(); - if (!Modifier.isStatic(modifiers) && !Modifier.isTransient(modifiers)) { - if (Modifier.isPublic(modifiers)) { - properties.put(field.getName(), new FieldProperty(field)); - } else { - inaccessableFieldsExist[0] = true; - } - } - } - } - } -} diff --git a/lib/java/yaml/src/main/java/org/yaml/snakeyaml/introspector/PropertyUtils.java b/lib/java/yaml/src/main/java/org/yaml/snakeyaml/introspector/PropertyUtils.java deleted file mode 100644 index d40687311d24..000000000000 --- a/lib/java/yaml/src/main/java/org/yaml/snakeyaml/introspector/PropertyUtils.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * Copyright (c) 2008, SnakeYAML - * - *

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of the License at - * - *

http://www.apache.org/licenses/LICENSE-2.0 - * - *

Unless required by applicable law or agreed to in writing, software distributed under the - * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.yaml.snakeyaml.introspector; - -// remove once https://github.com/snakeyaml/snakeyaml/pull/12 gets integrated -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.util.Collection; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Set; -import java.util.TreeSet; -import org.yaml.snakeyaml.error.YAMLException; -import org.yaml.snakeyaml.util.PlatformFeatureDetector; - -public class PropertyUtils { - - private final Map, Map> propertiesCache = - new HashMap, Map>(); - private final Map, Set> readableProperties = - new HashMap, Set>(); - private BeanAccess beanAccess = BeanAccess.DEFAULT; - private boolean allowReadOnlyProperties = false; - private boolean skipMissingProperties = false; - - private final PlatformFeatureDetector platformFeatureDetector; - - public PropertyUtils() { - this(new PlatformFeatureDetector()); - } - - PropertyUtils(PlatformFeatureDetector platformFeatureDetector) { - this.platformFeatureDetector = platformFeatureDetector; - - /* - * Android lacks much of java.beans (including the Introspector class, used here), because - * java.beans classes tend to rely on java.awt, which isn't supported in the Android SDK. That - * means we have to fall back on FIELD access only when SnakeYAML is running on the Android - * Runtime. - */ - if (platformFeatureDetector.isRunningOnAndroid()) { - beanAccess = BeanAccess.FIELD; - } - - /* when running with jlink restricted JDK without java.desktop package */ - try { - Class.forName("java.beans.Introspector"); - } catch (ClassNotFoundException ex) { - beanAccess = BeanAccess.FIELD; - } - } - - protected Map getPropertiesMap(Class type, BeanAccess bAccess) { - if (propertiesCache.containsKey(type)) { - return propertiesCache.get(type); - } - - Map properties = new LinkedHashMap(); - boolean[] inaccessableFieldsExist = {false}; - if (bAccess == BeanAccess.FIELD) { - for (Class c = type; c != null; c = c.getSuperclass()) { - for (Field field : c.getDeclaredFields()) { - int modifiers = field.getModifiers(); - if (!Modifier.isStatic(modifiers) - && !Modifier.isTransient(modifiers) - && !properties.containsKey(field.getName())) { - properties.put(field.getName(), new FieldProperty(field)); - } - } - } - } else { // add JavaBean properties - MethodProperty.addProperties(type, properties, inaccessableFieldsExist); - } - if (properties.isEmpty() && inaccessableFieldsExist[0]) { - throw new YAMLException("No JavaBean properties found in " + type.getName()); - } - propertiesCache.put(type, properties); - return properties; - } - - public Set getProperties(Class type) { - return getProperties(type, beanAccess); - } - - public Set getProperties(Class type, BeanAccess bAccess) { - if (readableProperties.containsKey(type)) { - return readableProperties.get(type); - } - Set properties = createPropertySet(type, bAccess); - readableProperties.put(type, properties); - return properties; - } - - protected Set createPropertySet(Class type, BeanAccess bAccess) { - Set properties = new TreeSet(); - Collection props = getPropertiesMap(type, bAccess).values(); - for (Property property : props) { - if (property.isReadable() && (allowReadOnlyProperties || property.isWritable())) { - properties.add(property); - } - } - return properties; - } - - public Property getProperty(Class type, String name) { - return getProperty(type, name, beanAccess); - } - - public Property getProperty(Class type, String name, BeanAccess bAccess) { - Map properties = getPropertiesMap(type, bAccess); - Property property = properties.get(name); - if (property == null && skipMissingProperties) { - property = new MissingProperty(name); - } - if (property == null) { - throw new YAMLException("Unable to find property '" + name + "' on class: " + type.getName()); - } - return property; - } - - public void setBeanAccess(BeanAccess beanAccess) { - if (platformFeatureDetector.isRunningOnAndroid() && beanAccess != BeanAccess.FIELD) { - throw new IllegalArgumentException("JVM is Android - only BeanAccess.FIELD is available"); - } - - if (this.beanAccess != beanAccess) { - this.beanAccess = beanAccess; - propertiesCache.clear(); - readableProperties.clear(); - } - } - - public void setAllowReadOnlyProperties(boolean allowReadOnlyProperties) { - if (this.allowReadOnlyProperties != allowReadOnlyProperties) { - this.allowReadOnlyProperties = allowReadOnlyProperties; - readableProperties.clear(); - } - } - - public boolean isAllowReadOnlyProperties() { - return allowReadOnlyProperties; - } - - /** - * Skip properties that are missing during deserialization of YAML to a Java object. The default - * is false. - * - * @param skipMissingProperties true if missing properties should be skipped, false otherwise. - */ - public void setSkipMissingProperties(boolean skipMissingProperties) { - if (this.skipMissingProperties != skipMissingProperties) { - this.skipMissingProperties = skipMissingProperties; - readableProperties.clear(); - } - } - - public boolean isSkipMissingProperties() { - return skipMissingProperties; - } -} diff --git a/tools/legal-review/AWS/com.fasterxml.jackson.dataformat.jackson-dataformat-cbor-2.12.6/files-ignore b/tools/legal-review/AWS/com.fasterxml.jackson.dataformat.jackson-dataformat-cbor-2.12.6/files-ignore index 5b202d223a8d..de74488dd1f7 100644 --- a/tools/legal-review/AWS/com.fasterxml.jackson.dataformat.jackson-dataformat-cbor-2.12.6/files-ignore +++ b/tools/legal-review/AWS/com.fasterxml.jackson.dataformat.jackson-dataformat-cbor-2.12.6/files-ignore @@ -1 +1 @@ -/FasterXML/jackson-dataformats-binary/blob/2.18/LICENSE +/FasterXML/jackson-dataformats-binary/blob/2.19/LICENSE diff --git a/tools/legal-review/engine/org.yaml.snakeyaml-2.2/copyright-keep b/tools/legal-review/engine/org.yaml.snakeyaml-2.3/copyright-keep similarity index 100% rename from tools/legal-review/engine/org.yaml.snakeyaml-2.2/copyright-keep rename to tools/legal-review/engine/org.yaml.snakeyaml-2.3/copyright-keep diff --git a/tools/legal-review/engine/report-state b/tools/legal-review/engine/report-state index 75d0b6949c92..55cfd453e717 100644 --- a/tools/legal-review/engine/report-state +++ b/tools/legal-review/engine/report-state @@ -1,3 +1,3 @@ -BB86D1B567C0AAA64F305458CF8B9D010E79E58F0FF2C832342D5F5CA52594E4 -EEA31A0407950FBDE014CDD81ABA2D1BDCDC0723BD210D47CC7D4DA1B73A0D20 +19F001BC871D58934CF6C85C14C7A446476DBA77F1C0D23AE14B885A65437915 +4023A94E9C4C20A053BCE1C592B04C6311759B9547E76748AD0F3DCB0A4C3ABC 0 diff --git a/tools/legal-review/launcher/org.yaml.snakeyaml-2.2/copyright-keep b/tools/legal-review/launcher/org.yaml.snakeyaml-2.3/copyright-keep similarity index 100% rename from tools/legal-review/launcher/org.yaml.snakeyaml-2.2/copyright-keep rename to tools/legal-review/launcher/org.yaml.snakeyaml-2.3/copyright-keep diff --git a/tools/legal-review/launcher/report-state b/tools/legal-review/launcher/report-state index f35a97096a72..2617247d9c3b 100644 --- a/tools/legal-review/launcher/report-state +++ b/tools/legal-review/launcher/report-state @@ -1,3 +1,3 @@ -42A92935AB5EAF576CE4EE0ACB6C887DE0F5419DD454A5EBA39423FA07DFB5A5 -CD5084004A695E9EE0C26239A10F9D3129D02AC9A85C72950A56B468F597FB36 +5BE1C47CDA76AF7E6C42089993BEA2B8DB544C1752AE5D8055BF2B4E713B20EA +E92B79099FF706DC1F50287D428322268954285BD62F19B0A70456E3356AE1D1 0 diff --git a/tools/legal-review/project-manager/org.yaml.snakeyaml-2.2/copyright-keep b/tools/legal-review/project-manager/org.yaml.snakeyaml-2.3/copyright-keep similarity index 100% rename from tools/legal-review/project-manager/org.yaml.snakeyaml-2.2/copyright-keep rename to tools/legal-review/project-manager/org.yaml.snakeyaml-2.3/copyright-keep diff --git a/tools/legal-review/project-manager/report-state b/tools/legal-review/project-manager/report-state index 955b7e0ee5cc..ef5f79c5ff39 100644 --- a/tools/legal-review/project-manager/report-state +++ b/tools/legal-review/project-manager/report-state @@ -1,3 +1,3 @@ -E8E4ADF17F1DF20C3121553870BC2C6EE3BCE9C918F1BC255296343990EEEBB8 -AA2EFB4C118AF15F07AF8CFEED3E01CF44D274CD6AE965CA667BA418D8C90A8D +17B483DD3EEF872666ABEFAFBB01049EFF1980543E14BF7E22F9AD0A4C59A954 +879435B72CB9D2FD9E96DF25D96D647DE4E618DD5EE8272A76BDADB3D66DE060 0