You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to convert to jbuilder an existing project that contains its sources spread in different sub-directories (~140 ml files). It seems that jbuilder looks only to sub-directories in order to find sub-libraries or just file to copy. Is it the case?
I'm trying to add a stanza (includes (sub_dirs (dirs)) that would tell to also look at these directories for .h, .ml, .mli, as if they where in the jbuild directory. It is not in the roadmap, but is it ok?
It seems to require to change quite a lot of types, such as in Module the ml_fname and mli_fname fields from string to Path.t.
Reacted by Ralf Vogler, Jules Villard and Gabriel Radanne
Here the culprit frama-c! They are all part of the frama-c kernel, so they share the same purpose. I could separate each directory in a particular library but since they should be in the same namespace it seems not possible.
Well, you could have a toplevel library that include the smaller ones
But when you are developing inside a library don't you have to qualify the others (except if you add -open frama_c but it seems to start to be complicated).
We pack only the plugins, and we want to use module alias instead for them, so the wrapping is fine for them.
It seems like it would complicate things quite a lot.
I'm debugging it. If you think the MR is too complicated for the codebase, I will look at your solution that seems more complicated for the user.
@diml Could you add mlpack support? And mlpack for subdirectories in particular. Because sometimes modules could not be placed in a separate library, but logically should be separated.
Subdirectory support is really vital for any big project. Just look at the linux source tree, how much libraries might it have, if I want to build it with jbuilder?
@diml Could be some sort of recursive build implemented with jbuilder? Something like recursive make, without usage of libraries? Or jbuilder does not support any sort of code separation beyond libraries?
I had to do this:
jbuilder build test.exe --root src
since my sources are under src/.
That's not obvious.
I would have expected jbuilder to be smart and go find the jbuild file under src/
@UnixJunkie I'm still working on it. More than the build time it is the simplicity of the description. I think we will be able to remove at least 3000 line of Makefile thanks to the conversion, go from pack to module alias, better merlin goto definition, ...
My last problems I'm working on:
Being able to add environement variable for jbuilder exec to add: FRAMA_C_SHARE, ...
Choose the library linking order, by adding local dependencies between libraries (MR soon)
read the files to install from a file.
But currently with just 418 line of jbuilder (mainly module listing), it works very well.
Activity
bobot commentedon Mar 22, 2017
Here the culprit frama-c! They are all part of the frama-c kernel, so they share the same purpose. I could separate each directory in a particular library but since they should be in the same namespace it seems not possible.
bobot commentedon Mar 22, 2017
But when you are developing inside a library don't you have to qualify the others (except if you add -open frama_c but it seems to start to be complicated).
We pack only the plugins, and we want to use module alias instead for them, so the wrapping is fine for them.
I'm debugging it. If you think the MR is too complicated for the codebase, I will look at your solution that seems more complicated for the user.
meadofpoetry commentedon May 29, 2017
@diml Could you add mlpack support? And mlpack for subdirectories in particular. Because sometimes modules could not be placed in a separate library, but logically should be separated.
Subdirectory support is really vital for any big project. Just look at the linux source tree, how much libraries might it have, if I want to build it with jbuilder?
meadofpoetry commentedon May 29, 2017
@diml Could be some sort of recursive build implemented with jbuilder? Something like recursive make, without usage of libraries? Or jbuilder does not support any sort of code separation beyond libraries?
UnixJunkie commentedon Jun 23, 2017
I had to do this:
jbuilder build test.exe --root src
since my sources are under src/.
That's not obvious.
I would have expected jbuilder to be smart and go find the jbuild file under src/
UnixJunkie commentedon Jun 23, 2017
@bobot did you manage to switch frama-c to jbuilder?
How about build times compared to what you were using before?
andreypopp commentedon Jun 23, 2017
@UnixJunkie You can try
jbuilder builder src/test.exe. That's what I do and it works.bobot commentedon Jun 23, 2017
@UnixJunkie I'm still working on it. More than the build time it is the simplicity of the description. I think we will be able to remove at least 3000 line of Makefile thanks to the conversion, go from pack to module alias, better merlin goto definition, ...
My last problems I'm working on:
jbuilder execto add:FRAMA_C_SHARE, ...But currently with just 418 line of jbuilder (mainly module listing), it works very well.
rgrinberg commentedon Jun 23, 2017
@bobot if you have some clean build timings to compare, feel free to share them.
rgrinberg commentedon Oct 19, 2017
@bobot this can be closed I believe.
copy_filesaddresses this. Please re-open if I've misinterpreted.configure guards for HTTP_VERSION_2_PRIOR_KNOWLEDGE