Skip to content

HHH-12603 - re-enabled plugin in build.gradle #2313

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

Closed
wants to merge 5 commits into from

Conversation

aepedraza
Copy link
Contributor

This is my first PR. When I first cloned the repo in my local I got the reported error message. After my changes I got the following output:

$ ./gradlew clean eclipse --refresh-dependencies

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 7m 21s
86 actionable tasks: 68 executed, 18 up-to-date

I don't know if there is any way to test this fix.

@gsmet
Copy link
Member

gsmet commented May 26, 2018

Hi @aepedraza ,

I'm wondering if this is still useful with the latest Eclipse? With the Gradle plugin, I mostly import the Gradle project into Eclipse.

And then I have to fix things that are not supported by Eclipse manually (the generated classes for the logger are not added to the build IIRC). One other limitation I have is that the jars are not linked to their sources anymore, which is a real pain.

To be honest, I'm an Eclipse user but I'm considering switching to IDEA to work on ORM...

Is this supposed to fix these issues? What does it bring to the table?

@aepedraza
Copy link
Contributor Author

Hi @gsmet, I believe it's a matter of taste. To be honest too, I never used the Gradle Eclipse plugin to run from command line, but if it's possible to enable this, it can make a better "developer experience" to someone who is used to Gradle form the command line.

And then I have to fix things that are not supported by Eclipse manually (the generated classes for the logger are not added to the build IIRC). One other limitation I have is that the jars are not linked to their sources anymore, which is a real pain.

What things and jars are you referring to? Sorry, I'm not an expert in gradle.
Another option is to simply remove the reference to the wiki in CONTRIBUTING.MD. I don't know if, as a contributor, I can edit or remove content from the wiki, if you know how to do it please let me know.

PS: @Naros what should I add and/or do with the Requires clarification label?

@Naros
Copy link
Member

Naros commented May 27, 2018

I added the label primarily for two reasons:

  1. gsmet had inquired about the what this change serves or provides
  2. To indicate that we didn't necessarily want to integrate this trivial PR just yet without more discussion.

@aepedraza Is there any particular reason why the two allprojects blocks cannot be merged together at the top rather than having two of them in the script?

I also see we have the inclusion of these 2 plugins in our 6.0 development branch but this was modified during some recent build script tidying we did. @sebersole, do you have a preference as to whether we add this back in or not?

@Naros
Copy link
Member

Naros commented May 27, 2018

Another option is to simply remove the reference to the wiki in CONTRIBUTING.MD. I don't know if, as a contributor, I can edit or remove content from the wiki, if you know how to do it please let me know.

I meant to comment on this and missed it, sorry. Lets wait to get some feedback from sebersole. It very well could just be an oversight on a recent commit or perhaps a deliberate change which as you mention implies we need to update other resources. Lets just confirm either way first.

@marschall
Copy link
Contributor

I originally opened the JIRA: the issue I'm having is that the contributing guide for Eclipse links to the wiki which says one should run:

./gradlew clean eclipse --refresh-dependencies

which doesn't work because the tasks are missing. For me any of these solutions would work:

  1. Officially not supporting Eclipse and removing all references from the documentation.
  2. Requiring and documenting the Eclipse Gradle plugin.
  3. Reenabling the eclipse tasks in Gradle.

@aepedraza
Copy link
Contributor Author

Is there any particular reason why the two allprojects blocks cannot be merged together at the top rather than having two of them in the script?

Actually there's no reason, I just didn't saw the first block in the script. I'll be fixing it right away.
While we wait some feedback from @sebersole, I'd suggest to include the uncommented lines and add the workaround in CONTRIBUTING.MD, which would be to comment the lines or run the command ./gradlew clean --refresh-dependencies (without invoking eclipse plugin).
I'll be awaiting for your comments, in the meantime I'll be adding some commits with my suggestions

@Naros
Copy link
Member

Naros commented May 30, 2018

@aepedraza Could you rework your PR and eliminate the merge commit for me? We have some tips in https://github.com/hibernate/hibernate-orm/blob/master/CONTRIBUTING.md where we discuss creating a topic/feature branch and making your changes there and submitting your PR based on that branch to us. It just keeps the history much cleaner when we do merge your work.

You may need to submit a new PR to do this and if so, that's fine.

Copy link
Member

@sebersole sebersole left a comment

Choose a reason for hiding this comment

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

-1 for me to re-enable this. Unless the Eclipse importer uses this information (from the eclipse gradle plugin's config) to adjust its import - the IntelliJ importer e.g. does this. But even then, the PR is not actually configuring anything, just enabling the plugin.

Also at the very least the CONTRIBUTING file needs no changes here. It simply points to a wik - we can simply update the wiki if needed. But even then, the wiki already mentions both of these options. Perhaps that section about using the Eclipse Gradle importer is simply out of date - but back in that time, Eclipse had very poor support for Gradle.

@sebersole
Copy link
Member

I guess it comes down to this... For IntelliJ users I'd only recommend using the importer. Is that true for Eclipse at this point as well? Is their Gradle import support good now? If so, that should be the only recommended way.

And then, does their Gradle project importer use information configured on org.gradle.plugins.ide.eclipse.model.EclipseModel to customize the import the way that IntelliJ does? If so, we could consider enabling that plugin if we actually have something to configure - but, again, atm this PR is not doing that.

@dwadler
Copy link

dwadler commented Jun 1, 2018

When I imported Hibernate using the Gradle importer, I had over 700 errors across numerous projects.

@sebersole
Copy link
Member

sebersole commented Jun 1, 2018 via email

@sebersole
Copy link
Member

sebersole commented Jun 1, 2018 via email

@dwadler
Copy link

dwadler commented Jun 1, 2018

I just did a fresh clone of hibernate-orm master, did a clean and build (twice). Then imported the Gradle project into Eclipse which resulted in 775 errors. (Gradle build was clean - this is on Windows)
image

@aepedraza
Copy link
Contributor Author

aepedraza commented Jun 2, 2018

Could you rework your PR and eliminate the merge commit for me? We have some tips in https://github.com/hibernate/hibernate-orm/blob/master/CONTRIBUTING.md where we discuss creating a topic/feature branch and making your changes there and submitting your PR based on that branch to us

@Naros, apologize about my dirty commits. I can move my clean commits to a branch for this ticket but, AFAIK, I should start a new PR as the target branch (currently aepedraza:master) will be changing, am I correct?

BTW, should this be done with cherry-pickor something else? what do you suggest? (Sorry, I'm not sooo good in git commits cleaning).

Thanks in advance for your answers

@sebersole
Copy link
Member

sebersole commented Jun 2, 2018 via email

@aepedraza
Copy link
Contributor Author

I'm closing this PR as the compare branch is wrong and dirty commits were generated. Apologize

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants