Open gallais opened 4 years ago
It is possible to set up multiple versions of the Idris 2 executable by changing the makefile/config files. I am not sure if this is what you had in mind. If not, I think the following can be useful to others anyway.
On my computer I have set up two copies of Idris 2:
I have a stable version of idris2
(the master
branch with no changes) that I update maybe once a week. And I have a development version called idris2dev
.
To set up the development version:
PREFIX
in config.mk
to $(HOME)/.idris2dev
.NAME
in Makefile
to idris2dev
.executable
in idris2.ipkg
to idris2dev
.IDRIS2_BOOT
in Makefile
to point to the Idris 2 executable that you want to build from. In the case of idris2dev
I want to use idris2
(so no changes are necessary).$(HOME)/.idris2dev/bin
to your $PATH
to make idris2dev
easily accessible.In the case of #638 I needed 3 copies of Idris 2 to be able to reproduce it:
idris2
— Builds from bootstrapidris2dev
— Builds using idris2
idris2dev-2
— Builds using idris2dev
In order to make it build I did the following:
I needed to add toVect
from libs/base/Data/Vect.idr
to the idris2
copy.
Both idris2dev
and idris2dev-2
checked out #638 (git fetch origin pull/638/head:pr-638 && git checkout pr-638
).
To make idris2dev
and idris2dev-2
compile, I had make the following change to definedInBlock,defName
in src/TTImp/TTImp.idr
:
defName : List String -> ImpDecl -> List Name
Now I could reproduce the error from #632 using the idris2dev-2
executable.
It is still a bit inconvenient as changes to idris2dev
also needs to go into idris2dev-2
, but it should be better than building from bootstrap every time.
It would be nice to be able to specify a suffix to attach to the Idris2 executable to be able to install multiple versions of the development version of Idris2.
At the moment installing a broken version means we are forced to recompile a stable one from scratch or use the slower bootstrap build which is really time consuming.
One tricky aspect: all of these versions may be using different TTC format which means we would need to have multiple versions of the libs in
~/.idris2
.