platform/jewel/docs/pr-guide.md
First of all, read the Jewel contribution guide.
To get your pull requests merged with any further complications in the community repository, it is advised to follow these steps:
Make sure your commit message first line starts with [JEWEL-<Jewel YouTrack Id>] , and squash all the changes in a
single commit
Prefix the PR title with [JEWEL-<Jewel YouTrack Id>] , add the jewel label, assign yourself and pick at least two
reviewers from the Jewel team
Avoid creating pull requests from chains of feature branches (branching from feature branches) if at all possible, as this can create issues when cherry-picking for a release
Before pushing, run all the GitHub CI checks locally and fix any issues that are found
Ensure impacted public APIs are properly covered by KDocs and the docs are up to date
Run the ApiCheckTest to make sure the API dumps are up to date
Ensure there are no breaking changes in stable APIs (they look like removed lines in api-dump.txt files), and try
to avoid or at least minimise changes in experimental APIs too (see api-dump-experimental.txt files)
Check that there are no new issues reported by Metalava either, with scripts/metalava-signatures.main.kts validate;
if any is found, update the baseline files accordingly with the --update-baseline parameter.
If your PR has any user-visible changes, add release notes to the bottom of the PR description using this template:
## Release notes
### ⚠️ Important Changes
*
### New features
*
### Bug fixes
*
### Deprecated API
*
Remove the sections you do not need. Use the existing release notes as reference for style and tone.
If the PR introduces visual changes, always include at a minimum an "after" screenshot or video. If relevant, please add "before" ones too, and anything else that you think could be useful to evaluate the changes.
If your change includes changes to the module structure and/or to dependencies, refer to the following sections as well for more guidance.
If you follow all these instructions correctly, the merge can happen automatically in most circumstances, given the necessary approvals are in place. Try to avoid circumstances in which a manual merge is required, as that is a time-consuming bottleneck.
That said, there are circumstances in which a manual merge may still be necessary:
When a manual merge is necessary, someone from the JetBrains side of the Jewel team will take on the task. Usually, that is Jakub, but others can help if he is away or there is urgency.
There are multiple tests ensuring the quality of the Community project. Changes to the module structure may trip these tests during safe-push if not done correctly, and prevent automated merging.
These rules should be followed in addition to the rules above:
.idea/modules.xml is sorted alphabetically.iml should match the folder structure. Do not add source roots that don't exist
and vice versa<module name>.xml at the root of the resources folder for the module
iml files and revert all spurious changes that may crop upjpsModelToBazelCommunityOnly.cmd script to update the
Bazel project structure
There are multiple tests ensuring the quality of the Community project. Changes to the dependencies may trip these tests during safe-push if not done correctly, and prevent automated merging.
CommunityLibraryLicenses.kt.
additionalLibraryNames() APIadditionalLibraryNames listlibraries list as a separate module,
containing only the dependency itself
implementation())api())ApiCheckTestThis page documents the JPS scopes and how they work
They roughly map to Gradle scopes as follows:
| JPS scope | Gradle scope |
|---|---|
compile (not exported) | implementation |
compile (exported) | api |
test (not exported) | testImplementation |
test (exported) | testApi |
runtime | runtimeOnly |
provided | compileOnly |
jpsModelToBazelCommunityOnly.cmd script to update the
Bazel project structure