mill icon indicating copy to clipboard operation
mill copied to clipboard

Piggyback on ammonite's BSP implementation for build files

Open Baccata opened this issue 5 years ago • 0 comments

The BSP implementation (which allows editors to talk to mill when the user edits module files) is becoming first-class-citizen in mill, it'd be interesting to piggyback on ammonite's BSP implementation for build.sc, to get all the autocompletion/navigation features metals users would like to have when editing mill build files.

A few possibly relevant details

Mill's entrypoint that ties it to ammonite is there. This method outputs a "Evaluator", which is a construct that is aware of the build-graph and able to evaluate mill-tasks. It is is used by the BSP implementation. The evaluator potentially be accompanied by the information required by ammonite's bsp, in order to enrich mill's bsp for build-files.

One essential thing, specific to mill, that differs from ammonite is the codeWrapper, which would have to be communicated to the ammonite's bsp somehow. The classpath is also obviously different.

@alexarchambault 👋 , could I ask you for a brain-dump when you have time, on how such an integration would be possible ?

Baccata avatar Oct 05 '20 09:10 Baccata