Skip to content
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

8343196: Add build property to identify experimental builds of JavaFX #1637

Closed
wants to merge 6 commits into from

Conversation

arapte
Copy link
Member

@arapte arapte commented Nov 14, 2024

Introduce a new build property jfx.experimental.release.suffix to be used for the early access builds of an under development feature in JavaFX.
This property would be set to a value ONLY in a branch specific to an experiment in jfx-sandbox repo.
For example:
For the metal branch in jfx-sandbox repo, it would be set to -metal. The javafx.version for the early access build generated from that branch would be 24-metal.

And it would always be empty for master branch in both main jfx repo and in jfx-sandbox repo.
This change has no effect on a regular developer build from master branch.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8343196: Add build property to identify experimental builds of JavaFX (Enhancement - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1637/head:pull/1637
$ git checkout pull/1637

Update a local copy of the PR:
$ git checkout pull/1637
$ git pull https://git.openjdk.org/jfx.git pull/1637/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1637

View PR using the GUI difftool:
$ git pr show -t 1637

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1637.diff

Using Webrev

Link to Webrev Comment

@arapte
Copy link
Member Author

arapte commented Nov 14, 2024

@kevinrushforth Please take a look.

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 14, 2024

👋 Welcome back arapte! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 14, 2024

@arapte This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8343196: Add build property to identify experimental builds of JavaFX

Reviewed-by: kcr, jvos

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 1 new commit pushed to the master branch:

  • 7d1b2c3: 8342993: Remove uses of AccessController and AccessControlContext from JavaFX

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Ready for review label Nov 14, 2024
@mlbridge
Copy link

mlbridge bot commented Nov 14, 2024

Webrevs

@kevinrushforth
Copy link
Member

Reviewers: @kevinrushforth @johanvos

/reviewers 2

@openjdk
Copy link

openjdk bot commented Nov 14, 2024

@kevinrushforth
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

@kevinrushforth
Copy link
Member

@arapte Can you merge in the latest master? The macOS GHA failure is due to your being out of date.

The fix looks good to me. I'll do some testing before approving.

@arapte
Copy link
Member Author

arapte commented Nov 15, 2024

@arapte Can you merge in the latest master?

Thanks @kevinrushforth , The checks pass after merging in the latest master.

Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I left a couple comments and will reapprove if you decide to make the changes.

build.gradle Outdated
Comment on lines 704 to 705
relSuffix = jfxExperimentalReleaseSuffix != "" ?
jfxExperimentalReleaseSuffix : jfxReleaseSuffix;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thought I had: we might also want to set relOpt = "-${buildTimestamp}" here like we do for internal builds so we always see a time stamp for experimental builds. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with that. It is often useful to have timestamp info in the builds during development.
I know I'm a broken record on this topic, but if possible, it would be great if (parts of) this logic can be moved into a separate file in order to make the build.gradle smaller and more readable. I'm not insisting on this for this PR, but I think it is worth thinking about this whenever changes to build.gradle are made.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know I'm a broken record on this topic, but if possible, it would be great if (parts of) this logic can be moved into a separate file in order to make the build.gradle smaller and more readable.

Also at the risk of sounding like a broken record, #1232 has been waiting to start this process for a while now and it's stuck waiting for explanations on how publishing works, something only Oracle and Gluon do. If someone can help Jendrik Johannes there then the ball will get rolling. I tried to split the big build file into separate files for each module, but it's entangled with the code in that PR. Completing that PR might also remove the need for the JavaFX plugin.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know I'm a broken record on this topic, but if possible, it would be great if (parts of) this logic can be moved into a separate file in order to make the build.gradle smaller and more readable.

Also at the risk of sounding like a broken record, #1232 has been waiting to start this process for a while now and it's stuck waiting for explanations on how publishing works, something only Oracle and Gluon do. If someone can help Jendrik Johannes there then the ball will get rolling. I tried to split the big build file into separate files for each module, but it's entangled with the code in that PR. Completing that PR might also remove the need for the JavaFX plugin.

Fair remark. I just commented on the PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added relOpt = "-${buildTimestamp}"

build.properties Outdated
Comment on lines 41 to 42
# The experimental release suffix is set only in jfx-sandbox repository
# for a speficic branch. When this property is set it overrides
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to say something about it needing to start with a -? Or do you think the example of -ea above will be clear enough?

Copy link
Member Author

@arapte arapte Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment to describe the use of -, with example of -metal and -d3d12.

@johanvos
Copy link
Collaborator

I might be confused, but wasn't the idea to use a new property (e.g. jfx.feature.variant) instead of overloading the existing jfx.release.suffix?

@kevinrushforth
Copy link
Member

kevinrushforth commented Nov 16, 2024

I might be confused, but wasn't the idea to use a new property (e.g. jfx.feature.variant) instead of overloading the existing jfx.release.suffix?

This PR does add a new property in build.properties,jfx.experimental.release.suffix, and does not require modifying jfx.release.suffix. For example, in the "metal" branch of the jfx-sandbox, we would define this as:

jfx.experimental.release.suffix=-metal

@johanvos
Copy link
Collaborator

I might be confused, but wasn't the idea to use a new property (e.g. jfx.feature.variant) instead of overloading the existing jfx.release.suffix?

This PR does add a new property in build.properties,jfx.experimental.release.suffix, and does not require modifying jfx.release.suffix. For example, in the "metal" branch of the jfx-sandbox, we would define this as:

jfx.experimental.release.suffix=-metal

My apologies, I misread the proposed code.
It is a bit confusing to have "jfx.release.suffix" and "jfx.experimental.release.suffix" where the former refers to an artifact property and the latter refers to a major feature/variant/... like metal. But then, consistent naming is always difficult so I'm ok with the proposed suggestion.

@kevinrushforth
Copy link
Member

It is a bit confusing to have "jfx.release.suffix" and "jfx.experimental.release.suffix" where the former refers to an artifact property and the latter refers to a major feature/variant/... like metal.

I think you have a good point. Maybe we should drop the '.suffix' in the name of this property (in which case, it wouldn't have a - so the logic in build.gradle would add the - when needed). It would probably be easier to document it as well.

What do you think?

@kevinrushforth
Copy link
Member

If we do this, then here are some possible names:

  • jfx.experimental.release
  • jfx.experimental.release.name
  • jfx.variant.release
  • jfx.variant.release.name
  • jfx.variant
  • jfx.feature.variant

Thoughts?

@johanvos
Copy link
Collaborator

It is a bit confusing to have "jfx.release.suffix" and "jfx.experimental.release.suffix" where the former refers to an artifact property and the latter refers to a major feature/variant/... like metal.

I think you have a good point. Maybe we should drop the '.suffix' in the name of this property (in which case, it wouldn't have a - so the logic in build.gradle would add the - when needed). It would probably be easier to document it as well.

What do you think?

That makes sense (removing the word ".suffix")

@johanvos
Copy link
Collaborator

If we do this, then here are some possible names:

  • jfx.experimental.release
  • jfx.experimental.release.name
  • jfx.variant.release
  • jfx.variant.release.name
  • jfx.variant
  • jfx.feature.variant

Thoughts?

I don't have objections against any of those.
If I have to vote, my vote would go to "jfx.feature.name" (which is not in the list ;) ) because I associate variant rather with a single option from a wider set (e.g. prism variants are sw, es2,,...)
But I am more than happy with any name on this list.

@nlisker
Copy link
Collaborator

nlisker commented Nov 17, 2024

Variants are also something Gradle uses to select one of several components, so I suggest to avoid this overload. JavaFX should use Gradle variants for selection of operating systems.

I would have went with jfx.experimental.name :) because the sandbox has experimental features, as opposed to other features that are directly integrated into the main stream.

@arapte
Copy link
Member Author

arapte commented Nov 18, 2024

Why we chose the name jfx.experimental.release.suffix.
The JavaFX version string contains the value of jfx.release.suffix i.e -ea as a suffix. The new variable would be doing same, so it is also a suffix.
24-ea would be now 24-metal

and use of experimental is justified by @nlisker as:

I would have went with jfx.experimental.name :) because the sandbox has experimental features, as opposed to other features that are directly integrated into the main stream.

