samoht / assemblage

A collection of tools to manage the configuration of OCaml projects
54 stars 4 forks source link

Fix #89, no more direct calls to ocamlfind. #92

Closed dbuenzli closed 10 years ago

dbuenzli commented 10 years ago

See the comment in the commit about the drastic performance improvements.

Note that this suggest that we are not resolving packages (also the current approach won't scale/work when we introduce pkg-config support) at the right time.

We should introduce introduce variable stanzas for each package and package dependencies should resolve to to use of these variables in other variable stanzas rather than ocamlfind calls. This will reduce the max number of ocamlfind calls to #package * #phases rather than #components_having_package_as_dep * #package * #phase.

dbuenzli commented 10 years ago

N.b. I'm working on the last suggestion of my paragraph.

avsm commented 10 years ago

Nice!

On 16 Aug 2014, at 01:31, Daniel Bünzli notifications@github.com wrote:

See the comment about the drastic performance improvements.

Note that this suggest that we are not resolving packages (also the current approach won't scale/work when we introduce pkg-config support) at the right time.

We should introduce introduce variable stanzas for each package and package dependencies should resolve to to use of these variables in other variable stanzas rather than ocamlfind calls. This will reduce the max number of ocamlfind calls to #package * #phases rather than #components_having_package_as_dep * #package * #phase.

You can merge this Pull Request by running

git pull https://github.com/dbuenzli/assemblage fix-89 Or view, comment on, or merge it at:

https://github.com/samoht/assemblage/pull/92

Commit Summary

Add missing base_files to lib component. Add cmi and cmti to lib files, temporary fix. Add Features.native_toolchain. Improve generated makefile readability. Put project specifics of As_makefile in As_project_makefile. As_makefile.Variable becomes As_makefile.Var. As_makefile, remove file name from makefile data structure. As_makefile.write_file, remove logging. As_makefile no longer depends on As_features. Replace As_makefile.Var.name by As_makefile.Var.ref. Replace As_makefile.Var.raw_name by As_makefile.Var.name. Tweaks to generated make help. Tweak Makefile logging. Makefile: make all calls to ocamlfind indirect. File Changes

M assemble.ml (7) M bootstrap.sh (6) M lib/as_features.ml (11) M lib/as_features.mli (4) M lib/as_makefile.ml (746) M lib/as_makefile.mli (194) M lib/as_ocamlfind.ml (20) M lib/as_project.ml (8) A lib/as_project_makefile.ml (547) A lib/as_project_makefile.mli (29) M lib/as_tool.ml (4) M lib/assemblage.mli (7) Patch Links:

https://github.com/samoht/assemblage/pull/92.patch https://github.com/samoht/assemblage/pull/92.diff — Reply to this email directly or view it on GitHub.