ocaml-batteries-team / batteries-included

Batteries Included project
http://ocaml-batteries-team.github.com/batteries-included/hdoc2/
Other
518 stars 106 forks source link

Remove dependency on oUnit #302

Closed bobzhang closed 12 years ago

bobzhang commented 12 years ago

Would you provide an optional flag to remove the dependency on oUnit. I have attached a simple patch for your reference

diff --git a/Makefile b/Makefile
index e25c100..f3f34de 100644
--- a/Makefile
+++ b/Makefile
@@ -32,12 +32,12 @@ INSTALL_FILES = _build/META _build/src/*.cma \
    _build/src/syntax/pa_comprehension/pa_comprehension.cmo \
    _build/src/syntax/pa_strings/pa_strings.cma \
    _build/src/syntax/pa_llist/pa_llist.cmo \
-   _build/libs/*.cmi _build/libs/*.mli \
-   _build/$(QTESTDIR)/qtest \
-   _build/$(QTESTDIR)/quickcheck.cmi \
-   _build/$(QTESTDIR)/runner.cmi \
-   _build/$(QTESTDIR)/qtest.cma \
-   ocamlinit build/ocaml
+   _build/libs/*.cmi _build/libs/*.mli #\
+   # _build/$(QTESTDIR)/qtest \
+   # _build/$(QTESTDIR)/quickcheck.cmi \
+   # _build/$(QTESTDIR)/runner.cmi # \
+   # _build/$(QTESTDIR)/qtest.cma \
+   # ocamlinit build/ocaml
 OPT_INSTALL_FILES = _build/src/*.cmx _build/src/*.a _build/src/*.cmxa \
    _build/src/*.cmxs _build/src/*.lib _build/libs/*.cmx \
    _build/$(QTESTDIR)/quickcheck.cmx _build/$(QTESTDIR)/quickcheck.o \
@@ -79,7 +79,7 @@ endif

 .PHONY: all clean doc install uninstall reinstall test qtest qtest-clean camfail camfailunk coverage man

-all: $(QTEST_RUNTIME)
+all: # $(QTEST_RUNTIME)
    @echo "Build mode:" $(MODE)
    $(OCAMLBUILD) $(OCAMLBUILDFLAGS) $(TARGETS)

@@ -246,6 +246,10 @@ setup.ml: _oasis
    git commit setup.ml -m"Update setup.ml based on _oasis"

+# uploads the current documentation to github hdoc2/ directory
+upload-docs:
+   make doc && git checkout gh-pages && rm -f hdoc2/*.html && cp _build/batteries.docdir/*.html hdoc2/ && git add hdoc2/*.html && git commit -a -m"Update to latest documentation" && git push github gh-pages
+
 ###############################################################################
 #  CODE COVERAGE REPORTS
 ###############################################################################
thelema commented 12 years ago

You're right; we have a dependency on OUnit when we shouldn't. I guess now is the time to spin off qtest into its own project so that its compilation/installation (which requires OUnit) doesn't become part of our standard build.

vincent-hugot commented 12 years ago

I guess now is the time to spin off qtest into its own project

Before or after 2.0 ?

thelema commented 12 years ago

I'm thinking before 2.0.

E.

vincent-hugot commented 12 years ago

For now, I have extracted qtest and its history (thanks to filter-branch) into a new repository: iTeML, for "inline unit tests for OCaml". I am taking this opportunity to get rid of the not-very-descriptive "qtest" legacy name.

I'll maintain legacy qtest2, but major new features and backwards-incompatible changes will (eventually) go into shiny new iTeML = qtest3, which will use the annotation model suggested by Gabriel, as opposed to the current extraction model (I'm not so sure it's worth having a hybrid model anymore).

I have yet to migrate the qtest stuff from the Makefile, then I'll expunge everything from the batteries repo. I can't give any timeline, I am swamped IRL.

edit: and 5 mins later: bam! a new commit on batteries' qtest... I have to figure out how to coax git into synchronising the two repos...

vincent-hugot commented 12 years ago

It's done... shouldn't have broken anything...

bobzhang commented 11 years ago

It seems that oUnit is still required?

vincent-hugot commented 11 years ago

@bobzhang

It seems that oUnit is still required?

Does it still seem that way now that #331 is solved?

bobzhang commented 11 years ago

yes, sorry for the noise