Skip to content

Any config to disable Circular Dependencies warning/error? #718

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
hcapp01 opened this issue Nov 16, 2018 · 14 comments
Closed

Any config to disable Circular Dependencies warning/error? #718

hcapp01 opened this issue Nov 16, 2018 · 14 comments

Comments

@hcapp01
Copy link

hcapp01 commented Nov 16, 2018

Any config to disable this warning/error? The same project can be loaded in intellij fine without any warning/error.

"A cycle was detected in the build path of project xxx - Build Path Problem"

Environment
  • Operating System:windows 10
  • JDK version:1.8
  • Java extension version: 0.33

image

@fbricon
Copy link
Collaborator

fbricon commented Nov 29, 2018

No it's not possible to disable it. You need to break the cycle.
What kind of project allows such cyclic dependencies? gradle?

@hcapp01
Copy link
Author

hcapp01 commented Dec 3, 2018

Yes, gradle.

@hcapp01 hcapp01 closed this as completed Dec 3, 2018
@coopstah13
Copy link

Can we reopen this? This is a feature of eclipse, so I'm presuming this can be done. Gradle does not allow for cyclic dependencies within configurations. As I understand it, the problem is that you need to be able to support multiple classpaths, one per gradle configuration basically. I know that eclipse cannot support this capability (IntelliJ does), I'm wondering if this extension could.

This is the related issue in buildship:
eclipse-buildship/buildship#460

@ragurney
Copy link

I'm also experiencing this issue. Might make me switch over to IntelliJ after all :/

@ganezdragon
Copy link

Why is this closed? Still not able run gradle projects with circular dependencies.

@fbricon
Copy link
Collaborator

fbricon commented Sep 11, 2020

We merely take upstream Eclipse projects and integrate them together so they can work in a headless scenario. We definitely rely on other people's work for Core functionalities.
It might be possible in the future for Eclipse Buildship to support some sort of circular project dependencies, when referencing test folders from one project to another, but we can't do anything here in vscode-java until that upstream issue is fixed.

@coopstah13
Copy link

what we're asking for here, is for you to support the option as outlined here: eclipse-buildship/buildship#460 (comment)

@snjeza
Copy link
Contributor

snjeza commented Sep 11, 2020

@coopstah13 you can try to add

org.eclipse.jdt.core.circularClasspath=warning

to <your_project>/.settings/org.eclipse.jdt.core.prefs

@ganezdragon
Copy link

@snjeza nope didn't work for me!

@snjeza
Copy link
Contributor

snjeza commented Sep 13, 2020

@ganezdragon Could you provide a project example?

@shua
Copy link

shua commented Sep 18, 2020

following @snjeza's suggestion, but since I have a multi-project set up with many subdirectories that vscode decided should all get their own .settings folder, I had to update it for every .settings folder in the repo before vscode allowed builds to pass.

@shua
Copy link

shua commented Sep 22, 2020

Trawling through https://docs.gradle.org/current/userguide/eclipse_plugin.html , I've found the magic to automate the change above in my build.gradle:

// build.gradle
eclipse.jdt.file.withProperties { props ->
  props.setProperty "org.eclipse.jdt.core.circularClasspath", "warning"
}

may require gradle eclipseJdt to be run

expected result is the following property should be added to any **/.settings/org.eclipse.jdt.core.prefs files that buildship has created, and that should allow builds to proceed instead of erroring on the circularClasspath violations.

org.eclipse.jdt.core.circularClasspath=warning

@nyonson
Copy link

nyonson commented Dec 30, 2020

@fbricon is it possible to add this as a workspace setting? I work in multi-project gradle build with a few 100 projects, would be tough to maintain setting this per-project.

@snjeza
Copy link
Contributor

snjeza commented Dec 30, 2020

@y0ns0n We will enable it within eclipse-jdtls/eclipse.jdt.ls#1579

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

No branches or pull requests

9 participants