jfx.release.suffix : JavaFX relase version suffix for early access releases i.e -ea
jfx.experimental.release.suffix : JavaFX relase version suffix for experimental releases.

With this understanding, I am happy with the current name :) but shall update the PR we finalize any other name.

@kevinrushforth
Copy link
Member

I'd rather have the property be something without suffix for the reasons Johan and I mentioned.

Even though it's a little longer, I like a combination of what Johan and Nir suggested:

jfx.experimental.feature.name -- The name of the experimental feature

No one will ever specify this on the command line or have to type it, so having it be more explicit is good, even though the name is a little long.

You can say something like:

Set this property to the name of the experimental feature for your branch. Do not include a dash in the name. For example, if you have a sandbox branch named myfeature you might set jfx.experimental.feature.name=myfeature.

@arapte
Copy link
Member Author

arapte commented Nov 18, 2024

jfx.experimental.feature.name -- The name of the experimental feature

Thanks @kevinrushforth , Updated the property name as suggested.

Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with one suggested change.

build.gradle Outdated
Comment on lines 704 to 706
relSuffix = jfxExperimentalFeatureName != "" ?
"-${jfxExperimentalFeatureName}" : jfxReleaseSuffix;
relOpt = "-${buildTimestamp}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will unconditionally add a timestamp to all EA builds of JavaFX, not just experimental builds. Changing the version string for EA builds seems out of scope for this PR.

Suggested change
relSuffix = jfxExperimentalFeatureName != "" ?
"-${jfxExperimentalFeatureName}" : jfxReleaseSuffix;
relOpt = "-${buildTimestamp}"
if (jfxExperimentalFeatureName != "") {
relSuffix = "-${jfxExperimentalFeatureName}"
relOpt = "-${buildTimestamp}"
} else {
relSuffix = jfxReleaseSuffix
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kevinrushforth , Included the change.

Review correction

Co-authored-by: Kevin Rushforth <[email protected]>
@kevinrushforth
Copy link
Member

Looks good now. @johanvos this should be ready for your review.

@openjdk openjdk bot added the ready Ready to be integrated label Nov 19, 2024
@arapte
Copy link
Member Author

arapte commented Nov 20, 2024

/integrate

@openjdk
Copy link

openjdk bot commented Nov 20, 2024

Going to push as commit 35ff442.
Since your change was applied there has been 1 commit pushed to the master branch:

  • 7d1b2c3: 8342993: Remove uses of AccessController and AccessControlContext from JavaFX

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 20, 2024
@openjdk openjdk bot closed this Nov 20, 2024
@openjdk openjdk bot removed ready Ready to be integrated rfr Ready for review labels Nov 20, 2024
@openjdk
Copy link

openjdk bot commented Nov 20, 2024

@arapte Pushed as commit 35ff442.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants