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

Builds fail if root project is in root of mount point, with further implications #15655

Closed
davidburstromspotify opened this issue Dec 25, 2020 · 2 comments · Fixed by #23624
Closed
Assignees
Labels
a:bug good first issue Good for newcomers in:invoking-gradle Running Executing
Milestone

Comments

@davidburstromspotify
Copy link

Building any project in a root mount point (e.g. C:/ for Windows or / for *nix) fails unless settings.gradle has a rootProject.name= value specified.

Expected Behavior

Gradle should not be smart about the project name, by deducing it from the directory name, but it should be specified explicitly. Especially, this is problematic in a multi-developer environment where the project name can vary greatly depending on what developers are naming their clone directories, and it will affect what's getting reported to Gradle Enterprise, thereby polluting data.

I suppose it could be discouraged as a deprecation, then to be disallowed in a future major release.

Current Behavior

A problem occurred configuring root project ''.
> The project name must not be empty. Set the 'rootProject.name' or adjust the 'include' statement (see https://docs.gradle.org/6.7.1/dsl/org.gradle.api.initialization.Settings.html#org.gradle.api.initialization.Settings:include(java.lang.String[]) for more details).

Context

This was causing issues when I mounted a shared folder in a Windows VirtualBox environment.

Steps to Reproduce

$ gradle -p / --project-cache-dir=$HOME

Your Environment

OS: Windows/macOS
Gradle: 6.8-rc-4

@tresat
Copy link
Member

tresat commented Aug 10, 2021

Verified this happens as described.

@donat donat added in:invoking-gradle Running Executing and removed in:invoking-gradle Running Executing labels Aug 10, 2021
@donat
Copy link
Member

donat commented Aug 10, 2021

We do recommend Gradle users to specify the root project name in the settings script, so it might make sense to make it required. At the same time, I think there would be a lot of users who would come to this issue and argue that they actually prefer simplicity.

We could also tackle this issue by setting a conventional name (root maybe?) for the root project when the calculated value is an empty string.

@donat donat added the 🌱 internal-onboarding Good issues to onboard new Gradle team members label Aug 10, 2021
octylFractal added a commit that referenced this issue Oct 19, 2021
Also assigns 'root' if the name is empty.

Fixes #15655
@octylFractal octylFractal self-assigned this Oct 19, 2021
reinsch82 added a commit that referenced this issue Jan 23, 2023
- fixes #15655

Signed-off-by: Reinhold Degenfellner <rdegenfellner@gradle.com>
reinsch82 added a commit that referenced this issue Jan 24, 2023
- generate random part

- fixes #15655

Signed-off-by: Reinhold Degenfellner <rdegenfellner@gradle.com>
reinsch82 added a commit that referenced this issue Jan 24, 2023
- part of #15655

Signed-off-by: Reinhold Degenfellner <rdegenfellner@gradle.com>
reinsch82 added a commit that referenced this issue Jan 25, 2023
- part of #15655

Signed-off-by: Reinhold Degenfellner <rdegenfellner@gradle.com>
reinsch82 added a commit that referenced this issue Jan 25, 2023
reinsch82 added a commit that referenced this issue Feb 1, 2023
- generate random part

- fixes #15655

Signed-off-by: Reinhold Degenfellner <rdegenfellner@gradle.com>
reinsch82 added a commit that referenced this issue Feb 1, 2023
- part of #15655

Signed-off-by: Reinhold Degenfellner <rdegenfellner@gradle.com>
reinsch82 added a commit that referenced this issue Feb 1, 2023
- part of #15655

Signed-off-by: Reinhold Degenfellner <rdegenfellner@gradle.com>
reinsch82 added a commit that referenced this issue Feb 1, 2023
reinsch82 added a commit that referenced this issue Feb 1, 2023
bot-gradle added a commit that referenced this issue Feb 1, 2023
- fixes #15655

Co-authored-by: Reinhold Degenfellner <rdegenfellner@gradle.com>
@ljacomet ljacomet added this to the 8.1 RC1 milestone Mar 1, 2023
@lptr lptr added good first issue Good for newcomers and removed 🌱 internal-onboarding Good issues to onboard new Gradle team members labels Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug good first issue Good for newcomers in:invoking-gradle Running Executing
Projects
None yet
9 participants