Closed christopherreay closed 7 years ago
holochain.system.install holochain.system.uninstall
d5103dfb63c44b6ed40b0ed0a16b1e46fc9f0403
900a14eac41de0bb3a6ebf4895284090fc1f3811
Bibliography:
holochain.app.init
921f5bdcec39046637aa160c3957d0246ff8e64e
9149af1acae7e67b4afad792caa19cd3aea9a860
Bibliography
holochain.app.testScenario
run multiNode testing in the current Holochain App
start moving scripts over from the "top down" e7f960708a45f50a9bb2bbdc055c30a11652be9e d5df0ceff15c0a699e0e7ff5629e5389642b95d4
add runCluster and configuration for logging etc 349af60a7edafa5d9eea9298e1665249e2be8e49
docker-compose is being called with correct arguments 903faaa1351ddcea90e5479e65d1c3b6c1539da4
make all the Dockerfile's available to the docker compose 2605bc4ea3f027987e84946bf29e9243a83fbc44
copy the container scripts over to metacurrency/holochain 0a058866fe0f4ae441fa4392b4f65357bd5a9486 check the commit message for instructions on the next bit
Bibliography
I'm a bit unclear on what this issue is implementing. Are you working on creating an easy packaging system for installing holochain apps?
If so I have a few thoughts, but I'll save them for if you say yes.
Ive updated the description. Is it clearer now? @timotree3 please check out #174 for the package management stuff
Not really. 😐
@timotree3 Im sorry. You're right. ive added a bit more description all through. Full end user docs comming tomorrow
holochain.system.bashCompletion
called by .bashrc to add holochain bash completion to shell
3697d8e1987e45388a052ffec8d1dcd35a131e54 810e40305d2997a577e0cf60ca80c2f6569abbd4
TODO: add to .gitignore on holochain.app.init
@zippy merged and basic documentation here https://github.com/metacurrency/holochain/wiki/Install-Holochain-on-nix
I merged the stuff in install-Holochain-on-nix into https://github.com/metacurrency/holochain/wiki/Holochain-App-Development-Introduction
Convert these bash scripts to their own go program
So I woke up this morning thinking that to go program should be hcdev
and we should move the seed
and test
commands from the regular hc
into it too..
work on this (hcdev) happening in: https://github.com/metacurrency/holochain/tree/204-hcdev-cmd
RIght, so I am starting to implment calls to scripts in hcdev
First thing is a script for Core development that allows people to easliy compile and build the local source onto their system
@zippy so in the branch: testingCoreBranchesScript, Ive now gutted the entire of hcdev and hcdev_test... in the current master, running `go test" in cmd/hcdev/ fails with the output I sent you. Is this "supposed to happen" because of some pathing or something?
Irrespective of that, the Sprintf from this test here isnt functioning from the test in this commit: cdbfd68f72d2c7c95445862dda1f36b89a6c2d4e [ed: yah, since "SPrintf" creates a String, and isnt "Printf", pal)
func TestLocationOfExecutable(t *testing.T) {
Convey("should print the location of the executable", t, func() {
location := LocationOfExecutable()
fmt.Sprintf("locationOfExecutable: %v", location)
So(location, ShouldEqual, "something")
})
}
christopher@holochain:~/dev.bin2hcdcev/cmd/hcdev$ go test
x
Failures:
* /home/christopher/dev.bin2hcdcev/cmd/hcdev/hcdev_test.go
Line 22:
Expected: 'something'
Actual: '/tmp/go-build892150939/_/home/christopher/dev.bin2hcdcev/cmd/hcdev/_test'
(Should be equal)
1 total assertion
--- FAIL: TestLocationOfExecutable (0.00s)
FAIL
exit status 1
FAIL _/home/christopher/dev.bin2hcdcev/cmd/hcdev 0.007s
Ok so to be able to use go test
you have to first do a gx-go rewrite
(or make work
which is the same thing) from the base level. Then go test from inside cmd/hc
and cmd/hcdev
should work.
@zippy thanks. Oh yeah. Thats not something that happens in dockerContainers. Cool that make life easier. Aye, because the import names are changed to ipfs hashes init
resulting in an installation of the current checked out branch you are sitting in
there should probably be a "reset" command to go back to master And loads of other stuff, but hey. .Its versioning jim
hcdev app ini
end up with .hc directory with an App name in it
hcdev app testScenario --scenario=scenarioName
ends up with loads of colorful output on the screen and a file in logs/holochain/
looking pretty good. A few things:
hcdev scenario
vs hcdev app scenario
vs hcdev app testScenario
I just dont like writing things that people can only understand onces they already are part of your ecosystem.ok so I just tried this: hcdev core branch install
and I got:
HC: core.branch.install: installing from: /home/eric/go/src/github.com/metacurrency/holochain
this will remove the existing content at /home/eric/go/src/github.com/metacurrency/holochain (y/N) y
/home/eric/go/src/github.com/metacurrency/holochain/bin/holochain.core.testing.branch: line 13: /home/eric/go/src/github.com/metacurrency/holochain/bin/holochain.tools.confirm: No such file or directory
HC: exiting
This left things in a bad state because my directory got emptied, but not completely deleted which meant that a go get -d github.com/metacurrency/holochain
failed until I manually went and removed the directory!
Actually the script holochain.core.testing.branch isnt very well written. I was a bit swamped in addressing the go side of it to bother properly with the script.
Ill put as many checks as possible in the go code before runing the scripts. But most of the scripts are very defensively written. I think all of them apart from that one would fail immediately on running
why should you have to run hcdev core branch install
from anywhere in particular. It seems like the context is global and singular, so it should just happen to GOPATH no matter where you run that command from. The app parts of the command are contextual so it makes sense that they would assume the current directory as the context (or, perhaps we also add a --path option so you can specify it explicity)
why should you have to run hcdev core branch install from anywhere in particular
because it doesnt checkout a branch or anything like that, it just copies the local source files over the GOPATH version of metacurrency/holochain, and runs make etc
. It seems like the context is global singular, so it should just happen to GOPATH no matter where you run that command from.
I dont think that is from the same point of view as that thing is for from my point of view :)
The app parts of the command are contextual so it makes sense that they would assume the current directory as the context (or, perhaps we also add a --path option so you can specify it explicity)
thats exactly how it works now
There's no reason why it couldnt just use git to download a branch over the top of $GOPATH and then install. I can do that. Obvs thats what I was thinking, I was just working on the interface between go and the scripts.
Also, it was quite convenient to be able to just compile my current version without going via github, but maybe that can be another command with a better name
ok, got it... yah currently that script does this check:
[ ! -f ./bin/holochain.system.checkInstalled ] && { echo "HC: not in a holochain core directory. exitting" && exit 1 ; }
which I assume is to see if the current directory is a holochain app, and then tries to copy that app into the GOPATH? :-P
regarding: "I just dont like writing things that people can only understand onces they already are part of your ecosystem." I think maybe I just need to be retrained or something, because for me meaning comes from compression. And when things get too long I loose the meaning. I find it much more confusing and hard to work with. I get that verbose stuff is easier to learn about, but I'm interested in what's easiest to work with. And I think I'm not usual in that regard. Fortunately "github.com/urfave/cli" allows for aliases for commands, so maybe we can come up with something that will satisfy both of us...
Id also rename hc to holochain
and have hcdev as a subcommand so
holochain development app testScenario SCENARIONAME
or
holochain developer app testScenario SCENARIONAME
yah, I imagine we can do that I have a pretty hands off approach to my sensory input, i let it be a little blury
Arg! That would drive me totally nuts!
what about
hc dapp scenario SCENARIONAME
Thats cool
Sadly im half joking. lets just implement them all, I cant think of a reason not to
I don't see the difference between that and:
hcdev scenario SCENARIONAME
they seem totally equivalent.
one of them has the word "app" in it, which ties in with all the documentation the otherone clearly shows psychotic, sociopathic and possibly demented tendencies
ah, now I understand. That makes it all so clear!
so hc
== holochain
is the primary namespace
dapp
and dcore
both compile nicely to both
which is nice
and scenario
in the context of holochain dapp
is sufficiently expressive
if you must know :)
basic end user docs for this issue: https://github.com/metacurrency/holochain/wiki/Install-Holochain-on-nix
At the moment, the holochain bin scripts are inside the metacurrency/holochain github repo. Once that repo is cloned onto the host machine, the scripts should allow the user to easily "install" holochain on the host system, and then manage their Holochain Core (on docker) installation, and manage their Holochain App development process
This will be implemented as bash scripts, and with reference also to https://github.com/metacurrency/holochain/wiki/Holochain-Development-Introduction
part of #174
basically be like: