flake-utils icon indicating copy to clipboard operation
flake-utils copied to clipboard

check-utils: add hasBuilt

Open blaggacao opened this issue 4 years ago • 6 comments

This implementation of hasBUilt depends on a very simple IFD (builtins.pathExists drv). It works well for successful builds, but currently build-errors for failing ones, despite of the use of builtins.tryEval.

I'm investigating if this behaviour of builtins.tryEval can be considered an upstream bug, as long as IFD, per se, are not forbidden.

(opinion milage may vary)

blaggacao avatar Jun 14 '21 22:06 blaggacao

Can we turn this into an actual PR and see what @zimbatm thinks? (Don't forget to add success/failing cases to the example and paste resulting output)

gytis-ivaskevicius avatar Jun 21 '21 14:06 gytis-ivaskevicius

I'll try to have some conversations about tryEval catching or nor catching build errors, first. This is going to be a long hauler. In the current state of tryEval it does not work and upstream opinions seem divided.

blaggacao avatar Jun 21 '21 14:06 blaggacao

Is check-utils part of the public api of this flake? @zimbatm

Mic92 avatar May 14 '22 19:05 Mic92

Yes

gytis-ivaskevicius avatar May 14 '22 20:05 gytis-ivaskevicius

It's not part of the documentation though: https://github.com/numtide/flake-utils

Mic92 avatar May 15 '22 06:05 Mic92

It was added by blaggacao and gytis. I haven't used it so far.

zimbatm avatar May 15 '22 10:05 zimbatm

I think this effort has moved elsewhere

zimbatm avatar Apr 09 '23 10:04 zimbatm