-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaFX Incubator Modules #1375
Closed
Closed
JavaFX Incubator Modules #1375
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
d19de4d
WIP: 8309381: Create JavaFX incubator module
kevinrushforth 75e99c0
eclipse config
andy-goryachev-oracle 20098e1
Merge branch 'master'
kevinrushforth 0cb3c6b
Change module name to javafx.incubator.myfeature
kevinrushforth 0e6d56b
Rename package to javafx.incubator.scene.mypkg
kevinrushforth cd63979
Create INCUBATOR-MODULES.md doc
kevinrushforth 0966c55
Fix typos
kevinrushforth 21d7a7c
Merge remote-tracking branch 'upstream/master' into javafx.incubator
kevinrushforth 02a0b49
Change javafx.incubator to jfx.incubator
kevinrushforth ee76f09
Say that a JEP is needed to finalize or drop an incubating feature
kevinrushforth a61f395
Clarify that a feature should not incubate indefinitely
kevinrushforth acfecc2
Change module name to jfx.incubator.myfeature
kevinrushforth 136776c
Rename package to jfx.incubator.scene.mypkg
kevinrushforth 93ef93e
Bump copyright date
kevinrushforth a4bf721
Additional comments
kevinrushforth 691d52b
WIP: Utility for printing incubator warning
kevinrushforth d3bf81e
fixup comments in helper class
kevinrushforth 6b8b571
fix typo
kevinrushforth 1de2efe
add missing javadoc
kevinrushforth 97575a1
Update instructions to create a new incubator module
kevinrushforth 8e04e95
Merge remote-tracking branch 'upstream/master' into javafx.incubator.dev
kevinrushforth 75d0c07
Add missing dependency on incubator module to systemTests so
kevinrushforth ccc5c77
Merge branch 'master' into javafx.incubator.merge
kevinrushforth 1fd34b0
Minor formatting update
kevinrushforth 5626175
Cleanup prior to preparing RFE for incubator dependencies
kevinrushforth bb46c46
Add some implementation notes
kevinrushforth dd5f351
Merge branch 'master' into javafx.incubator.dev
kevinrushforth fa50d1e
Fixup javafx.* assumptions
kevinrushforth b6631ca
8337281: build.gradle assumes all modules are named "javafx.$project"
kevinrushforth 7d25dd8
Remove debug prints
kevinrushforth 32e3e75
Remove BUG comments and debug prints
kevinrushforth 50d9012
Fix bug where String was being used as if it were a Project
kevinrushforth 4bb1b59
Merge branch '8337281-module-name' into javafx.incubator.dev
kevinrushforth d8e1f09
Merge remote-tracking branch 'upstream/master' into javafx.incubator
kevinrushforth 6659c48
Comment changes
kevinrushforth f24f700
Update NOTES-INCUBATOR.md
kevinrushforth 3a7d4bf
Update INCUBATOR-MODULES.md
kevinrushforth 63f768e
Merge branch 'master' into javafx.incubator
kevinrushforth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# JavaFX Incubator Modules | ||
|
||
## Summary | ||
|
||
JavaFX incubator modules are a means of putting non-final APIs in the hands of developers, while the APIs progress towards either finalization or removal in a future release. This JEP builds on [JEP 11](https://openjdk.org/jeps/11), which defines JDK incubator modules. | ||
|
||
## Goals | ||
|
||
Extends the benefits of [JEP 11](https://openjdk.org/jeps/11) to the JavaFX API. | ||
|
||
## Motivation | ||
|
||
Some JavaFX APIs would benefit from spending a period of time in a JavaFX release prior to being deemed stable. Being in the mainline `jfx` repository, and thus in downstream binaries such as those at jdk.java.net, makes it easier for interested parties outside of the immediate OpenJDK Community to use the new feature. Experience gained and fed back through the usual channels such as blogs, mailing lists, outreach programs, and conferences can then be acted upon before finalizing, or else removing, the feature in a future release. | ||
|
||
This is especially useful for complex features with a large API surface. Such features are nearly impossible to get right the first time, even after an extensive review. Using an incubator module will allow the API to evolve in future releases without the strict compatibility constraints that core JavaFX modules have. | ||
|
||
## Description | ||
|
||
An incubating feature is an API of non-trivial size, that is under development for eventual inclusion in the core set of JavaFX APIs. The API is not yet sufficiently proven, so it is desirable to defer finalization for a small number of feature releases in order to gain additional experience and feedback. | ||
|
||
See [JEP 11](https://openjdk.org/jeps/11) for a description of incubator modules. | ||
|
||
JavaFX incubator modules have a few differences from JDK incubator modules: | ||
|
||
- A JavaFX incubator module is identified by the `jfx.incubator.` prefix in its module name. | ||
- A JavaFX incubating API is identified by the `jfx.incubator.` prefix in its exported package names. An incubating API is exported only by an incubator module. | ||
- Incubator modules must export incubating APIs only, i.e., packages in the `jfx.incubator` namespace. Consequently: | ||
- JavaFX incubator modules must not export core JavaFX APIs in the `javafx.` namespace. This distinguishes incubator modules from core modules such as `javafx.base`. | ||
- JavaFX non-incubator modules must not specify `requires transitive` dependences upon incubator modules, or otherwise expose types exported from incubator modules in their own exported APIs. In exceptional cases, it may be acceptable for non-incubator modules to specify `requires` dependences (as opposed to `requires transitive`) upon incubator modules. | ||
- JavaFX incubator modules can specify requires or requires transitive dependences upon other incubator modules. | ||
- A warning must be issued when first loading a class from a publicly exported package in a JavaFX incubator module, even if the module is not jlinked into the JDK. We will provide a utility method in `javafx.base` to facilitate this. | ||
- To either make a JavaFX incubating API final, or to remove it, a new JEP should be submitted, referencing the original incubator JEP. | ||
- By default, a JavaFX feature that is delivered in an incubator module will re-incubate in subsequent versions (the default in the JDK is to drop the feature). If any changes are needed to the API, they will be done with new JBS enhancement along with an associated CSR. However, this is not intended to suggest the possibility of a permanently incubating feature. As with incubating features in the JDK, if an incubating API is not promoted to final status after a reasonably small number of JavaFX feature releases, then it will be dropped: its packages and incubator module will be removed. As a guideline: | ||
- An incubating API that was not updated in the current shipping feature release and has not been updated in the feature release being developed, is either stable or is not being actively developed. Such an API should either be finalized or dropped. | ||
- An incubating API that spans beyond a 24-month period (4 feature releases), and is not yet ready to be finalized, will need explicit approval from a Project Lead to remain incubating for some additional period at the discretion of a Project Lead. Otherwise, a Project Lead will submit a removal JEP. | ||
- The submitter of the original JEP can propose to remove it at any time. | ||
|
||
### How to add a new incubator module | ||
|
||
Use [this patch](https://github.com/openjdk/jfx/pull/1375.diff) as a starting point for your incubator module. Then do the following: | ||
- Rename `modules/jfx.incubator.myfeature` to the desired name of your module, keeping the `jfx.incubator.` prefix. | ||
- Modify `build.gradle`, `settings.gradle`, and `modules/javafx.base/src/main/java/module-info.java` to update the name of your module. Look for comments of the form `// TODO: incubator template` for where to make the changes. | ||
- Develop your module as you would with any JavaFX module, keeping in mind the rules in this JEP about public exports and dependencies. | ||
|
||
FIXME: find a permanent home for the incubator module template patch, possibly in the jfx-sandbox repo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# NOTES: JavaFX Incubator Modules | ||
|
||
## Overview | ||
|
||
These are notes regarding the implementation of JavaFX incubator modules. | ||
|
||
## Changes / additions in the javafx.incubator branch | ||
|
||
The `javafx.incubator` branch has three main types of changes: | ||
|
||
1. The [JavaFX Incubator Modules JEP](INCUBATOR-MODULES.md) and these implementation notes. | ||
2. Changes needed to support incubator modules. These include: build scripts (`build.gradle`, `settings.gradle`), qualified exports from `javafx.base`, and a utility class to produce warnings when first using an incubator module. | ||
3. A sample incubator module, `jfx.incubator.myfeature`. | ||
|
||
Note that this branch is meant to be illustrative in nature. It will _never_ be integrated, so the PR based on this branch will remain in Draft state as long as the PR is open (it will _never_ become `rfr`). | ||
|
||
## RFE: Support incubator modules | ||
|
||
The changes reflected in item 2 in the previous section need to be integrated into mainline ahead of the first incubator module, so a separate PR will be made from a branch that has just those changes. In support of this, the needed changes have been highlighted using comments of the following pattern: | ||
|
||
``` | ||
// RFE: incubator dependency | ||
``` | ||
|
||
These identify the blocks that are needed as part of the RFE to add the needed dependencies. The PR that includes them will remove the `RFE: incubator dependency` line, since that is only there to differentiate those changes needed to support incubator modules in general from those changes that add the specific sample incubator module (`jfx.incubator.myfeature`). The sample incubator module changes must be reverted in the branch that will be used to add the dependencies. | ||
|
||
Some of the incubator dependency changes include comments about where to add build logic when creating an incubator module. Those comment will be part of the incubator dependency PR. For example: | ||
|
||
``` | ||
// RFE: incubator dependency | ||
// Add an entry for each incubator module here, leaving the incubator | ||
// placeholder lines as an example. | ||
// BEGIN: incubator placeholder | ||
//'incubator.mymod', | ||
// END: incubator placeholder | ||
``` | ||
|
||
When proposing the incubator dependency PR, the `// RFE: incubator dependency` line will be removed (since it only exists to help identify the needed dependency), but the rest of the comment block (e.g., starting with `Add an entry for each incubator ...`) will be part of the PR. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change fixed the jenkins build of the rich text area incubator, thank you!