LightAndLight / ipso

A functional scripting language.
https://ipso.dev
16 stars 1 forks source link

Nix cache miss for Ipso? #407

Closed LightAndLight closed 1 year ago

LightAndLight commented 1 year ago

https://github.com/LightAndLight/ipso/actions/runs/5030237713/jobs/9022521223#step:15:293

Building... makes it seem like it's not fetching an Ipso binary from the cache. For a cache hit I'd expect to see something like this: https://github.com/LightAndLight/ipso/actions/runs/5030237713/jobs/9022521223#step:18:15.

What's up?

LightAndLight commented 1 year ago

I thought maybe that particular version of Ipso had missed the binary cache, so I bumped to a supposedly cached version in https://github.com/LightAndLight/ipso/pull/410. It didn't fix the problem.

LightAndLight commented 1 year ago

I think the post build hook script isn't adding the upload tasks to pueue.

LightAndLight commented 1 year ago

I can test this by running a Nix build in the CI pipeline. When the post build hook runs, I see a message: https://github.com/LightAndLight/ipso/actions/runs/4274170847/jobs/7440589818#step:15:271

LightAndLight commented 1 year ago

The post build hook pueue task is giving error 127: https://github.com/LightAndLight/ipso/actions/runs/5053729988/jobs/9067861717?pr=411#step:16:12 Nevermind, it's because I made the Nix build run before I'd installed Ipso on the machine.

LightAndLight commented 1 year ago

Got a cache hit: https://github.com/LightAndLight/ipso/actions/runs/5053839082/jobs/9068093146?pr=411#step:18:14

LightAndLight commented 1 year ago

The problem might be due to using nix profile install on a non-binary-cached Ipso version. What if due to the install command building Ipso (without pushing it to the cache), a subsequent command that also builds Ipso succeeds immediately and doesn't push anything to the cache?

Maybe downloading a pre-built Ipso release from GitHub would help (instead of installing it with Nix).

LightAndLight commented 1 year ago

Maybe downloading a pre-built Ipso release from GitHub would help (instead of installing it with Nix).

This worked. I guess the post build hook really does run after a derivation has been built. When I called nix profile install to install Ipso, and Ipso wasn't in the binary cache, the derivation was built (without a post build hook, because the post build hook uses Ipso). When I called nix build(with the intention of having the build products to the cache) the package was already built, so there were no build products and nothing was pushed to the Nix cache.