Skip to content

makes bap-extra packages optional to facilitate local development#1617

Merged
ivg merged 2 commits intomasterfrom
makes-extra-packages-optional
Mar 5, 2025
Merged

makes bap-extra packages optional to facilitate local development#1617
ivg merged 2 commits intomasterfrom
makes-extra-packages-optional

Conversation

@ivg
Copy link
Member

@ivg ivg commented Mar 4, 2025

Eases local dune-base development, so that you can easily start local development without too much external dependencies hassle. Allows you to disable bap-extra packages and just do dune build and everything should work.

For the context, Dune doesn't provide nice options for multi-project monorepos. The dune files represent the static information about the project and it is presumed that there is an external tool that generates them. Cf., tezos manifest that generates dune files from the OCaml EDSL or whatever they use in Janestreet (jenga?). Originally, the plan was to implement the same mechanism, e.g., generate the dune-project file during the configuration phase. But right now I don't have enough time for that, so I am pushing a simple workaround. All packages in bap-extra are now marked as allow_empty, indicating that they can produce now artifacts. Their corresponding libraries are now optional (if a dependency is not met, then the library is silently not built). The only special case is ghidra that doesn't have dependencies trackable by Dune (i.e., OCaml libraries, besides base and bap), so to prevent it from building I added a small check that ghidra library is installed.

ivg added 2 commits March 4, 2025 21:07
Eases local dune-base developement, so that you can easily start local
development without too much external dependencies hassle. Allows you
to disable bap-extra packages and just do `dune build` and everything
should work.

For the context, Dune doesn't provide nice options for multi-project
monorepos. The dune files represent the static information about the
project and it is presumed that there is an external tool that
generates them. Cf., tezos manifest that generates dune files from the
OCaml EDSL or whatever they use in Janestreet (jenga?). Originally,
the plan was to implement the same mechanism, e.g., generate the
dune-project file during the configuration phase. But right now I
don't have enough time for that, so I am pushing a simple
workaround. All packages in bap-extra are now marked as allow_empty,
indicating that they can produce now artifacts. Their corresponding
libraries are now optional (if a dependency is not met, then the
library is silently not built). The only special case is ghidra that
doesn't have dependencies trackable by Dune (i.e., OCaml libraries,
besides base and bap), so to prevent it from building I added a small
check that ghidra library is installed.
Since v4 they all must have distinct names across all workflows.
@ivg ivg force-pushed the makes-extra-packages-optional branch from b4aca8b to 20a0282 Compare March 5, 2025 00:34
@ivg
Copy link
Member Author

ivg commented Mar 5, 2025

Okay, the pipelines now look fixed, modulo macOS, which had never picked up a runner, so I had to cancel it.

@ivg ivg merged commit d8c5ced into master Mar 5, 2025
8 of 10 checks passed
@ivg ivg deleted the makes-extra-packages-optional branch March 5, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant