Open ony opened 2 years ago
Related code seems to be:
With core
bundle being installed into system location and not allowed for write - these setup is not going to fully work.
Shouldn't persistence always fallback to something like $XDG_STATE_HOME
/~/.local/state
(maybe with some versioning) on Unix. If persdb
indeed allows multi-user access with updates, then it probably should use /var/db
with appropriate permissions install.
Thank you @ony for the fantastic analysis of the problem and your proposed solution. Indeed Ciao needs a few user-writable directories for caching compilation and analysis data. Also commands like ciao get ...
requires a user-writable directory to download and compile sources. This is well tested for local installations but not for system-wide configurations.
It will be awesome to finally fix those issues. I've seen that other systems (like npm
already have or had) issues with globally installing packages since nix store is immutable. Most of the solutions I've seen are a mix of global immutable installation + local home subdirectory for packages. We'd really appreciate if you can point us to any good accepted solution for those problems, specially if it works both in different Linux distributions and macOS.
Looks like
persdb/datadir
tries to use system path for data dir (probably relative tocore
/builder
bundles orCIAOROOT
folders).Can be reproduced with Nix packaged version (example for Flakes flavor):
In NixOS packages installed at location that is perceived as read-only for normal users.
P.S. This at least affects
ciaopp
. See ciao-lang/ciaopp#2