Commit Graph

1242 Commits (2954c591a1349cbca2c5811d15b363caeef03bd6)

Author SHA1 Message Date
Joseph Frazer 21ffeb5841 [DEV-3836] make tests check recursively 2018-10-22 16:15:45 -04:00
Joseph Frazer ac00ce4401 [DEV-3836] make tests recursive 2018-10-22 16:15:23 -04:00
Mike Gerwitz f5913d6fa0 build-aux/Makefile.am: Correct program_fragments sorting
The sorting is intended to remove nondeterminism.

This fixes 9cce2b15.
2018-10-19 10:38:08 -04:00
Mike Gerwitz 9cce2b1542 build-aux/Makefile.am: Recognize all fragments as dependencies of program.expanded.xml
* build-aux/Makefile.am (program_fragments): New variable.
  (ui/program.expanded.xml): Add program_fragments as dependencies.
2018-10-19 10:15:14 -04:00
Mike Gerwitz 8fa7d9ece6 bin/tame: Inherit TAME_CMD_WAITTIME from environment
* bin/tame (TAME_CMD_WAITTIME): Renamed from `RUNNER_CMD_WAITTIME'.
    Inherit from environment, default 3.
  (command-runner): Sleep for an additional TAME_CMD_WAITTIME seconds after
    requesting runner reload to give more time in case of high load.
  (verify-runner-ack): Rename variable.
  (usage): Document env var.
* build-aux/Makefile.am: Export TAME_CMD_WAITTIME.
2018-10-19 10:15:14 -04:00
Mike Gerwitz 8143207903 Support non-xmlo dependencies for input map @src
* build-aux/gen-make: Do not add ".xmlo" suffix for deps with a
    trailing `$'.
* src/current/pkg-dep.xsl (lvm:program|lvm:return-map): Append ".xml$" to
    dep for map/@src (new dep).
2018-10-19 10:15:11 -04:00
Mike Gerwitz 04a31ecca1 csv2xml: Remove @name
This has been autogenerated for some time (during complication).

* build-aux/csv2xml: Remove @name from output root node.
2018-10-19 09:27:20 -04:00
Mike Gerwitz 74d1160533 build-aux/Makefile.am: Copy stripped ui/package.strip.js
This is the one we always want in the UI.  Rather than stripping with an
outside build process, just use this.

* build-aux/Makefile.am (program-data-copy, lvroot): Copy ui/program{=>.strip}.js.
2018-10-16 23:00:59 -04:00
Mike Gerwitz fba0f0df35 Run YAML test cases against stripped executable
This significantly improves speed and reduces memory usage when dealing with
hundreds of test cases.

