Hello Paddy,
> To solve this, I could commit every new Clash install to the GIT stage
> and make it the current compiler. Maybe there are also other
> solutions. I'd appreciate if you could share your experiences.
We maintain so-called "Clash starter projects" which are suitable for
putting under Git control and that build a Clash installation as part of
building such a project. Using Cabal version constraints, you can choose
which version of Clash that is as part of your commit, so that seems to
match your requirements. I believe Stack works a little differently than
Cabal in that respect, and one of my colleagues should know that. Feel
free to ask if you want to do that and don't know how.
For the Arrow DECA development kit, we have a starter project that uses
Tcl inside Quartus to parse part of the Clash manifest files and then
adds all Clash-generated files (*.vhdl, *.qsys and *.sdc) to the Quartus
project. The Quartus files live in their own directory distinct from the
Clash-generated files (so no -fclash-clean woes). It should be
straightforward to adapt this to the dev kit you're using, I hope.
You can use either Stack or Cabal. Stack users can simply type:
$ stack new my-clash-project clash-lang/deca
and they get a new project named "my-clash-project" initialized with the
starter project.
The starter projects are maintained at
https://github.com/clash-lang/clash-starters
and the DECA one is in the subdir
https://github.com/clash-lang/clash-starters/tree/main/deca
*However*, this Git repository is not such a starter project itself.
Don't check out this Git repository to create a new project. To get a
starter project, you either use Stack as shown above which automatically
picks it up on its own, or you extract a .tar.gz (or .zip) file found at
the root of that Git clash-starters repository if you want to use Cabal.
The compiled Clash installation will be stored inside the project, which
takes some extra space, and if we release a new stable version every one
of your projects will need to recompile, nothing's shared. But that is
offset by a nice user experience otherwise.
HTH,
Peter.