Commit Graph

76 Commits

Author SHA1 Message Date
Stepan Koltsov
8d7d13dd41
Insert @generated markers into generated launcher scripts (#1586)
Took me some time to figure out that `build/exec/idris2` is generated.
2021-06-28 16:44:33 +01:00
Edwin Brady
fc0e0f19d3 Use IDRIS2_CG for incremental library builds
This way there's no problem if chez isn't installed
2021-06-27 16:09:02 +01:00
Edwin Brady
94088bea80 Support for incremental compilation with Chez
This adds a new flag '--inc <backend>' which, if set, compiles all
modules incrementally, and for executables, links the incrementally
compiled modules rather than building the whole program.

Also, adds an environment variable IDRIS2_INC_CGS for providing a comma
separated list of backends to use for incremental builds.

Also, adds '--whole-program', which overrides incremental builds for an
executable.

Incremental builds are much faster if there's nothing to recompile, but
for the Chez backend, generate code which runs at about half the speed.

Currently only works for Chez - other backends ignore the flag.

Also, incremental building of an executable will only work if *all*
required modules have been built incrementally for the backend in use.
2021-06-27 15:40:23 +01:00
Edwin Brady
a0cfa28621 Update version numbers 2021-06-23 16:15:21 +01:00
claymager
b946ec0277
[ fix ] Create library dir if necessary (#1300) 2021-06-14 16:12:46 +01:00
Ruslan Feizerakhmanov
7aee7c9b7c
[ new ] --install-with-src; refactoring around FCs (#1450)
Why:

* To implement robust cross-project go-to-definition in LSP
  i.e you can jump to definition of any global name coming
  from library dependencies, as well as from the local project files.

What it does:

*  Modify `FC`s to carry `ModuleIdent` for .idr sources,
   file name for .ipkg sources or nothing for interactive runs.

*  Add `--install-with-src` to install the source code alongside
   the ttc binaries. The source is installed into the same directory
   as the corresponding ttc file. Installed sources are made read-only.

*  As we install the sources pinned to the related ttc files we gain
   the versioning of sources for free.
2021-06-05 12:53:22 +01:00
Kamil Shakirov
2e61779878 [ docs ] Build docs for the 'test' package 2021-05-27 11:12:44 +01:00
G. Allais
004cc45e9d
[ test ] cosmetic changes & retest capability (#1394)
* Banners for test pools
* Summary with the list of failing tests at the end
* Option to write the list of failing tests to a file
* Option to read the list of tests to run from a file
* Using these two latest features to add a new make target to rerun precisely the tests that failed last time
2021-05-11 09:46:21 +01:00
Matúš Tejiščák
4de7b2133a
[ new ] Add chez-sep codegen (#1359)
Co-authored-by: Johann Rudloff <johann@sinyax.net>
2021-05-11 08:20:19 +01:00
Edwin Brady
587f73a256 Make documentation from Makefile
The documentation is now also linked from
https://www.idris-lang.org/pages/documentation.html
and https://www.idris-lang.org/pages/idris-2-documentation.html
2021-05-01 17:09:25 +01:00
Johann Rudloff
68a5f1f1b7 Copy styles.css from support into generated docs/ folder 2021-04-26 22:45:14 +02:00
John Mager
738bc4331e Update PHONY description
- TARGET isn't phony
- distclean declared elsewhere
- Update with testenv, testenv-clean
2021-04-19 11:23:58 +01:00
John Mager
d0db61ca35 Add testenv-clean 2021-04-19 11:23:58 +01:00
John Mager
c5d2d18568 [ clean ] Revert some from (#1240)
Since `make test` and `make bootstrap-test` now use a different
approach, several changes no longer apply.
2021-04-19 11:23:58 +01:00
John Mager
9b81cb19d3 Set PREFIX for tests 2021-04-19 11:23:58 +01:00
John Mager
b0242b2608 [ refactor ] Introduce NAME_VERSION variable 2021-04-19 11:23:58 +01:00
John Mager
1528583e08 [ clean ] Set PREFIX for bootstrap-test 2021-04-19 11:23:58 +01:00
John Mager
c3ff63ae5f Use absolute path to pass around Idris executable
Rather than tracking how far we are from the project root in the various
Makefile commands, it's much easier to reference the build target with
with an absolute path.
2021-04-11 20:52:36 +01:00
Mathew Polzin
178f26ec17
[ re #1162 ] Test without install (#1240)
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2021-04-05 11:27:56 +01:00
Edwin Brady
922074b0aa Add heuristic for when to normalise metavars
If they're big, they take a long time to instantiate, and if they
consist of a lot of functions, chances are that normalising them will
make them much smaller. This significantly improves type checking
performance for some programs with lots of type level computation going
on.

The threshold is set with %nf_metavar_threshold, but the default value
of 50 is probably fine. Set it to 0 to always normalise metavar
solutions, or something higher than 1000 to essentially never do it.
It's roughly a count of nodes in the typechecked syntax tree under the
first function application.
2021-04-04 15:56:15 +01:00
Ben Hormann
b1c7f75bbe [ fix ] bootstrap-stage2: IDRIS2_CG not set correctly 2021-03-26 15:45:06 +00:00
Mathew Polzin
06586d401a
Add a test package to the Idris 2 project (#1162) 2021-03-09 18:27:05 +00:00
GustavoMF31
7f495999bd
Make :typeat a useful command (#998)
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2021-02-05 16:15:40 +00:00
G. Allais
365e9a559c
[ test ] check IDRIS2 exists & is executable (#1021) 2021-02-04 16:10:57 +00:00
G. Allais
d709082fc7
[ fix #835 ] Keep names of implicit variables in with clauses (#1017) 2021-02-03 16:16:11 +00:00
Fabián Heredia Montiel
b81b390f20 Refactor bootstrap and CI action to speedup CI 2021-01-27 20:39:42 +00:00
Stiopa Koltsov
0e0b45e666 Mark IdrisPaths.idr @generated 2021-01-21 12:41:49 +00:00
Stiopa Koltsov
4e94298acb Simpler idris2-boot.ss generation
Trying to untangle idris2 bootstrap build, this will make it a
little simpler.
2021-01-19 20:54:44 +00:00
Stiopa Koltsov
b214cd58bd Print warning make test does not invoke make
Took some time for me to figure that out.
2021-01-16 10:00:46 +00:00
Edwin Brady
b35268b774 Update version numbers and bootstrap code 2021-01-13 12:46:06 +00:00
Edwin Brady
a76a1322eb Initial merge of reference counting C back end
Written by Volkmar Frinken (@vfrinken). This is intended as a
lightweight (i.e. minimal dependencies) code generator that can be
ported to multiple platforms, especially those with memory constraints.

It shouldn't be expected to be anywhere near as fast as the Scheme back
end, for lots of reasons. The main goal is portability.
2020-10-11 15:05:00 +01:00
Guillaume ALLAIS
b449e5ae8a [ fix #361 ] Use the default totality by default 2020-08-31 16:42:53 +01:00
Edwin Brady
0d81e3b59c Version increment 2020-08-16 12:06:38 +01:00
Denis Buzdalov
0119c217c9 Putting .ipkg mentioning to a variable and making names symmetrical. 2020-07-21 11:05:47 +01:00
Rui Barreiro
68c9990c8a moved big foreign functions to support and added outputDir 2020-07-06 16:58:02 +01:00
Christian Rasmussen
24bb84fcf5 Avoid traversing all Idris modules twice when installing 2020-06-28 21:36:48 +02:00
Edwin Brady
33957c4328 contrib needs to be built before network now 2020-06-25 12:12:20 +01:00
Edwin Brady
9ea4108c82 Also need contrib for the tests 2020-06-23 23:29:28 +01:00
Kamil Shakirov
9e42eb1be1 Fix 'install-api' makefile target
When building from a clean state `src/IdrisPaths.idr` must be generated first
before installing `idris2api.ipkg`.
2020-06-18 17:19:48 +06:00
Kamil Shakirov
52cdc7a26f Do not supply already exported variables to bootstrap scripts 2020-06-17 18:22:09 +06:00
Kamil Shakirov
fdb106a787 Pass MAKE variable 2020-06-17 15:48:18 +06:00
wchresta
788e6943a4 Split bootstrap into separate build and test stage
* Refactor bootstrap and bootstrap-rkt scripts
* Move the execution of the test phase after bootstrapping from bootstrap
  scripts into the Makefile. This allows separate execution of build
  and test seperately.
* Solves #125
2020-05-25 00:59:12 -04:00
Edwin Brady
0d5c709fc6 Add IDRIS2_CG environment variable
This allows setting code generators globally, which makes building with
alternative back ends smoother.
2020-05-23 19:03:56 +01:00
Edwin Brady
e7d27bc46a Fix IDRIS2_BOOT_PATH
I don't know why I removed network, it's still needed...
2020-05-23 17:32:52 +01:00
Edwin Brady
e17f66244a Move network support to libidris2_support
This makes the support stuff much simpler, and also makes the racket
bootstrap process easier
2020-05-23 15:52:33 +01:00
Edwin Brady
e3df2d59b0 Tidy up Racket CG
Instead of dumping the required dynamic libraries in the working
directly, where the executable won't necessarily find them, take the
same approach as the Chez backend and create a subdirectory for the
required runtime files and use a shell script to start up with the right
library paths.
2020-05-23 15:18:18 +01:00
Niklas Larsson
dbffcce112 Merge bootstrap for unix and windows 2020-05-23 14:51:00 +02:00
Niklas Larsson
61ec7757ed
Merge pull request #107 from melted/fix_win_tests
Fix windows tests
2020-05-23 13:08:41 +02:00
Edwin Brady
65e3f63598 Make sure literals are normalise on LHS
The hack (optimisation?) to normalise integer literals when below some
threshold is fine on the RHS, but on the LHS causes problems since we
need them in normal form for pattern matching. Fixes #112
2020-05-23 11:48:15 +01:00
Niklas Larsson
04d6e5ee68 Allow errors when installing cmd file
It will not be present on a fresh bootstrap yet.
2020-05-23 11:08:25 +02:00