Skip to content

Fix the cache inputs and outputs of the @cipherstash/auth#build:native turbo task #1036

Description

@auxesis

The turbo task @cipherstash/auth#build:native in turbo.json has two faults. Nothing runs it through turbo yet, so neither has caused a problem. freshtonic found both in review of #1001.

Its cache key misses the stack-auth crate

The task's inputs cover languages/typescript/packages/auth only. The native binding compiles packages/stack-auth through a path dependency, and that folder sits outside the package. So when only the stack-auth crate changes, turbo finds a cache hit and restores the previous *.node binary.

Its outputs include a folder another script builds

The entry lists wasm/** as an output, but build:native does not build wasm/. build:wasm builds it, from ../stack-auth-wasm. So turbo stores whatever wasm/ holds when build:native ends, and a later cache hit can restore a stale copy.

Fix

If a workflow will run this task through turbo, add $TURBO_ROOT$/packages/stack-auth/**, the root Cargo.toml and the root Cargo.lock to its inputs, as the stash#build entry does, and remove wasm/** from its outputs. If nothing will, delete the entry.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    SDKjavascriptPull requests that update javascript code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions