Skip to content

Support disabling the pkl cache for sandboxed/hermetic builds #10

@mexlez12345

Description

@mexlez12345

Looks like by default the codegen tries to use the "global" pkl cache at ~/.pkl.

This breaks builds that use strict sandboxing (ex. bazel) that disallow write access outside of the build directory.

To address this, would it be possible to support ex. --no-cache args similar to the "core" pkl CLI tools?

https://pkl-lang.org/main/current/pkl-cli/index.html#common-options

–– Pkl Error ––
I/O error loading module `package://github.com/jw-y/pkl-python/releases/download/v0.1.16/pkl.python@0.1.16#/Generator.pkl`.
FileSystemException: /home/user/.pkl: Read-only file system

1 | amends "package://github.com/jw-y/pkl-python/releases/download/v0.1.16/pkl.python@0.1.16#/Generator.pkl"
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at tmpn_frdii6 (file:///tmp/tmpn_frdii6.pkl)

  warnings.warn(str(e))

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