Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

zz shouldn't try to create an index in read only directory #157

Closed
sternenseemann opened this issue Mar 7, 2021 · 3 comments · Fixed by #158
Closed

zz shouldn't try to create an index in read only directory #157

sternenseemann opened this issue Mar 7, 2021 · 3 comments · Fixed by #158
Labels
bug Something isn't working

Comments

@sternenseemann
Copy link

In the zz version packaged for NixOS, we install the modules shipped with the compiler globally into a read-only file system. This means that compiling anything with dependencies on that library will fail with:

finished parsing ::mem
thread 'main' panicked at 'cannot create target/repos: Os { code: 30, kind: Other, message: "Read-only file system" }', src/repos.rs:27:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@aep
Copy link
Collaborator

aep commented Mar 7, 2021

oh yeah, that's a probem for all distros.

the cache is relative to the modules zz.toml because out of lazyness is just change current directory to the module before calling index().

it was bound to cause problems eventually.

now the real question is where should the cache go?
golang uses a per-user global cache, which makes it more space efficient, rust puts it per project, which makes it easier to clean.

@aep aep added the bug Something isn't working label Mar 7, 2021
aep added a commit that referenced this issue Mar 7, 2021
aep added a commit that referenced this issue Mar 7, 2021
@aep
Copy link
Collaborator

aep commented Mar 7, 2021

quickfix looks easy actually. we can just not write a cachefile if there are no repos.

std modules can't have repos, because they wouldnt be stable

@aep aep closed this as completed in #158 Mar 7, 2021
aep added a commit that referenced this issue Mar 7, 2021
@aep
Copy link
Collaborator

aep commented Mar 7, 2021

please reopen if its not fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants