Skip to content

Tooling API can't be used with a relative project directory in 9.5.0 #37797

@eskatos

Description

@eskatos

Current Behavior

PR #32894 introduced a regression where DaemonClientToolchainServices passes getRootDirectory() directly to BaseDirFileResolver, which requires an absolute path. When the Tooling API is invoked with a relative project directory (e.g. File(".")), this throws:

IllegalArgumentException: base dir '.' is not an absolute file.

Expected Behavior

It should just work with a relative project directory, as before 9.5.0.

Context (optional)

This affects any Tooling API consumer that connects with a relative or default project directory.

Self-contained Reproducer Project

See the test in this PR

Gradle version

9.5.0

Gradle version that used to work

9.4.x

Build scan URL (optional)

No response

Your Environment (optional)

No response

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions