-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: use loader to verify https checksums #486
Conversation
)); | ||
}) | ||
.boxed_local(), | ||
); |
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.
This will be a perf improvement.
@@ -159,33 +158,87 @@ impl Range { | |||
} | |||
} | |||
|
|||
#[derive(Debug, Clone)] | |||
pub enum ModuleError { |
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.
I split this up into way more targeted error classes so that I could more easily tell when an integrity check fails. This will make things easier in the CLI.
… a checksum error
- name: Get tag version | ||
if: contains(matrix.os, 'ubuntu') && startsWith(github.ref, 'refs/tags/') | ||
id: get_tag_version | ||
run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> "$GITHUB_OUTPUT" |
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.
This is unrealted to this PR. I just noticed it was not used.
}, | ||
{ | ||
let package_name = package_name.to_string(); | ||
|e| JsrLoadError::PackageManifestLoad(package_name, Arc::new(e)) | ||
}, | ||
{ | ||
let package_name = package_name.to_string(); | ||
|| JsrLoadError::PackageNotFound(package_name) |
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.
This read very strange, I wonder if it would make more sense to assign them to variables before hand. But maybe not very important.
#[derive(Debug, Default, Clone)] | ||
pub struct HashMapLocker(HashMap<ModuleSpecifier, LoaderChecksum>); |
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.
Where would we use this one? In deno vendor
?
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.
Just in the tests probably (it's used in the tests in this repo)
reporter: Option<&'a dyn Reporter>, | ||
workspace_members: &'a [WorkspaceMember], | ||
executor: &'a dyn Executor, | ||
options: BuildOptions<'a>, |
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.
Nice cleanup 👍
This should be a perf improvement, but also it allows modifying https specifiers in the vendor folder without causing lockfile issues similar to jsr specifiers.