microsoft / build-server-for-gradle

An implementation of the Build Server Protocol for Gradle
MIT License
55 stars 8 forks source link

Populate buildTarget/displayName #106

Closed Arthurm1 closed 11 months ago

Arthurm1 commented 12 months ago

This PR populates display name in BuildTarget which is currently null.

Creating unique names is a bit fiddly as BSP considers each source set a separate target and unique whereas Gradle considers each project unique. I've added a test for this.

Arthurm1 commented 11 months ago

Display name in Metals is shown as a user-friendly way to navigate build targets. There is a project explorer which, after this PR, displays as... image

There is also a "Doctor" page to show what Metals thinks about the project setup... image

And finally you can get info on each build target... image

I can also see a case where someone has written a command line BSP client and a user might want to manage the build through it. In that case they could write something simple like bsp compile model model-test. Without these display names, they'd have to type the entire build target uri which is long and not user-friendly.

Arthurm1 commented 11 months ago

I've made the changes - should be good to merge now