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

Fatal recursive dependency #1049

Closed
tampler opened this issue Nov 7, 2019 · 5 comments
Closed

Fatal recursive dependency #1049

tampler opened this issue Nov 7, 2019 · 5 comments

Comments

@tampler
Copy link

tampler commented Nov 7, 2019

Hello using VSCode 1.39.2 with Metals 1.6.2

I've set up a project with a ProjectRef dependency on another github. I first did sbt +update to resolve the reference project and than built the main project in sbt as usual.

sbt stuff works, but VSCode with Metals fail with the message: Fatal recursive dependency detected in 'docs': List(docs, root, root)

Here's my pet project

Thanks for a great plugin
Boris

@gabro
Copy link
Member

gabro commented Nov 7, 2019

Hi @tampler, thanks for reporting.

The error you're seeing is generated by Bloop when importing your build, so there's not much we can do on the Metals side I'm afraid.

For reference, this is essentially the same as #768, so it seems an issue with http dependencies. Paging @jvican on this to confirm it's the same issue.

@gabro gabro closed this as completed Nov 7, 2019
@gabro
Copy link
Member

gabro commented Nov 7, 2019

@tampler in the meantime, you can try using git instead of https

uri("git://github.com/zio/zio-actors.git")

I'm not sure that fixes the issue, but it's worth trying

@tampler
Copy link
Author

tampler commented Nov 7, 2019

@gabro Thanks for your hint. Moving to git won't help either. I'll rearrange my project to use submodules instead

@jvican
Copy link
Contributor

jvican commented Nov 7, 2019

In general that pattern isn't very well supported in sbt and it can cause lots of trouble. You might want to change it. I believe that changing the root name in your referred project to something else should remove the circular dependency. The main issue seems to be you have two root projects and Bloop is not capable of seeing they come from different builds.

@olafurpg
Copy link
Member

olafurpg commented Nov 7, 2019

Thank you for reporting! I believe it would be best to avoid the ProjectRef in general, even if you fix the cyclic issue then you will quickly hit on
scalameta/metals-feature-requests#14 because metals doesn't work well with multiple workspace root directories.

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

5 participants