* build-aux/Makefile.am (dest_standalone_strip): New variable.
  (strip, %.strip.js: New targets.
  (.PHONY): Add strip target.
  (check-am): Depend on strip.
* build-aux/progtest-runner: Use stripped executables.
2018-10-16 22:36:13 -04:00
Mike Gerwitz a4c8c0d840 bin/tame: Better runner re-try
Try to re-post message, since the previous message will have already been
read (otherwise the previous echo would have hung).

* bin/tame (EX_STALLED): New exit code.
  (command-runner): Re-post message after stall.  If unrecoverable, provide
    a more clear error and exit with EX_STALLED.
2018-10-16 22:23:57 -04:00
Mike Gerwitz b7167467b0 Propagate TAMED_STALL_SECONDS
bin/tame (TAMED_STALL_SECONDS): Export variable.
build-aux/Makefile.am (TAMED_INSTALL_SECONDS): Export variable.
2018-10-16 09:26:37 -04:00
Mike Gerwitz 1e5cdf8c40 src/current/src/Makefile: Phony recursive targets
Otherwise *-recursive fails.

* src/current/src/Makefile (check, info, pdf, html): New phony targets.
2018-10-16 09:10:15 -04:00
Mike Gerwitz db1c03dfd9 tame{,d}: Reload runner when unresponsive
This tries to be a bit more resilient in case a runner becomes unresponsive,
rather than waiting for tamed to kill itself.

* bin/tame (RUNNER_CMD_WAITTIME): New variable.
  (command-runner): Tell runner to reload if it does not respond in
    RUNNER_CMD_WAITTIME seconds.
  (verify-runner-ack): New function.
* bin/tamed (mkfifos): Only keep stdin open.  stdout isn't necessary, and
    may have actually been causing subtle issues.
  (spawn-runner): Support restarting dslc on SIGHUP.
2018-10-16 08:53:04 -04:00
Mike Gerwitz 5679be281a Makefile.am: Correct build intermediates and target dependencies
* Makefile.am (.SECONDARY): Keep all intermediate files.
  (%.html): Add `%.xmle' dependency.
  (lvroot): Add program-ui and c1map dependencies.
2018-10-11 23:50:53 -04:00
Mike Gerwitz f44d89d4d2 Makefile.am: Specify hoxsl-generated apply stylesheets
This will speed up compilation a bit.

* Makefile.am (apply_src): Manually specify apply files.
2018-10-11 23:26:44 -04:00
Mike Gerwitz 1a7dbcb651 Makefile.am (all): New target (to compliment all-nodoc)
`all-nodoc' was previously used in bootstrapping.

* Makefile.am (all): New target.
2018-10-11 23:00:28 -04:00
Mike Gerwitz 01671f8345 Improved build system
This fixes a lot of the problems with the build by using a normal Makefile
as it is intended to be used.  To do this, tamed was created.  See the
manual and commit messages for more information.  bin/tame{,d} also have
more information.  More information will follow in the manual in the future.

There is also more cleanup to follow; I just want to get this committed so
that people can take advantage of it and stop some of the suffering.
2018-10-11 22:28:25 -04:00
Mike Gerwitz 37c8af62b2 doc/about.texi: Begin adding `About TAME'
This does not include a great deal of information, but it is a start.

* README.md: Modernize.
* doc/Makefile.am (tame_TEXINFOS): Add `about.texi'.
* doc/about.texi: New file.
* doc/tame.texi: Include it.
2018-10-11 22:25:19 -04:00
Mike Gerwitz dc1d8036d6 build-aux/Makefile.am: .{PRECIOUS=>SECONDARY}
This will keep the intermediate files around but will still delete them on
build failure.

* build-aux/Makefile.am (.SECONDARY): Renamed from `.PRECIOUS'.
2018-10-11 22:25:19 -04:00
Mike Gerwitz 4442a3a3c2 bootstrap: New file
Please excuse the mess.  This was taken from an existing bootstrap script in
a private repository; it can be cleaned up in the future.

* bootstrap: New file.
* README.md (Getting Started): New section.
2018-10-11 22:25:19 -04:00
Mike Gerwitz 6027769633 Integrate new compilation scripts, remove cqueue and Makefile.2
This is a major step toward normalcy---removing the kluge of a build process
that was causing so many issues.  Rather than echoing all operations to a
queue file before passing it off to dslc, the new build scripts in `bin/'
are used to invoke tame normally, as needed.  This solves all of the current
issues with things not rebuilding when they should.  And, as a bonus, tab
completion on targets works.

Sorry this took so long.  There wasn't much motivation until we hired so
many people that are suffering from this.

This does a few major things, along with some miscellaneous others:
  - Invoke bin/tame directly;
  - Merge Makefile.2.in into Makefile.am; and
  - Fix up some targets.

* build-aux/Makefile.2.in: Delete file.  Mostly merged with Makefile.am.
* build-aux/Makefile.am: Add a bunch of new targets and definitions from
    Makefile.2.in.  Modify all that previously used .cqueue to now invoke
    `$(TAME)' directly.  Remove miscellaneous targets for trying to proxy
    targets to Makefile.2.
  (saneout, _go): Remove definitions.
  (.NOTPARALLEL): Add to prevent parallel builds.
  (ui/program.expanded.xml)[.version.xml]: Remove dependency for now.
  (clean): Also clean generated PHP files.  Follow symlinks to clean core.
    This is still incomplete (does not clean all rate table stuff).
  (suppliers.mk)[xmlo_cmd]: Remove.  See `gen-make' and `gen-c1make'.
  (lvroot)[summary-html]: New dependency.
  (kill-tamed, tamed-die): New targets (former alias of latter) to kill
    tamed.
* build-aux/gen-c1make: Generate `$(TAME)' invocation.
* build-aux/gen-make: Likewise.  Remove `xmlo_cmd' output.  Ignore recursive
    `tame' symlink (this can be removed once we clean `rater/' up.
* build-aux/m4/calcdsl.m4 (TAME): Update description to reflect that it
    should now be the path to `bin/tame'.  Adjust `AC_CHECK_FILE' lines
    accordingly.
  (tame_needed_ver): Remove.  We have been in the same repo as TAME itself
    for quite some time.  Remove associated code.
  (AC_CONFIG_FILES): Remove `Makefile.2'.
* src/current/src/com/lovullo/dslc/DslCompiler.java (_DslCompiler)[compile]:
    Perform validation prefore `compile' command rather than a separate
    `validate' step.  Remove `rm'.
  [compileSrc]: Stop echoing command.  This was only necessary because of
    the previous Makefile klugery; now Make echoes on its own correctly.
2018-10-11 22:25:18 -04:00
Mike Gerwitz 88da519c5e template.xsl: Remove eseq:expand-node function @override
* src/current/include/preproc/template.xsl (eseq:expand-node)[@override]:
  Remove attribute (deprecated by Saxon and unneeded).
2018-10-11 21:03:51 -04:00
Mike Gerwitz cf57857ce5 bin/: Server/client build scripts
These scripts allow the TAME compiler stack to be invoked naturally, rather
than requiring the use of a Makefile today.  This will not only allow users
to more easily invoke the compiler, but will also allow us to invoke TAME
naturally from Makefile and remove the klugery that has existed for so
long.

This users a server/client architecture in order to mitigate the startup
cost of the JVM.  More documentation will follow.

Note that there are a bunch of symlinks in rater/---this is a transition
step to allow the build to continue working as it did before, which relies
on a directory structure that exists outside of this repository.  This will
be cleaned up in the future.

* .gitignore (bin/dslc): Add ignore for generated file.
* bin/dslc.in: New script to encapsulate Java invocation.
* bin/tame: New script (client).
* bin/tamed: New script (server).
* configure.ac (JAVA_OPTS, DSLC_CLASSPATH, AUTOGENERATED): New variables for
  dslc.in.  Output bin/dslc.
* rater/README.md: Note that this symlink mess is temporary.
* rater/c1map: New symlink for dslc assumptions.
* rater/c1map.xsl: Likewise.
* rater/calc.xsd: Likewise.
* rater/compile.xsl: Likewise.
* rater/compiler: Likewise.
* rater/dot.xsl: Likewise.
* rater/include: Likewise.
* rater/link.xsl: Likewise.
* rater/standalone.xsl: Likewise.
* rater/summary.xsl: Likewise.
* rater/tame: Likewise (warning: circular symlink).
* src/current/src/com/lovullo/dslc/DslCompiler.java (_DslCompiler)[compile]:
  Output `DONE' lines.
2018-10-08 23:25:02 -04:00
Mike Gerwitz 4ad0c5d1be Include dslc Java build as submake
This will now automatically build on recursive target `all'.

* Makefile.am (SUBDIRS): Add `src/current/src'.
* src/current/src/Makefile: (.PHONY): Add `all'.
  (all): New target.  Alias to `dslc'.
2018-10-08 23:07:41 -04:00
Mike Gerwitz 7e69a0c2b6 build-aux/gen-make: Do not parse typelist as depfile 2018-10-04 16:46:48 -04:00
Mike Gerwitz b716e8c2cd csvm: Auto-sort expanded output 2018-10-03 14:44:55 -04:00
Mike Gerwitz 397710c055 csvm: Auto-sort expanded output
This will allow the variable abstractions to fully encapsulate values while
still permitting binary searches on sorted rows.

* csvm-expand: Renamed from `csvm2csv'.  Add directive support.
* csvm2csv: New script to perform sorting.  Invokes aforementioned.
* test/test-csvm2csv: Update for sorting.
2018-10-03 14:21:35 -04:00
Mike Gerwitz d251f7a79b csvm2csv: Syntax improvements and error checking 2018-10-02 15:53:44 -04:00
Mike Gerwitz be59eb74a6 Makefile.am: Add build-aux tests to `check' target
* Makefile.am (check): Add build-aux tests to target.
2018-10-02 13:53:06 -04:00
Mike Gerwitz c675207696 csvm2csv: Add some error checks
* build-aux/csvm2csv: Fail on invalid var definition.
  (expand_vars): Fail in invalid reference.
  (parseline): Fail on non-numeric range.
* build-aux/test/test-csvm2csv
  (test-fail-unknown-var-ref, test-fail-non-numeric-range)
  (test-fail-invalid-var-dfn): New tests.
2018-10-02 13:35:06 -04:00
Mike Gerwitz c741b4a84e csvm: Add test cases and support for all variable expressions
This allows variables to contain any type of expansion, treating them
as (recursively) string replacements.

* csvm2csv: Add Copyright year.
  (expand_vars): New function.
  (parseline): Use it.  Expand before all other replacements so that
    variable expansions may support all types of expressions.  Expand
    variables in range expressions.
* test/test-csvm2csv: New file.
2018-10-01 16:14:05 -04:00
Andrew Elbaneh bd65f433d2 numeric/convert (_endpoint_): Add @desc@ 2018-09-28 16:34:37 -04:00
Mark Goldsmith aeffcb010d insurance (_premium_): Make @generates@ optional 2018-09-24 10:46:40 -04:00
Mike Gerwitz 6dfa860e25 [BC BREAK] insurance (_premium_): Make @desc@ required
* core/insurance.xml (_premium_)[@desc@]: Make required.
2018-09-21 19:00:23 -04:00
Mike Gerwitz d9bef9d028 insurance (_premium_): Add @yields@
* core/insurance.xml (_premium_)[@yields@]: New param with validations.
    Will enforce naming conventions.
  Update TODOs.
2018-09-21 18:57:22 -04:00
Mike Gerwitz 7831751d5e doc: Remove TODO item about linker classifier distinction
That was already done recently.

* doc/todo.texi (Project TODOs)[Linker]: Remove second item.
2018-09-14 16:51:33 -04:00
Mike Gerwitz 5e51e76d7b insurance: Add _{credit,debit}_/@default@
This is potentially dangerous, but is consistent with _factor_.

* insurance.xml (_credit_, _debit_)[@default@]: New param, propagated to
  `_factor_'.
2018-09-13 15:13:58 -04:00
Mike Gerwitz 0cadf76dfd param: New package with _param_ template
* param.xml: New package
2018-09-13 15:13:51 -04:00
Mike Gerwitz 6ce3a1df67 assert: Add _assert_/@neg-desc@
* assert.xml (_assert_)[@neg-desc@]: New param to allow setting the
  description of the negative classification.  This is especially useful
  when humans are going to be reading the assertion classifications; it can
  otherwise be very confusing.
2018-09-13 15:13:47 -04:00
Mike Gerwitz 0abb7104b1 assert: _assert_/@neg{_=>-}* template params
* assert.xml (_assert_)[@neg-as@, @neg-yields@]: Rename from `@neg_as@' and
  `@neg_yields' respectively.

This renames these params to be consistent with modern standards.
We want to do this before they're actually in use.
2018-09-13 15:13:41 -04:00
Mike Gerwitz 607abd281d expand-sequence: Fix TeX escaping
* src/preproc/expand/expand-sequence.xsl: {\\=>\}.
2018-09-12 16:51:11 -04:00
Mike Gerwitz f294a45507 doc: Style using CSS
* doc/Makefile.am (tame_TEXINFOS): Add `tame.css'.
  (MAKEINFOHTML): Add `--css-include tame.css'.
* doc/tame.css: New file.
2018-09-12 16:49:53 -04:00
Mike Gerwitz feb19be44a doc/notes: Remove path
This is no longer needed.

* doc/notes/path-processing: Remove file.
2018-09-12 12:11:57 -04:00
Mike Gerwitz f310603646 Add GitLab pipeline configuration 2018-09-12 12:09:04 -04:00
Mike Gerwitz e18d5bb4b5 symbols: Remove last remnants of @keep
* src/symtable/symbols.xsl (preproc:symtable)[lv:param]: Remove @keep.
* test/symtable/symbols.xspec: Remove @keep.
2018-09-12 12:07:25 -04:00
Mike Gerwitz c97af5e676 Correct failing test cases
Shame on me!

* test/graph-test.xsl (foo:graph-vtwo-vthree): Swap `a' and `c' nodes.  This
    ordering seems to have changed after a Saxon upgrade, and this ordering
    makes much more sense.
* test/symtable/symbols.xspec: Add missing `@default' and
    `@pollute'.  Remove extra `@keep'.  All keeps should be gone by now, but
    it looks like I missed some; that will be handled in a separate commit.
2018-09-12 12:07:25 -04:00
Mike Gerwitz bc1b66a3be Add GitLab pipeline config
* .gitlab-ci.yml: Add file.
2018-09-12 12:07:25 -04:00
Mike Gerwitz c53faecad0 README.md: Add links to all doc formats
* README.md (Documentation): Add links to all doc formats.
2018-09-12 12:07:25 -04:00
Mike Gerwitz ed5f3d151e Add src/ symlink to doc/
Most LaTeX distributions prohibit loading files from parent
directories.  This gets around that for PDF builds.

* doc/src: Add symlink.
* doc/tame.texi, src/symtrable.xsl: Use it.
2018-09-12 12:07:25 -04:00
Mike Gerwitz 44d3f76c0b Combine core into this repository
tame-core used to be its own repository, but maintaining it separately does
not provide a whole lot of benefit, and further makes it difficult to see
version dependencies.  I also want to centralize documentation within this
project.
2018-09-11 09:30:54 -04:00