summaryrefslogtreecommitdiff
path: root/doc/forum/running_propellor_as_a_library
diff options
context:
space:
mode:
Diffstat (limited to 'doc/forum/running_propellor_as_a_library')
-rw-r--r--doc/forum/running_propellor_as_a_library/comment_1_a7b8279508cd68e8cfbba238178a7643._comment49
-rw-r--r--doc/forum/running_propellor_as_a_library/comment_2_1174504655ffaf7ebc507e915cc26c84._comment7
-rw-r--r--doc/forum/running_propellor_as_a_library/comment_3_3e3961587228eb030ff8f704c71b00a5._comment8
-rw-r--r--doc/forum/running_propellor_as_a_library/comment_4_c5ec270ca7cb1b6ae66cd7b9dc4e4aac._comment11
-rw-r--r--doc/forum/running_propellor_as_a_library/comment_5_39c24e955e290f045b8f6d5b9ed9f688._comment36
5 files changed, 111 insertions, 0 deletions
diff --git a/doc/forum/running_propellor_as_a_library/comment_1_a7b8279508cd68e8cfbba238178a7643._comment b/doc/forum/running_propellor_as_a_library/comment_1_a7b8279508cd68e8cfbba238178a7643._comment
new file mode 100644
index 00000000..10188525
--- /dev/null
+++ b/doc/forum/running_propellor_as_a_library/comment_1_a7b8279508cd68e8cfbba238178a7643._comment
@@ -0,0 +1,49 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2015-05-27T15:24:07Z"
+ content="""
+The Utility.* modules are shared amoung several of my projects (git-annex,
+propeller, github-backup, ..), but I'm not really happy enough with them to
+make them a proper haskell library.
+
+For one thing, there's no unifying principle; it's just whatever bits of
+code I happened to write that were refactorable out of the main program. I
+don't want to end up with another MissingH like tarball library here.
+
+And for another thing, I don't think I want to commit to api stability, or
+even api versioning for all of that stuff.
+
+Some parts of it, I'm somewhat happier with, and hope to eventually break
+out into proper haskell libraries. For example, Utility.Scheduled is pretty
+good (and mostly re-exported from Propellor.Property.Scheduled anyway).
+
+OTOH, Utility.Process .. not happy with that at all from a design POV.
+I'd recommend you just use System.Process, or
+[Data.Streaming.Process](http://hackage.haskell.org/package/streaming-commons-0.1.12/docs/Data-Streaming-Process.html).
+Although there is the problem that `PROPELLOR_DEBUG` relies on
+Utility.Process adding calls to debugging functions, so you'd need to do that
+by hand.
+
+Maybe what makes sense is for some part of propellor to re-export qualified
+subsets of `Utility.*`, on a case-by-case basis as users find need for them.
+I counted the Utility imports inside Propellor.Property, they are:
+
+ 17 import Utility.SafeCommand
+ 8 import Utility.FileMode
+ 2 import Utility.Path
+ 2 import Utility.Env
+ 2 import Utility.DataUnits
+ 1 import Utility.ThreadScheduler
+ 1 import Utility.Scheduled
+ 1 import Utility.FileSystemEncoding
+ 1 import Utility.Applicative
+
+So, I'm inclined to have Propellor.Property.Cmd re-export Utility.SafeCommand,
+and leave it at that for now. It makes sense that propellor export a primitive
+that runs a command to a Bool, does any requested debug output, for use by the
+many Properties that involve running commands.
+
+(If you want to break out some part of Utility into a separate library
+and maintain it, I'd be ok with that too.)
+"""]]
diff --git a/doc/forum/running_propellor_as_a_library/comment_2_1174504655ffaf7ebc507e915cc26c84._comment b/doc/forum/running_propellor_as_a_library/comment_2_1174504655ffaf7ebc507e915cc26c84._comment
new file mode 100644
index 00000000..dd019d9d
--- /dev/null
+++ b/doc/forum/running_propellor_as_a_library/comment_2_1174504655ffaf7ebc507e915cc26c84._comment
@@ -0,0 +1,7 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 2"""
+ date="2015-05-27T16:40:29Z"
+ content="""
+Ok, I've made Propellor.Property.Cmd export most of Utility.SafeCommand.
+"""]]
diff --git a/doc/forum/running_propellor_as_a_library/comment_3_3e3961587228eb030ff8f704c71b00a5._comment b/doc/forum/running_propellor_as_a_library/comment_3_3e3961587228eb030ff8f704c71b00a5._comment
new file mode 100644
index 00000000..17f04c3b
--- /dev/null
+++ b/doc/forum/running_propellor_as_a_library/comment_3_3e3961587228eb030ff8f704c71b00a5._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="arnaud.oqube@c9b8c7ea33f1dea0b7a5485b86825c5bfa9efbf7"
+ nickname="arnaud.oqube"
+ subject="Thanks"
+ date="2015-05-27T19:05:19Z"
+ content="""
+... a lot for your reactivity! Actually that's fine because we use mostly `boolSystem` from `Utility.SafeCommand`. We also use `transcript` to retrieve output of a process. So you say it is better to use directly `System.Process` ?
+"""]]
diff --git a/doc/forum/running_propellor_as_a_library/comment_4_c5ec270ca7cb1b6ae66cd7b9dc4e4aac._comment b/doc/forum/running_propellor_as_a_library/comment_4_c5ec270ca7cb1b6ae66cd7b9dc4e4aac._comment
new file mode 100644
index 00000000..18b44482
--- /dev/null
+++ b/doc/forum/running_propellor_as_a_library/comment_4_c5ec270ca7cb1b6ae66cd7b9dc4e4aac._comment
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 4"""
+ date="2015-05-30T15:06:06Z"
+ content="""
+I have made Propellor.Property.Cmd re-export the wrapped createProcess
+that does debug logging.
+
+I can see how processTranscript would be useful. I'm on the fence about
+re-exporting that one.
+"""]]
diff --git a/doc/forum/running_propellor_as_a_library/comment_5_39c24e955e290f045b8f6d5b9ed9f688._comment b/doc/forum/running_propellor_as_a_library/comment_5_39c24e955e290f045b8f6d5b9ed9f688._comment
new file mode 100644
index 00000000..1787b6ab
--- /dev/null
+++ b/doc/forum/running_propellor_as_a_library/comment_5_39c24e955e290f045b8f6d5b9ed9f688._comment
@@ -0,0 +1,36 @@
+[[!comment format=mdwn
+ username="arnaud@30aba4d9f1742050874551d3ddc55ca8694809f8"
+ nickname="arnaud"
+ subject="Using propellor as a library breaks build"
+ date="2015-10-12T10:24:34Z"
+ content="""
+I am reviving that old thread because I upgraded my configuration to use recent propellor and moved some part of our system to use propellor as a library, and it failed building propellor on the remote configured host due to dependencies version conflict. Here is the output:
+
+ Resolving dependencaies...
+ In order, the following would bbe installed:
+ network-2.6.2.1 (new version)
+ transformers-0.4.3.0 (new version)
+ monads-tf-0.1.0.2 (new package)
+ MonadCatchIO-transfaormers-0.3.1.3 (new version)
+ mtl-2.2.1 (new version)
+ hslogger-1.2.9 (new version)
+ parsec-3.1.9 (new version)
+ regex-base-0.93.2 (reinstall) changes: mtl-2.1.2 -> 2.2.1
+ regex-posix-0.95.2 (reinsltall)
+ regex-compat-0.95.1 (reinstall)
+ MissingH-1.3.0.1 (new version)
+ transformers-compat-0.4.0.4 (new package)
+ exceptions-0.8.0.2 (new version):
+ propellor-2.7.3 (new package)
+ The following packages are likely to be broken by the reinstalls:
+ MissingH-1.2.0.0
+ Use --force-reinstalls if you want to install anyway.
+ Resolving dependencies...
+ Configuring prod-0.0.1...
+ cabal: At least the following dependencies are missing:
+ propellor ==2.7.3
+ sh: 1: ./propellor: not found
+
+
+Am I missing something?
+"""]]