Skip to content

Unexpected rebuild happening #851

@abailly

Description

@abailly

I am using shake for a relatively simple build system. The only wart is the need to build system dependencies and ensure cabal can find and understand them. I am building those libraries into ~/.local in order to not pollute the global namespace, and the build depends on the .so (or .dylib) files built.

However, I noticed that shake always rebuilds the libraries, even when they exist. To check this I have added a find ~/.local to the CI build and getting the following results:

/home/runner/.local/share/lib
/home/runner/.local/share/lib/libblst.a
/home/runner/.local/share/lib/libsecp256k1.so.2.0.2
/home/runner/.local/share/lib/libsecp256k1.so
/home/runner/.local/share/lib/pkgconfig
/home/runner/.local/share/lib/pkgconfig/libsecp256k1.pc
/home/runner/.local/share/lib/pkgconfig/libblst.pc
/home/runner/.local/share/lib/pkgconfig/libsodium.pc
/home/runner/.local/share/lib/libsodium.so.23.3.0
/home/runner/.local/share/lib/libsecp256k1.a
/home/runner/.local/share/lib/libsodium.la
/home/runner/.local/share/lib/libsodium.so.23
/home/runner/.local/share/lib/libsecp256k1.la
/home/runner/.local/share/lib/libsodium.a
/home/runner/.local/share/lib/libsecp256k1.so.2
/home/runner/.local/share/lib/libsodium.so
Building db-server in directory /home/runner/work/db-server/db-server as user 1001
Starting...
# bin/db-server
# /home/runner/.local/share/lib/libblst.a
# /home/runner/.local/share/lib/libsecp256k1.so
# /home/runner/.local/share/lib/libsodium.so
scripts/install-libblst.sh /home/runner/.local/share 10.1.4
scripts/install-libsodium.sh /home/runner/.local/share 10.1.4
scripts/install-libsecp256k1.sh /home/runner/.local/share 10.1.4

prefix=$1
+ prefix=/home/runner/.local/share
CARDANO_NODE_VERSION=$2
+ CARDANO_NODE_VERSION=10.1.4

IOHKNIX_VERSION=$(curl -L https://raw.githubusercontent.com/IntersectMBO/cardano-node/$CARDANO_NODE_VERSION/flake.lock | jq -r '.nodes.iohkNix.locked.rev')
++ curl -L https://raw.githubusercontent.com/IntersectMBO/cardano-node/10.1.4/flake.lock
++ jq -r .nodes.iohkNix.locked.rev

The file /home/runner/.local/share/lib/libsodium.so exists but it's still rebuilt. What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions