-
-
Notifications
You must be signed in to change notification settings - Fork 873
Offline package resolution #4963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
I have opened this because I am ready for feedback on anything/everything. Before this is merged: JSON caching is an area of major concern as it is unsigned and unverifiable. I am currently looking into ways to either cache it safely, use another safe source, or validate with another safe source (match checksum from protobuf content). |
compiler-cli/src/dependencies.rs
Outdated
let cached_result = | ||
fs.read_bytes(&cache_path).map_err(|err| Error::FileIo { | ||
action: FileIoAction::Read, | ||
kind: FileKind::File, | ||
path: cache_path.clone(), | ||
err: Some(err.to_string()), | ||
})?; | ||
|
||
serde_json::from_slice(&cached_result).map_err(|err| Error::FileIo { | ||
action: FileIoAction::Read, | ||
kind: FileKind::File, | ||
path: cache_path, | ||
err: Some(err.to_string()), | ||
})? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cache reading concerns here as json source is unverifiable in current state
requires gleam-lang/hexpm-rust#48
resolves #2162
Caches
/packages/{name}
protobuf as a gz and/packages/{name}/releases/{version}
as json for use in offline package resolution. Requests fail-over to use local caches.TODO: