Skip to content
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

Precompiled embed wraps are now optional with lazy modules the default #225

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

nerfZael
Copy link
Contributor

No description provided.

@krisbitney
Copy link
Contributor

@CodiumAI-Agent /reflect_and_review

@CodiumAI-Agent
Copy link

PR Analysis

  • 🎯 Main theme: Making precompiled embed wraps optional and lazy modules the default
  • 📝 PR summary: This PR introduces the option to use either precompiled or lazy-loaded modules in the system configuration. It also changes the default behavior to use lazy-loaded modules. This is done by adding new functions to create precompiled and lazy-loaded Wasm packages, and modifying the system configuration to use these new functions.
  • 📌 Type of PR: Enhancement
  • 🧪 Relevant tests added: No
  • 🔒 Security concerns: No security concerns found

PR Feedback

  • 💡 General suggestions: The PR is well-structured and the changes are consistent across multiple files. However, it would be beneficial to add tests to verify the new functionality. Additionally, it would be helpful to provide more context in the PR description about the motivation and impact of these changes.

  • 🤖 Code feedback:

    • relevant file: packages/default-config/src/system_config.rs
      suggestion: Consider handling the error from the to_vec function instead of using unwrap, to avoid potential panics in the code. [important]
      relevant line: '+ to_vec(&IpfsEnv {

    • relevant file: packages/default-config/src/embeds/fs_resolver/mod.rs
      suggestion: It would be good to handle the potential error from the unwrap call in a more graceful way to avoid potential panics. [medium]
      relevant line: '+ WasmWrapper::try_from_bytecode(WRAP_WASM, Arc::new(SimpleFileReader::new())).unwrap()'

How to use

Tag me in a comment '@CodiumAI-Agent' and add one of the following commands:
/review [-i]: Request a review of your Pull Request. For an incremental review, which only considers changes since the last review, include the '-i' option.
/describe: Modify the PR title and description based on the contents of the PR.
/improve [--extended]: Suggest improvements to the code in the PR. Extended mode employs several calls, and provides a more thorough feedback.
/ask <QUESTION>: Pose a question about the PR.
/update_changelog: Update the changelog based on the PR's contents.

To edit any configuration parameter from configuration.toml, add --config_path=new_value
For example: /review --pr_reviewer.extra_instructions="focus on the file: ..."
To list the possible configuration parameters, use the /config command.

@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Patch coverage: 99.31% and project coverage change: +0.27% 🎉

Comparison is base (e5f04aa) 78.56% compared to head (aa12962) 78.83%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #225      +/-   ##
==========================================
+ Coverage   78.56%   78.83%   +0.27%     
==========================================
  Files          90       90              
  Lines        6283     6342      +59     
==========================================
+ Hits         4936     5000      +64     
+ Misses       1347     1342       -5     
Files Changed Coverage Δ
packages/default-config/src/system_config.rs 99.17% <99.09%> (-0.83%) ⬇️
...kages/default-config/src/embeds/fs_resolver/mod.rs 84.21% <100.00%> (+9.21%) ⬆️
...ges/default-config/src/embeds/http_resolver/mod.rs 84.21% <100.00%> (+9.21%) ⬆️
.../default-config/src/embeds/ipfs_http_client/mod.rs 84.21% <100.00%> (+9.21%) ⬆️
...ges/default-config/src/embeds/ipfs_resolver/mod.rs 84.21% <100.00%> (+9.21%) ⬆️
packages/native/src/client.rs 84.95% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@krisbitney krisbitney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cbrzn
Copy link
Collaborator

cbrzn commented Aug 28, 2023

hey @krisbitney can u please test this version in kotlin to see if it solves your problem?

@krisbitney
Copy link
Contributor

hey @krisbitney can u please test this version in kotlin to see if it solves your problem?

Yes, for sure, good idea. I'll report my findings very soon!

@krisbitney
Copy link
Contributor

This PR did fix the Android problem

@cbrzn cbrzn merged commit f08b464 into main Aug 31, 2023
4 checks passed
@cbrzn cbrzn deleted the nerfzael-optional-precompile branch August 31, 2023 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants