You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+39-22Lines changed: 39 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,29 +1,44 @@
1
1
# Contributing
2
2
3
-
Before contributing to this repository, please try to include the reachability metadata directly into the library. If that does not work, open a ticket on the target library issue tracker so the community can upvote and discuss metadata addition. Only after these steps, follow the checklist for adding the metadata to this repository.
3
+
Before contributing to this repository, please consider including reachability metadata
4
+
directly in the library or the framework (see an [example](https://github.com/netty/netty/pull/12738/files)).
5
+
This is the best way to provide support for GraalVM Native Image as it makes an out-of-the-box experience for users (no additional work required) and allows you to continuously test and maintain the metadata as part of your project.
6
+
If that is not an option (for example, you are not a maintainer), we encourage you to open a ticket on the issue tracker
7
+
of the corresponding library or framework, so that the community can up-vote and discuss the inclusion of reachability metadata
8
+
(see an [example](https://github.com/h2database/h2database/issues/3606))
4
9
5
-
## Checklist
10
+
## How to Test or Use This Repository Locally
11
+
12
+
You can test the reachability metadata from this repository locally against your project or with additional changes.
In order to ensure that all contributions follow the same standards of quality we have devised a following list of requirements for each new added library.
7
26
`org.example:library` project is also included as a template for new libraries.
8
27
9
-
> ℹ️ **Note** :
10
-
>
11
-
> GraalVM Reachability Metadata in this repo only contains JSON files as described
12
-
> in [Manual Configuration](https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Reflection/#manual-configuration)
13
-
> section of the Native Image documentation.
14
-
>
15
-
> All other library tweaks (such as build time initialization through `native-image.properties`) must not be included
16
-
> here. By default, it should be assumed that all user libraries are runtime initialized. Build-time initialization can
17
-
> not be included as it does not compose and can break code in unpredictable ways.
18
-
>
19
-
> Make sure that you are
20
-
> using [Conditional Configuration](https://www.graalvm.org/latest/reference-manual/native-image/metadata/#specifying-reflection-metadata-in-json)
21
-
> in order to precisely define the metadata scope. This is a hard requirement as it prevents unnecessary bloating of
22
-
> images.
23
-
>
24
-
> To learn more about collecting metadata, see [How To Collect Metadata](docs/CollectingMetadata.md).
25
-
26
-
### Contribute Metadata
28
+
* GraalVM Reachability Metadata in this repo only contains JSON files as described
29
+
in [Manual Configuration](https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Reflection/#manual-configuration)
30
+
section of the Native Image documentation.
31
+
* All other library tweaks (such as build time initialization through `native-image.properties`) must not be included
32
+
here. By default, it should be assumed that all user libraries are runtime initialized. Build-time initialization can
33
+
not be included as it does not compose and can break code in unpredictable ways.
34
+
* Make sure that you are using [Conditional Configuration](https://www.graalvm.org/latest/reference-manual/native-image/metadata/#specifying-reflection-metadata-in-json)
35
+
in order to precisely define the metadata scope. This is a hard requirement as it prevents unnecessary bloating of
36
+
images.
37
+
* Once you want to create a pull request, you will be asked to fill out the [following list](./pull_request_template.md).
38
+
39
+
ℹ️ To learn more about collecting metadata, see [How To Collect Metadata](docs/CollectingMetadata.md).
40
+
41
+
### Generate Metadata and Test
27
42
28
43
Use the `scaffold` task to generate metadata and test stubs:
29
44
@@ -41,7 +56,7 @@ to execute the tests.
41
56
42
57
It's expected that they fail, because the scaffold task only generated a stub which you need to implement.
43
58
44
-
####Metadata structure
59
+
### Metadata structure
45
60
46
61
Metadata lives in a folder structure in the `metadata` directory in root of this repository.
47
62
Per convention, it should be like this: `org.example:library` metadata should be located
@@ -134,6 +149,8 @@ example `metadata/org.example/library/0.0.1/index.json` would contain:
134
149
]
135
150
```
136
151
152
+
### Format Metadata Files
153
+
137
154
Metadata must be correctly formatted.
138
155
This can be done by running following command from root of the repository, and then following instructions from command
139
156
output if necessary:
@@ -142,7 +159,7 @@ output if necessary:
142
159
./gradlew check
143
160
```
144
161
145
-
###Tests
162
+
## Tests
146
163
147
164
Every submitted library must feature tests that serve as a safeguard against regressions.
148
165
For easier test development we've provided a TCK plugin that automatically configures
Copy file name to clipboardExpand all lines: pull_request_template.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,5 +2,6 @@
2
2
3
3
4
4
## Checklist before merging
5
-
-[ ] I have properly formatted metadata files (see [CONTRIBUTING](/oracle/graalvm-reachability-metadata/blob/master/CONTRIBUTING.md) document)
6
-
-[ ] I have added thorough tests. (see [this](/oracle/graalvm-reachability-metadata/blob/master/CONTRIBUTING.md#Tests))
5
+
-[ ] I have considered including reachability metadata directly in the library or the framework (see [this](./CONTRIBUTING.md))
6
+
-[ ] I have properly formatted metadata files (see [this](https://github.com/oracle/graalvm-reachability-metadata/blob/master/CONTRIBUTING.md#format-metadata-files))
7
+
-[ ] I have added thorough tests (see [this](https://github.com/oracle/graalvm-reachability-metadata/blob/master/CONTRIBUTING.md#Tests))
0 commit comments