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

Port to jbuilder #374

Closed
wants to merge 46 commits into from
Closed
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
dbb4963
almost working ppx for jbuilder; just cant get linkall to apply...
andrewray May 22, 2017
0fa50d2
magic cmxs ocamlbuild rule courtest @jdimino
andrewray May 22, 2017
68b161f
1st pass at jbuilder
andrewray May 23, 2017
30b8a80
add configurator dep
andrewray May 23, 2017
de3d931
opinionated reorganisation of packages
andrewray May 23, 2017
291f605
add lwt.ppx to lwt. notes on a few bad package builds
andrewray May 23, 2017
e721933
add parsing of ocamlc -config to discover.ml
andrewray May 23, 2017
a988946
rename syntax to camlp4. Add -p to opam test commands
andrewray May 23, 2017
a384933
missed a syntax->camlp4 conversion in META
andrewray May 23, 2017
2da8764
add proper configuration for glib
andrewray May 24, 2017
e9f0907
add flag detection for lwt-unix
andrewray May 24, 2017
512d277
new package lwt-xxx, map to old name lwt.xxx
andrewray May 24, 2017
e13bac7
remove old build system
andrewray May 24, 2017
7b6d9d0
add synopsis fields
andrewray May 24, 2017
94383e4
use exists_if in lwt META to only shadow installed packages
andrewray May 24, 2017
b28726b
note build problems on 4.03
andrewray May 24, 2017
b825120
Refact libraries to match current lwt configuration
andrewray May 25, 2017
d99fb6d
Remove dependancy on Base and Stdio
andrewray May 25, 2017
6c1705f
fix ppx so it builds on 4.02..04
andrewray May 25, 2017
ffffdea
fixup opam files and test across a few ocaml versions
andrewray May 25, 2017
a926624
Fix top-level configuration
andrewray May 26, 2017
3b29534
fix lwt.opam typo
andrewray May 26, 2017
49d909a
fix error message in discover.ml
andrewray May 26, 2017
cd1e12c
add workspace file. works with current jbuilder master
andrewray May 26, 2017
5a044c6
have a go at updating the travis script
andrewray May 26, 2017
a17ec27
try to fix travis script (part 2 of many...)
andrewray May 26, 2017
c13e28a
try to fix appveyor
andrewray May 26, 2017
20a979d
try to fix appveyor script
andrewray May 26, 2017
358f333
set os_type correctly in discover.ml
andrewray May 26, 2017
4973a51
and finally link with ws2_32 library
andrewray May 26, 2017
353f501
for appveryor, run the tests through opam instead.
andrewray May 27, 2017
b9ff5dc
add jbuilder odoc target, disable 4.05 on travis
andrewray May 27, 2017
890ccc2
print each tests to see whats failing on travis
andrewray May 27, 2017
d827388
add makefile for wikidoc and ocamldoc generation
andrewray May 27, 2017
ef6021c
jenkins documentation build
andrewray May 28, 2017
b120197
install uchar and ocamlbuild deps for jenkins
andrewray May 28, 2017
ddc6330
address jbuilder code review issues
andrewray Jun 7, 2017
b0551ea
work around for camlp4 issue.
andrewray Jun 7, 2017
67a34ac
add configuration check to makefile
andrewray Jun 8, 2017
455fe57
didn't mean to remove the install target from the Makefile
andrewray Jun 8, 2017
c075a63
Fix up lwt_react, lwt_ssl, lwt_glib opam files
aantron Jun 8, 2017
dacbef8
Fix up lwt.opam
aantron Jun 8, 2017
0a33c49
Revert change to README.md
aantron Jun 8, 2017
7ca76aa
More fixing up of lwt_react, lwt_ssl, lwt_glib
aantron Jun 8, 2017
e0077c3
Nits: remove some trailing whitespace
aantron Jun 8, 2017
9fb2f5d
One last trailing whitespace nit!
aantron Jun 8, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
_build
src/unix/lwt_config.ml
src/unix/lwt_config.h
src/unix/lwt_unix_jobs_generated.ml
src/unix/jobs-unix/
setup.data
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the setup.* files can also be removed from .gitignore.

setup.log
setup.exe
Expand All @@ -15,3 +11,7 @@ _coverage/

# For local work, tests, etc.
scratch/

.merlin
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can also delete the root .merlin from the repo.

*.install

4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ matrix:
env: COMPILER=4.03
- os: linux
env: COMPILER=4.04
- os: linux
env: COMPILER=4.05
#- os: linux
# env: COMPILER=4.05
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't find any discussion in the jbuilder repo about 4.05. Do you or anyone have a link? This doesn't block the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the bug may actually be related to a problem with 4.05+beta3, and it will work with 4.05+trunk

