1
0
forked from GitHub/gf-core
Commit Graph

21 Commits

Author SHA1 Message Date
Thomas Hallgren
0a0eaa01bc Bump version requirements to base>=4.6, Cabal>=1.20
Cabal>=1.20 allows control over parallelism when compiling grammars from
Setup.hs and WebSetup.hs.

base>=4.6 allows conditional compilation with CPP to be eliminated from
a few modules.

base-4.6 corresponds to GHC 7.6.3, which is what you get in
Debian 8 (aka jessie, aka oldstable) from 2015.
2017-08-18 11:55:44 +02:00
hallgren
95d2b67556 WebSetup.hs: always enable parallel compilation of the RGL and the example grammars
This should work nicely now that GF itself can detect the number of processors
in the system.

Previously there was some code in WebSetup.hs that relied on Cabal to do this,
but it was commented out because it requires Cabal>=1.20, which is fairly new
and it would complicate the installation instructions if it was required to
compile GF...
2015-09-11 15:15:53 +00:00
hallgren
984c09923c WebSetup.hs: a note about parallel builds 2015-06-23 10:22:35 +00:00
hallgren
a7e8a566cf Omit -optimize-pgf when compiling small example grammars
The minibar lets the user choose any category as the start category, but this
can lead to run-time errors for grammars compiled with -optimize-pgf.

The problem can also be observed in the GF shell. For example, 
"linearize Fish" (which means that the start category is Kind) fails for 
some languages when Foods.pgf is compiled with -optimize-pgf.
2015-05-21 14:44:20 +00:00
hallgren
b0f9ba0c8b WebSetup.hs: always use gf -j, to avoid problems compiling the Phrasebook 2014-11-27 17:48:53 +00:00
hallgren
a494c713e1 Setup.hs: disable parallel RGL build support for now, since it is incompatible with Cabal<1.20 2014-08-25 11:22:20 +00:00
hallgren
d84c5ef171 Experimental: parallel batch compilation of grammars
On my laptop these changes speed up the full build of the RGL and example
grammars with 'cabal build' from ~95s to ~43s and the zero build from ~18s
to ~5s.

The main change is the introduction of the module GF.CompileInParallel that
replaces GF.Compile and the function GF.Compile.ReadFiles.getAllFiles. At
present, it is activated with the new -j flag, and it is only used when
combined with --make or --batch. In addition, to get parallel computations,
you need to add GHC run-time flags, e.g., +RTS -N -A20M -RTS, to the command
line.

The Setup.hs script has been modified to pass the appropriate flags to GF
for parallel compilation when compiling the RGL and example grammars, but you
need a recent version of Cabal for this to work (probably >=1.20).

Some additonal refactoring were made during this work. A new monad is used to
avoid warnings/error messages from different modules to be intertwined when
compiling in parallel, so some functios that were hardiwred to the IO or IOE
monads have been lifted to work in arbitrary monads that are instances in
the appropriate classes.
2014-08-25 09:56:00 +00:00
hallgren
02dda1e66f Setup.hs: don't build example grammars when the rgl-none argument is specified 2014-08-08 17:02:36 +00:00
hallgren
1ba0c4b354 WebSetup.hs: include Chinese when building the Phrasebook 2014-07-21 15:48:49 +00:00
hallgren
58156369fa The --output-dir option now applies also to PGF files 2014-06-21 12:26:56 +00:00
hallgren
660de6e1da WebSetup.hs: PhrasebookLav works again 2014-06-19 16:58:33 +00:00
hallgren
f3c8adcc59 WebSetup.hs: skip PhrasebookLav for now 2014-06-19 00:20:31 +00:00
hallgren
a21a782e47 Compile example grammars during the build phase instead of the install phase
This allows more errors to be detected by the build bot.
TODO: fix the gf --output-dir flag, which does not seem to change where PGF
file are put.
2014-06-18 23:57:45 +00:00
hallgren
ccc43b28f0 WebSetup.hs: use the correct --gf-lib-path when building example grammars
The directory should be the same as the one used in Setup.hs when building
the RGL, where a build directory supplied by cabal is used. This is usually
dist/build/rgl, but it could be different, e.g. when using a cabal sandbox.
2014-03-11 13:46:10 +00:00
john.j.camilleri
f5461eb3d4 Remove contribs and examples
Everything has now been moved to a separate repository at
https://github.com/GrammaticalFramework/gf-contrib
The contents of the examples folder are build during SetupWeb
2013-09-16 07:17:27 +00:00
hallgren
9d47b83e07 minibar & cloud service: minor style changes
Also include the GF logo on the cloud service start page.
2012-04-19 15:34:56 +00:00
hallgren
1100f87925 WebSetup.hs: avoid ? wildcards because of odd behaviour under Win32
There is some discussion here: http://www.xxcopy.com/xxcopy18.htm
2012-03-01 16:33:32 +00:00
hallgren
2d58947d92 WebSetup.hs: use </> instead of '/' for Win32 compatibility 2012-03-01 14:21:47 +00:00
hallgren
a8185fd997 Preparations for release of GF 3.3
+ Changing version numbers and dates here and there.
+ Simplify build-binary-dist.sh since pgf-http need not be built anymore.
+ Use--gf-lib-path to make the sample grammars for minibar compile even if GF
  is not installed.
2011-10-25 18:25:49 +00:00
hallgren
c0becec2bd Bug fix in setup for gf -server mode
Use the command "dist/build/gf/gf" instead of "gf" to compile the sample
grammars for the minibar, to avoid failing if gf is installed in a directory
which is not in the $PATH.
2011-10-14 19:34:55 +00:00
hallgren
44d1a5a9f7 Improvements of "gf -server" mode and related setup
"gf -server" mode now contains everything needed to run the minibar and
the grammar editor (including example-based grammar writing).

The Setup.hs script installs the required files where gf -server can find them.
These files have been moved to a new directory: src/www.

The separate server program pgf-http is now obsolete.
2011-10-12 17:03:54 +00:00