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

Provide a more unified build for Java-based code #53

Closed
joshuaauerbachwatson opened this issue May 25, 2017 · 2 comments
Closed

Provide a more unified build for Java-based code #53

joshuaauerbachwatson opened this issue May 25, 2017 · 2 comments
Assignees

Comments

@joshuaauerbachwatson
Copy link
Contributor

We currently use Java as a "fourth language" (after Coq, OCaml, and Javascript) for implementing parts of the system. For historical reasons, Java code is in many places with separate .builds, some of which are interrelated in non-obvious ways.

There should ideally be a single target in the top-level Makefile to build all the Java code.

The Java code is arguably optional because the system is still useful without it. However, it is used in the following places.

  • the Java runtime (needed iff you generate Java and want to test it)
  • the sample drivers (needed to run our samples in the intended way)
  • the SQL parser (needed if you want to use SQL as a source language or a schema language)
  • the developing SQL++ parser (needed if you want to use that)
  • the ODM languages front end (needed if you want to use any ODM languages)
  • the Java services router (pre-requisite for the previous three items and also needed if you want to load data from multiple CSV files instead of a single JSON file)

Currently, only the first of these has a build target in the main Makefile.

Complicating factors:

  • the first two items only need Java while the rest require ant as well (and network connectivity during the first build)
  • The ODM item also requires a legal download of ODM Rules Designer, making it unwise to bundle it into a single target with everything else (but)
  • Any items dependent on the Java services core have to be built as part of a whole that builds the core and the set of services that you are going to use

What seems to work best is a single target like

make javacode

but modify its behavior with set of flags as in

make -DSQL=yes -DSQLPP=yes -DODM=yes javacode

Documentation would warn you of the prerequisites and hopefully you would not try to build things that wouldn't build. Users who build 'javacode' at all would get the runtime and sample drivers at least; those who added at least one optional service would also get the Java services core.

@joshuaauerbachwatson
Copy link
Contributor Author

I've change the top level Makefile to implement this idea and it seems to work. I have not yet changed README.md, but I have done nothing to change the default target or any documented target (new functionality is in an entirely new target). The issue stays open until the README is updated.

@joshuaauerbachwatson
Copy link
Contributor Author

I've updated the instructions in README.md. It is still true that old ways of doing things still work but the instructions now point to the new ways. I'm closing this now.

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