-
Notifications
You must be signed in to change notification settings - Fork 123
haskell-cabal-sandboxing #1698
haskell-cabal-sandboxing #1698
Conversation
Thank you for creating this PR! Seems like the build server went amok (many "Build triggered. sha1 is merged." messages). @sanssecours Any idea what went wrong with the build server? |
Well i don't feel like deleting all the comments, lets see if it behaves better now, then we can merge it i think. |
…setup logic for older cabal versions
ac06dfe
to
0ff004f
Compare
@markus2330 Any idea about the glib issue? https://travis-ci.org/ElektraInitiative/libelektra/jobs/329037050 I'm not sure how it'd be related to my changes (if it even is). |
It is quite certain that all errors that the build server reports stem from the respective PRs because we do not merge PRs that break builds anymore. What could be the reason is that glib bindings were wrongly (?) removed before and this PR now includes them. |
Thanks! You are totally right, i've overlooked that and mistakenly changed the bindings to all by default, reverted the respective travis settings change. We shouldn't deal with glib in this PR its unrelated. |
…t required), remove nonexistent plugin
looks good finally, anything left to do @markus2330 ? i'd love to have this merged so i can proceed with my next PRs which are based on this. |
Great job! Thank you for your endurance. |
Purpose
Before this PR the haskell build process registered each build of the bindings to the global package db so that plugins can compile against the current version in all cases, overriding whatever is there. This is bad since it modifies the global system environment even when you only want to build elektra without installing it. The downside of this is that it obviously breaks the globally registered haskell bindings, like it happens when you do an actual installation and not only a compilation.
This PR makes use of cabal sandboxes. The advantage is that it registers each build of the haskell bindings only to their sandbox inside our build directory, and uses this sandbox for the compilation of the haskell plugins. Therefore it is not necessary to pollute the global haskell package database when one only builds the plugin without wanting to install it.
To give another example why its useful, i use the bindings for my type system experiments too, and each time i recompiled elektra for whatsoever purpose the re-registering of the newly built bindings broke my typesystem programs somehow...
Checklist
@markus2330 Its only an internal change so its not necessary to document anything. lets see if the build still passes.
@sanssecours this is relevant for caching. Since the intentation of a sandbox is to provide an environment independent of the global one, it installs hspec and QuickCheck into the sandbox. So the sandbox directory should be cached too, at least the one at
src/bindings/haskell/.cabal-sandbox