Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

an "ocamlfind reinstall-if-diff" command #6

Open
chetmurthy opened this issue Apr 30, 2020 · 1 comment
Open

an "ocamlfind reinstall-if-diff" command #6

chetmurthy opened this issue Apr 30, 2020 · 1 comment

Comments

@chetmurthy
Copy link
Contributor

[this is almost certainly not one I think you'll want to add to ocamlfind, so I'm really asking you this to get your opinion whether this is a foolish idea, before I implement it]

Recently I've been building a project with a bunch of interrelated sub-packages that need to be built in a particular order. At full-project-install time, I install a single findlib package with a bunch of sub-packages. Durin the build, each sub-package is built and then installed in a local repository. So sub-package C can depend on sub-package A,B, by depending on their findlib directories, and instead of a mess of include-directories and references to cmo/cmi/cma files, the references are always to other findlib packages. It's very clean and neat.

There is only one problem: the last step in building a sub-package is to "ocamlfind install" it to the local repository. But if the package hasn't actually changed, then the act of installing it will update the insalled package. So if I rerun the build on package B, this will cause C to think that B has changed, and trigger a complete rebuild of C.

If there were an "ocamlfind reinstall-if-diff " command that would (a) check that the list of files provided was identical to the contents of the package , and if so, then do nothing, and (b) if different, would delete package and reinstall it, then this would be perfect.

I don't think this belongs in ocamlfind, but I do think this is a useful way to organize nontrivial ocaml projects with a bunch of internal dependencies.

What do you think? Am I missing something?

P.S. I believe that along this path will be an integration between ocamlfind and Google Bazel. That's sort of where I'm heading.

@chetmurthy
Copy link
Contributor Author

Gerd, I've implemented the "reinstall-if-diff" command in a git repo ( https://github.com/chetmurthy/ocamlfind2 ) and would like to release this. The project contains also the preprocess command, and it's possible over time I'll add more commands. They're all 'add-ons' that I view as not central to ocamlfind, but maybe useful.

Right now, the project name ocamlfind2 seems .... well, both a little presumptuous, and maybe confusing. I think I should change the name, the ensure no possibility of confusion. I'm open to any suggestion you have for a different name, and (since my sister said 'always suggest a default choice") I'll suggest as a default "not-ocamlfind" or "ocamlfind-experimental" (even this latter one, I find a little presumptuous).

Would you be OK with "not-ocamlfind"?

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

No branches or pull requests

1 participant