Skip to content

Commit

Permalink
Automatic merge of master into galahad
Browse files Browse the repository at this point in the history
  • Loading branch information
dougxc committed Jun 4, 2024
2 parents 78ec64e + 3bdd577 commit 768bab8
Show file tree
Hide file tree
Showing 20 changed files with 1,454 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@
"type": "object",
"title": "JSON schema for the resource-config that GraalVM Native Image uses",
"description": "Native Image will iterate over all resources and match their relative paths against the Java Regex specified in <includes>. If the path matches the Regex, the resource is included. The <excludes> statement instructs Native Image to omit certain included resources that match the given <pattern>"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/resource-config-schema-v1.1.0.json",
"default": {
"globs": [],
"resources": {},
"bundles": []
},
"properties": {
"globs": {
"default": [],
"items": {
"properties": {
"condition": {
"properties": {
"typeReachable": {
"type": "string",
"title": "Fully qualified class name of the class that must be reachable in order to register glob pattern"
}
},
"required": [
"typeReachable"
],
"additionalProperties": false,
"type": "object"
},
"glob": {
"type": "string",
"title": "Resource matching glob"
},
"module": {
"type": "string",
"title": "Module of resource described with glob"
}
},
"required": ["glob"],
"additionalProperties": false,
"type": "object"
},
"type": "array",
"title": "List of glob patterns that are used to match resources for registration"
},
"resources": {
"properties": {
"includes": {
"default": [],
"items": {
"properties": {
"condition": {
"properties": {
"typeReachable": {
"type": "string",
"title": "Fully qualified class name of the class that must be reachable in order to register resource pattern"
}
},
"required": [
"typeReachable"
],
"additionalProperties": false,
"type": "object"
},
"pattern": {
"type": "string",
"title": "Resource matching pattern"
}
},
"additionalProperties": false,
"type": "object"
},
"type": "array",
"title": "List of included resource patterns"
},
"excludes": {
"default": [],
"items": {
"properties": {
"condition": {
"properties": {
"typeReachable": {
"type": "string",
"title": "Fully qualified class name of the class that must be reachable in order to exclude resource pattern"
}
},
"required": [
"typeReachable"
],
"additionalProperties": false,
"type": "object"
},
"pattern": {
"type": "string",
"title": "Resource matching pattern"
}
},
"additionalProperties": false,
"type": "object"
},
"type": "array",
"title": "List of excluded resource patterns"
}
},
"additionalProperties": false,
"type": "object",
"title": "Set of included and excluded lists of patterns"
},
"bundles": {
"default": [],
"items": {
"properties": {
"condition": {
"properties": {
"typeReachable": {
"type": "string",
"title": "Fully qualified class name of the class that must be reachable in order to register resource bundle"
}
},
"required": [
"typeReachable"
],
"additionalProperties": false,
"type": "object"
},
"name": {
"type": "string",
"title": "Fully qualified name of the resource bundle"
},
"locales": {
"default": [],
"items": {
"type": "string"
},
"type": "array",
"title": "List of locales that should be registered for this resource bundle"
},
"classNames": {
"default": [],
"items": {
"type": "string"
},
"type": "array",
"title": "List of fully qualified classnames of resource bundles that are directly included without performing the lookup by basename and locale."
}
},
"additionalProperties": false,
"type": "object"
},
"type": "array",
"title": "List of resource bundles that should be registered"
}
},
"additionalProperties": false,
"type": "object",
"title": "JSON schema for the resource-config that GraalVM Native Image uses",
"description": "Native Image will iterate over all resources and match their relative paths against the Java Regex specified in <includes>. If the path matches the Regex, the resource is included. The <excludes> statement instructs Native Image to omit certain included resources that match the given <pattern>"
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ static RuntimeResourceSupport<ConfigurationCondition> singleton() {

void addResource(Module module, String resourcePath);

void addGlob(C condition, String module, String glob);

void injectResource(Module module, String resourcePath, byte[] resourceContent);

void ignoreResources(C condition, String pattern);
Expand Down
1 change: 1 addition & 0 deletions substratevm/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This changelog summarizes major changes to GraalVM Native Image.
* (GR-47365) Include dynamic proxy metadata in the reflection metadata with the syntax `"type": { "proxy": [<interface list>] }`. This allows members of proxy classes to be accessed reflectively. `proxy-config.json` is now deprecated but will still be honored.
* (GR-18214) In-place compacting garbage collection for the Serial GC old generation with `-H:+CompactingOldGen`.
* (GR-52844) Add `Os` a new optimization mode to configure the optimizer in a way to get the smallest code size.
* (GR-49770) Add support for glob patterns in resource-config files in addition to regexp. The Tracing agent now prints entries in the glob format.

## GraalVM for JDK 22 (Internal Version 24.0.0)
* (GR-48304) Red Hat added support for the JFR event ThreadAllocationStatistics.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -96,6 +96,11 @@ public void addResources(UnresolvedConfigurationCondition condition, String patt
addedResources.add(pattern);
}

@Override
public void addGlob(UnresolvedConfigurationCondition condition, String module, String glob) {
throw VMError.shouldNotReachHere("Unused function.");
}

@Override
public void addResource(Module module, String resourcePath) {
throw VMError.shouldNotReachHere("Unused function.");
Expand Down
Loading

0 comments on commit 768bab8

Please sign in to comment.