vscode-ocaml-platform icon indicating copy to clipboard operation
vscode-ocaml-platform copied to clipboard

include default build target in "detected build targets" with dune

Open avsm opened this issue 2 years ago • 3 comments

If i press ctrl-shift-b to do a build in an OCaml project, the detected build tasks are quite verbose, but do not seem to include the default build target.

E.g. for realworldocaml/book we have thousands of targets:

image

...but I just want to build @site or just the default. Would the aliases be possible to put first on that list?

avsm avatar Apr 18 '22 15:04 avsm

I just wanted to bump this, as I don't think it got noticed @rgrinberg. This is actually a big problem with RWO, since we have 1000s of targets in the book monorepo, but I really just want the build @site @runtest aliases exposed as build tasks and not all the other ones. Is it possible to just get aliases for the build tasks exposed from the plugin?

avsm avatar Sep 20 '22 17:09 avsm

cc @Khady. Why do the build tasks include targets like dune, dune-project, or dune-workspace?

Seems like we should really only need @all, @runtest, @install or @default per directory.

rgrinberg avatar Sep 20 '22 17:09 rgrinberg

Seems like we should really only need @all, @runtest, @install or @default per directory

Agreed, and one for just the default (is that @install?). I'd skip the default per directory as there may be many directories and it's really slow to render them all -- a custom build task can be used for that for advanced users. It would be nice if custom aliases showed up in the list, but @all and @runtest and @install are the really important ones to have at the top.

Bonus points if adding watch mode is available from the default set :-)

avsm avatar Sep 20 '22 19:09 avsm