Giter VIP home page Giter VIP logo

Comments (7)

ejona86 avatar ejona86 commented on June 2, 2024

Does it still fail if you remove the Eclipse sourceSets configuration? I'm suspicious of it. This is a very basic use-case, and it hasn't been failing elsewhere.

from protobuf-gradle-plugin.

clo-vis avatar clo-vis commented on June 2, 2024

No, it doesn't fail without the Eclipse sourceSets configuration.

from protobuf-gradle-plugin.

ejona86 avatar ejona86 commented on June 2, 2024

I figured it out. There is no eclipse configuration in that configuration. EclipseModel (the thing at project.eclipse) has no sourceSets:
https://docs.gradle.org/current/dsl/org.gradle.plugins.ide.eclipse.model.EclipseModel.html

That means the sourceSets is just being applied to project, so it is the same as:

sourceSets {
  main {
    java.srcDirs += ["build/generated/source/proto/main/java"]
  }
}

And that is clearly broken, as it adds a folder generated by the task without the task.

Modifying sourceSets shouldn't be necessary any more for Eclipse. Just applying the eclipse plugin should be enough. So I'd recommend just deleting that eclipse block.

from protobuf-gradle-plugin.

clo-vis avatar clo-vis commented on June 2, 2024

True! I just copied the first answer from StackOverflow that worked - it might be clearly broken but no error/warning is issued and it worked until ... it stopped working 🤷‍♂️

Just applying the eclipse plugin should be enough.

Perhaps it should. But it's not. I'm using noweclipse.classpath.file.whenMerged { classpath -> ... }and hoping it will work longer than the last answer I copied from StackOverflow.

from protobuf-gradle-plugin.

ejona86 avatar ejona86 commented on June 2, 2024

Perhaps it should. But it's not.

How was it breaking?

from protobuf-gradle-plugin.

clo-vis avatar clo-vis commented on June 2, 2024

build/generated/source/proto/main/java is not added as source folder to .classpath, that is,
<classpathentry kind="src" path="build/generated/source/proto/main/java">
is missing in the file.
If added manually, it is removed whenever the project is refreshed (with "Refresh Gradle project")

But this behavior, right or wrong, has nothing to do with this issue, which can be closed.

from protobuf-gradle-plugin.

ejona86 avatar ejona86 commented on June 2, 2024

Hmm... That should have been improved by #601 (add directories to sourceSet), and then fully fixed with #590 (eagerly make the output directories) . I wonder if they had a recent behavior change. We do have a test that is passing, so we may need to try different versions.

Feel free to open another issue for that eclipse issue.

from protobuf-gradle-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.