- os: linux
env: COMPILER=4.04 FLAMBDA=yes
- os: linux
Expand Down
80 changes: 35 additions & 45 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,70 +9,60 @@
OCAMLFIND_IGNORE_DUPS_IN = $(shell ocamlfind query compiler-libs)
export OCAMLFIND_IGNORE_DUPS_IN

# Set to setup.exe for the release
SETUP := setup-dev.exe

# Default rule
default: build

# Setup for the development version
setup-dev.exe: _oasis setup.ml
grep -v '^#' setup.ml > setup_dev.ml
ocamlfind ocamlopt -o $@ -linkpkg -package ocamlbuild,oasis.dynrun setup_dev.ml || \
ocamlfind ocamlc -o $@ -linkpkg -package ocamlbuild,oasis.dynrun setup_dev.ml || true
rm -f setup_dev.*

# Setup for the release
setup.exe: setup.ml
ocamlopt.opt -o $@ $< || ocamlopt -o $@ $< || ocamlc -o $@ $<
rm -f setup.cmx setup.cmi setup.o setup.obj setup.cmo

setup: $(SETUP)
# build the usual development packages
build:
jbuilder build \
--only-packages lwt \
@install

build: $(SETUP) setup.data
./$(SETUP) -build $(BUILDFLAGS)
# build everything
all:
jbuilder build @install

doc: $(SETUP) setup.data build
./$(SETUP) -doc $(DOCFLAGS)
# run all tests
test:
jbuilder runtest

doc-api: $(SETUP) setup.data build
./$(SETUP) -build lwt-api.docdir/index.html
# Use jbuilder/odoc to generate static html documentation.
# Currenty requires ocaml 4.03.0 to install odoc.
doc:
jbuilder build @doc

test: $(SETUP) setup.data build clean-coverage
./$(SETUP) -test $(TESTFLAGS)
# Build HTML documentation with ocamldoc
doc-api-html: all
make -C doc api/html/index.html

all: $(SETUP)
./$(SETUP) -all $(ALLFLAGS)
# Build wiki documentation with wikidoc
# requires ocaml 4.03.0 and pinning the repo
# https://github.com/ocsigen/wikidoc
doc-api-wiki: all
make -C doc api/wiki/index.wiki

install: $(SETUP) setup.data
./$(SETUP) -install $(INSTALLFLAGS)
install:
jbuilder install

uninstall: $(SETUP) setup.data
./$(SETUP) -uninstall $(UNINSTALLFLAGS)
uninstall:
jbuilder uninstall

reinstall: $(SETUP) setup.data
./$(SETUP) -reinstall $(REINSTALLFLAGS)
reinstall:
jbuilder uninstall
jbuilder install

clean: $(SETUP) clean-coverage
./$(SETUP) -clean $(CLEANFLAGS)

distclean: $(SETUP)
./$(SETUP) -distclean $(DISTCLEANFLAGS)
rm -rf setup*.exe
clean:
rm -fr _build
rm -f *.install
rm -fr doc/api

clean-coverage:
rm -rf bisect*.out
rm -rf _coverage/

configure: $(SETUP)
./$(SETUP) -configure $(CONFIGUREFLAGS)

setup.data: $(SETUP)
./$(SETUP) -configure $(CONFIGUREFLAGS)

coverage: test
bisect-ppx-report -I _build/ -html _coverage/ bisect*.out
bisect-ppx-report -text - -summary-only bisect*.out
@echo See _coverage/index.html

.PHONY: default setup build doc test all install uninstall reinstall clean distclean configure coverage
.PHONY: default build doc test all install uninstall reinstall clean coverage
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ version,
opam source --dev-repo --pin lwt
```

This will also install the development dependency OASIS.
This will also install the development dependency jbuilder.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jbuilder isn't a development-only dependency like OASIS is/was, so we can remove this entire sentence. The current README.md has a completely different contributing section anyway, though.


A list of [project suggestions][projects] and a [roadmap][roadmap] can be found
on the wiki.
Expand Down
10 changes: 10 additions & 0 deletions TODO.jbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- Internal modules exposed in lwt-unit

- lwt-unix configuration params passed to discover.exe;
- use_libev (currently forced to true)
- how do we depend on an external opam package with no findlib library?
- android-target?

- multi-workspace builds dont work
- jbuilder build --workspace jbuild-workspace.dev @install @runtest --only-packages lwt
- problem with ppx
Loading