Perl 6 - the future is here, just unevenly distributed

IRC log for #darcs, 2014-08-26

| Channels | #darcs index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:17 sm quick list of commits in 2.8.5 FYI: https://gist.githubusercontent.com/simonmichael/f27e285d205dfd01f8e6/raw/0dc9f86d84454fa16beabae1b260845da8fb00c8/gistfile1.txt
00:47 Rastus_Vernon joined #darcs
03:38 alexei joined #darcs
06:10 lelit joined #darcs
11:04 mizu_no_oto joined #darcs
13:41 mizu_no_oto joined #darcs
16:58 dolio joined #darcs
17:03 alexei joined #darcs
18:58 joelteon joined #darcs
18:59 joelteon does tentative_pristine change every time a patch is applied?
19:02 Heffalump maybe, but it's a throwaway file - it's used in the middle of darcs operations, but has no long-term meaning even if it isn't cleaned up
19:08 joelteon ok
19:13 Heffalump the canonical detection for a change would be _darcs/inventory
19:13 Heffalump sorry, hashed_inventory
19:14 Heffalump but you could also set up a post-hook or something like that
19:14 joelteon ok, i'm trying to pick something that will automatically be used as a "latest-commit" tag
19:14 joelteon and will change every time a patch is applied
19:14 joelteon can i use the "pristine" inside hashed_inventory?
19:25 Heffalump that wouldn't change if the patch didn't change the contents of the repo
19:25 joelteon that's what i'm looking for
19:25 Heffalump then yes, it's a hash of the repo contents, rather than its history
19:26 joelteon cool, thanks
19:55 Heffalump joelteon: btw, looking for the ./ entry in 'darcs show pristine' means you can get the hash with darcs rather than by grubbing in the internals. No idea which will actually last longer though :-)
19:56 joelteon nah i need something in the filesystem
19:57 Heffalump ah, because your derivation needs to use it as an input directly?
19:57 joelteon yeah
19:57 joelteon oh, yeah, it's all about nix
19:57 Heffalump can you just take one line of a file then?
19:57 joelteon i'm just taking a substring of hashed_inventory at the moment
19:58 joelteon i'm trying to fulfill these six requirements for reproducible builds with continuous deployment
19:58 joelteon https://gist.github.com/joelteon/3f7a498d56c6eb923ca8
20:00 Heffalump doesn't looking in hashed_inventory violate "Hydra builds don't rely on source control metadata" ?
20:00 joelteon reading hashed_inventory would be dev-only
20:00 Heffalump what would hydra do?
20:00 joelteon but actually, i see your point
20:00 joelteon i don't know how hydra would decide on the source
20:01 joelteon the reason i put that there is because hydra removes source control metadata before running builds
20:01 Heffalump can you explain exactly what you mean about reproducible builds with continuous deployment? I sort of see but not exactly.
20:01 joelteon ok so every deployment system i've used before nix was basically
20:01 joelteon do some changes, push them to github
20:01 joelteon cap deploy
20:01 joelteon or you can even do scp with capistrano, actually
20:02 joelteon so the only work you have to do to run a deploy is "cap deploy"
20:02 joelteon so obviously capistrano is way less picky about the consistency of its dependencies than nix is
20:02 joelteon if I use "src = ./." anywhere in my derivation, that means it's not reproducible *anywhere* else
20:02 joelteon hydra, another person's machine, etc.
20:03 joelteon if I use src = fetchdarcs, I have to push every time I want to test anything on my machine
20:03 Heffalump you mean the external dependencies of the repository?
20:03 joelteon yeah
20:03 joelteon so if I use src = ./., any time any file in the source tree is changed, the app gets rebuilt even if nothing in the app source has meaningfully changed
20:03 joelteon like if I accidentally leave a .DS_Store behind
20:03 Heffalump I'm not too familiar with the semantics of nix expressions (though I want to learn) so you'll need to explain how src = is interpreted
20:04 joelteon src is what the standard builder unpacks before it runs the build
20:04 joelteon so with "src = ./.", the full contents of . will be hashed and stored in the nix store
20:04 Heffalump I see, so if someone else doesn't have your local untracked files, they can't use the derivation.
20:04 joelteon with "src = fetchdarcs { some stuff };", it'll fetch a rev from wherever, using darcs
20:04 joelteon but you have to give it a sha256 hash
20:05 Heffalump and fetchdarcs is special to nix somehow?
20:05 joelteon fetchdarcs, fetchgit, fetchurl, etc. are all special builders in nix
20:05 Heffalump so shouldn't there be (i.e. you could add) a localdarcs builder?
20:05 joelteon they copy a repo, put it in the store, and you can use the result as your src
20:05 Heffalump it seems logically consistent with having a remote fetching builder
20:06 joelteon sure, and that's what I'm trying to do
20:06 joelteon kind of.
20:06 joelteon right now, I have a derivation that is almost totally environment-independent
20:06 Heffalump when you say "non-tracked changes" don't force a rebuild, do you include changes to files that are under version control, but where you haven't recorded a patch yet?
20:06 joelteon it copies PWD into tmp, runs 'darcs dist' there, then puts the resultant tarball in the store
20:06 joelteon yeah
20:06 joelteon 'darcs dist' makes a tarball out of the current tracked state of the repo right?
20:07 Heffalump I think so :-)
20:07 joelteon ok
20:07 Heffalump why do you need to copy PWD into tmp first?
20:07 joelteon because nix builders always run in /tmp
20:07 joelteon you don't have a choice in the matter
20:07 Heffalump yes, the documentation says "the recorded state of the working tree"
20:07 joelteon so what i'm doing right now is passing the dirname of ./ to the builder
20:07 Heffalump so it definitely is just the current tracked state
20:07 joelteon but then, the problem is
20:07 joelteon on my machine, that's called /Users/joelteon/.dev/Haskell/webapp
20:08 joelteon on someone else's, it'll be called something else
20:08 Heffalump oh, I see, but the inputs to the builder also become part of the derivation?
20:08 joelteon and the tarball's hash will be different
20:08 joelteon yeah, the hash is dependent on every input
20:08 Heffalump so fetchdarcs <some known stuff> is ok because it's expected to be portable
20:08 joelteon right
20:08 Heffalump but localdarcs `pwd` isn't good
20:08 joelteon right
20:08 joelteon that's #6 on the requirements list
20:08 joelteon i've been able to get 1, 2, 3, and 5, but not 4 or 6
20:09 joelteon my other alternative is to do a post-patch hook that changes a hash inside a "fetchdarcs" block
20:09 joelteon which kinda sucks
20:09 joelteon and I feel like it really shouldn't be necessary, but maybe it is
20:09 Heffalump would you expect to be able to write an expression that points to some other directory than pwd?
20:10 joelteon what do you mean, like a different directory for src?
20:10 Heffalump well, one way you could do this is by defining localdarcs to always start from ./
20:10 Heffalump so then it wouldn't become part of the hash, because it'd be internal to the builder definition
20:10 joelteon oh, you mean the current directory for the builder?
20:11 Heffalump yes
20:11 Heffalump oh, is that the wrong place?
20:11 joelteon no, the builder can't choose where it runs
20:11 joelteon the builder is somewhere deep within /tmp
20:11 Heffalump so without ./ being a parameter it can't know where it should read
20:11 joelteon right
20:11 joelteon there's no reason it would know what $PWD was
20:12 Heffalump is it fundamental to nix that it has to hash all the inputs strings to a builder? It seems like hashing the contents it actually builds would be enough.
20:12 joelteon i've asked that, but nobody in #nixos actually has answered the question yet
20:13 Heffalump I guess we should have had this discussion there :-)
20:13 joelteon yeah let's do it there
20:13 joelteon i asked again
20:14 joelteon Heffalump: so the other alternative is to do what nix channels do and write "fake" derivations that determine their own output directory
20:15 Heffalump I see, derivations that aren't actually created from an expression?
20:16 joelteon well, they are, but they don't contain any meaningful data, they just have a hash
20:16 * Heffalump still doesn't have an intuitive understanding of nix
20:16 joelteon so when nix tries to install them, it looks on hydra first
20:16 joelteon hydra has a package with that hash so nix substitutes it
20:16 joelteon I don't know if you can combine fixed output with a derivation that actually performs a build
22:49 ilbot3 joined #darcs
22:49 Topic for #darcs is now http://darcs.net/ | logs: http://irclog.perlgeek.de/darcs/ | darcs 2.8.5 is out http://darcs.net/Releases/2.8
23:31 gh_ joined #darcs
23:32 gh_ the default-mta recommendation of the darcs debian/ubuntu package is a pain in the neck
23:33 gh_ how do we make it leave?
23:33 gh_ by pain in the neck I mean it exposes users to mta configuration menus when installing darcs
23:39 joelteon joined #darcs
23:42 joelteon joined #darcs
23:54 sm gh_: I guess because the darcs debian package depends on a mail client for darcs send ?
23:54 sm maybe the packager is here

| Channels | #darcs index | Today | | Search | Google Search | Plain-Text | summary