Open pavelzw opened 3 months ago
a workaround for this is to add the following at the beginning of your .pre-commit-config.yaml
:
# ensure pixi environments are up to date
# workaround for https://github.com/prefix-dev/pixi/issues/1482
- id: pixi-install
name: pixi-install
entry: pixi install -e default -e lint
language: system
always_run: true
require_serial: true
pass_filenames: false
In our pre-commit configuration, we use something like
since it is a bad idea to let pre-commit manage lint dependencies when you have a proper package manager who can do that as well in a
lint
environment.When running
pre-commit run -a
, it invokes a lot ofpixi run ...
processes that all try to install the environment if it doesn't exist. This then leads to warnings/errors like this:To be fair, how our pre-commit config looks is a bit hacky but I think pixi could write a lock file to
.pixi
to prevent parallel access.Also, sort-of related, i'm not sure why I see a
updating environment 'default'
here since thedefault
environment should already be installed (from the setup-pixi step):Any ideas why this is the case?