drakonis_ has quit [Read error: Connection reset by peer]
drakonis has joined #nixos-dev
ixxie has quit [Ping timeout: 245 seconds]
drakonis_ has joined #nixos-dev
drakonis has quit [Ping timeout: 268 seconds]
drakonis has joined #nixos-dev
drakonis_ has quit [Ping timeout: 268 seconds]
obadz has quit [Ping timeout: 268 seconds]
obadz has joined #nixos-dev
drakonis_ has joined #nixos-dev
drakonis has quit [Ping timeout: 252 seconds]
drakonis has joined #nixos-dev
drakonis_ has quit [Ping timeout: 264 seconds]
drakonis_ has joined #nixos-dev
drakonis has quit [Ping timeout: 264 seconds]
phreedom has quit [Ping timeout: 260 seconds]
orivej has quit [Quit: orivej]
orivej has joined #nixos-dev
orivej has quit [Read error: Connection reset by peer]
orivej has joined #nixos-dev
drakonis has joined #nixos-dev
phreedom has joined #nixos-dev
ixxie has joined #nixos-dev
drakonis1 has joined #nixos-dev
drakonis has quit [Quit: WeeChat 2.4]
drakonis_ has quit [Ping timeout: 250 seconds]
drakonis has joined #nixos-dev
drakonis has quit [Read error: Connection reset by peer]
drakonis has joined #nixos-dev
drakonis1 has quit [Ping timeout: 272 seconds]
sogatori has quit [Remote host closed the connection]
drakonis_ has joined #nixos-dev
jtojnar has quit [Ping timeout: 245 seconds]
drakonis1 has joined #nixos-dev
drakonis has quit [Ping timeout: 250 seconds]
drakonis1 has quit [Quit: WeeChat 2.4]
<flokli>
LnL: saw https://github.com/NixOS/nix/pull/2779, which changed some of the exit codes during build. While bisecting something earlier today, thought it might be a good idea if nix could end with exit code 125 if a dependency failed to build, but other exit codes if the "leaf" derivation failed to build. exit code 125 instructs git to skip that commit while inside a "git bisect run"
<{^_^}>
nix#2779 (by LnL7, 16 weeks ago, merged): build: add exit code for hash and check mismatches
drakonis has joined #nixos-dev
<flokli>
this idea is now of course conflicting with the changes done there. What do you think about it?
<flokli>
also cc aszlig
drakonis1 has joined #nixos-dev
drakonis2 has joined #nixos-dev
<LnL>
flokli: why not use another bit to mark that?
drakonis_ has quit [Ping timeout: 272 seconds]
<flokli>
because then you'd still need to juggle around bits to be able to use it inside git bisect
<LnL>
then it makes everything else useless
<infinisil>
I think the standard nix commands aren't very useful for bisecting anyways. I've been thinking of making a nix-bisect script that does it in a better way
drakonis1 has quit [Ping timeout: 276 seconds]
<LnL>
adding a bit for it does mean all the current exit codes will break 90% of the time so they could be reshuffled to make the bisect case easier
<infinisil>
With optimizations like: Query hydra directly for whether a path exists, skip uncached paths in a first run, try to avoid big rebuilds, ignore commits that don't change any paths that can influence what you're currently bisecting
<flokli>
LnL: the return codes so far weren't documented at all, and are not yet in any release ;-)
<LnL>
well ofborg uses them
<LnL>
the new ones are not, so those are fine to change
<gchristensen>
yeah ,things use the released ones even if they're not documented
drakonis has quit [Ping timeout: 250 seconds]
<LnL>
changing them might be fine, I just avoided it since it wasn't necessary
justanotheruser has joined #nixos-dev
<gchristensen>
probably shouldn't change them :)
drakonis has joined #nixos-dev
<infinisil>
Hm, hydra doesn't provide an API for search does it?
<gchristensen>
what are you wanting to do?
<gchristensen>
(I don't know)
<infinisil>
I'm looking into building a nix-bisect script, and if I could search for outPath's in hydra, it could fail early when hydra failed building it
<gchristensen>
ah
<gchristensen>
does hydra upload logs of failed builds?
<infinisil>
Well they're viewable in the web interface, so yeah
<gchristensen>
I mean to the binary cache
<infinisil>
Ah no idea
<infinisil>
Would I have to live in shame if I used web scraping to do the store path search?
<timokau[m]>
infinisil: had the exact same idea a while ago! I have a half-working nix-bixect python script lying around that I keep meaning to clean up and publish
ciil has quit [Quit: Lost terminal]
<gchristensen>
yup it does
<infinisil>
timokau[m]: Oh neat
<infinisil>
timokau[m]: Right now I'm just collecting ideas as to what it should all do, would be interesting to see yours
<timokau[m]>
infinisil: I'll throw the current version on github, not sure how useful it is
<gchristensen>
infinisil: I have a solution, MUCH faster than search.
<timokau[m]>
There's a `master` and a `master2` branch for some reason, pretty sure `master2` has the latest features and `master` was an unfinished attempt at cleanup
<infinisil>
Awesome!
<infinisil>
I'll use it for inspiration
<gchristensen>
although you will find some confusing things
<infinisil>
(I couldn't extend it as I'm a noob in python)
<gchristensen>
like the reason ...ghc-8.6.5.drv failed is not listed in that log
<infinisil>
gchristensen: Oh darn, it's cut off right where the interesting bits would be
<timokau[m]>
Main features in my view: (1) detecting failure reason and skipping on unrelated failures, preferably skipping ranges. Skipping ranges is hard to do with normal git-bisect though. (2) cherry-pick patches only when needed (3) ability do avoid mass-rebuilds, though its hard to define mass-rebuild
<gchristensen>
infinisil: the reason is that build *passed*
<gchristensen>
infinisil: but was too large
<timokau[m]>
Oh and building dependencies first, skipping if that fails
<infinisil>
The joys of dynamically typed languages :)
<infinisil>
(no offense)
<timokau[m]>
Probably didn't notice because I always used the "skip" variant and pythons dynamic typing makes it easy to never discover some errors
<averell>
(to the "typed" part)
<timokau[m]>
Yeah its one of the things I like most and least with python
<timokau[m]>
I wish it had some clever type inference like rust that means I don't have to write types too much but still get some guarantees
<infinisil>
I was thinking of writing this nix-bisect thing in bash because everything is CLI's, but I might go for Haskell after all, because there might be some complicated decision logic
<gchristensen>
"it is complicated enough to merrit not bash" -- me, a die-hard lover of bash
<timokau[m]>
Mine started as a bash script, but I definitely wouldn't recommend it
<infinisil>
Bash gets unwieldy rather quickly..
<timokau[m]>
One thing that puzzled me when writing it was that the nice new `nix` commands actually skip some log lines
<timokau[m]>
Initially I used those because of the status line, coloring etc. But then grepping for a line indicating failure wouldn't work, because it would happily skip lines if they come too fast
ciil has joined #nixos-dev
<infinisil>
Huh
* infinisil
isn't getting it
ixxie has quit [Remote host closed the connection]
<timokau[m]>
Basically I'm checking each line `nix-build` outputs against a "failure line" to determine weather the failure I'm looking for occured
<timokau[m]>
It can be nice to abort early as soon as the offending line occurs (though its debatable if that is worth it), so I'm reading the lines as a stream (instead of `nix-log` afterwards)
<timokau[m]>
At the same time I'm also printing the lines to STDOUT for a nice user interface
<timokau[m]>
If I use `nix build` to build, intercept the output and then relay it to STDOUT, I won't see all lines
<timokau[m]>
Because `nix build` only prints a new line every couple of milliseconds or something, so if there is too much output some lines will be skipped
<infinisil>
Oh damn, didn't know that
<infinisil>
Probably nix-build doesn't do that
<gchristensen>
nix build has a new option, -L, in the next minor release
<timokau[m]>
Well it makes sense from the nix2 perspective. Its not trying to give you an accurate build log, just some idea of whats happening. Parsing its output is not really an intended use case
<timokau[m]>
Just caught me off-guard
<timokau[m]>
gchristensen: what does that do?
<timokau[m]>
infinisil: And now, `nix-build` doesn't do that. The current version of the script uses `nix-build` and but modifies the lines before re-printing to STDOUT to still only display a single line like nix2
<timokau[m]>
Just looses the nice stats nix2 displays
<gchristensen>
oh, to get all the log outptu
<timokau[m]>
gchristensen: So it basically increases the "refresh rate"? Or is it the long-asked-after verbose mode that actually prints all lines?