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

Gradle bloopInstall produces absolute paths, could they be relative? #9

Open
aishfenton opened this issue Nov 5, 2021 · 5 comments

Comments

@aishfenton
Copy link

Gradle bloopInstall produces absolute paths, could they be relative to the project root directory instead? This would unlock a few things :

  • Potentially checking the exported files into source control. So as folks switch between branches, they don't have to re-export each time
  • Supporting Gradle's remote cache functionality.

For context, why the above two items feel important for our project, is that it's pretty huge (38 sub-proejcts in one repo ... you could say, it's a mini mono repo). And currently the most painful part of our process is re-exporting to Bloop between every branch switch (which for a big project like ours, can take ~15mins 😞 )

@tgodzik
Copy link
Contributor

tgodzik commented Nov 5, 2021

Thanks for reporting! This might actually be related to the version of Zinc that is being used by Bloop.

Related issues: scalacenter/bloop#1351

I will work on migrating to newest zinc next week, which could unblock this possibly.

Anyway, this is a great suggestion and hopefully should be possible.

@aishfenton
Copy link
Author

aishfenton commented Nov 5, 2021

hmm, I guess another problem is that the Gralde cache could at different locations, on different machines. Hmm, I wonder if there's a way to work around this.

[update] Although, at least if we can make the paths relative, it's possible for us to configure Gradle to always use a consistent location for it's cache, across machines.

@Arthurm1
Copy link
Contributor

Arthurm1 commented Nov 5, 2021

I don't know why the export should take anywhere near that long. I've had to create test projects with 100s of subprojects and BloopInstall has only taken 10s to run.

Have you got source generation going on that's triggering on every export? Some task that's being triggered due to us reading the classpath? Or is this 15mins down to downloading dependencies

Adding an option to change the absolute paths in the json output to relative is fairly simple. Although I have no idea if Bloop itself can handle relative paths.

One way to cope with the various Gradle cache locations is to output the locations using the GRADLE_USER_HOME env var. Again - I don't know whether Bloop would handle env vars in paths.

@aishfenton
Copy link
Author

aishfenton commented Nov 5, 2021

Yeah, I'm not sure either why it's such a long task. No, pretty sure we're not doing anything like code gen there. My guess is our dependency graph is just extremely big (unfortunately unavoidable in our situation). The generated Json files are ~200MB so I'm thinking we really do just have a lot of dependencies.

@Arthurm1
Copy link
Contributor

Arthurm1 commented Nov 6, 2021

Any chance you could post just the dependency sections of your project build files?

@ckipp01 ckipp01 transferred this issue from scalacenter/bloop Dec 15, 2022
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

3 participants