You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure that the handling of the :binary_path configuration is robust, especially when the environment variable is not set. Verify that the default path is correctly used and that there are no unexpected behaviors.
Ensure that the @binary_path is converted to a charlist only after retrieving the configuration value. This avoids unnecessary conversion if the value is already a charlist.
@binary_path Application.compile_env(:numscriptex, :binary_path, @default_binary_path)
- |> to_charlist()+|> case do+ path when is_binary(path) -> to_charlist(path)+ path -> path+end
Suggestion importance[1-10]: 8
__
Why: The suggestion improves efficiency by ensuring that the conversion to a charlist only occurs if necessary, which can enhance performance and reduce unnecessary operations. This change is accurate and relevant to the context of the PR. The existing_code snippet matches the PR diff, and the improved_code correctly reflects the proposed optimization.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
enhancement, tests, documentation
Description
Allow configuration of WASM binary path in
numscriptex.Add test for custom WASM binary path configuration.
Update documentation to include
:binary_pathconfiguration.Changes walkthrough 📝
assets_manager.ex
Add configurable binary path for WASM filelib/numscriptex/assets_manager.ex
@default_binary_pathfor default WASM path.@binary_pathconfigurable via application environment.binary_pathfunction to use application environment.assets_manager_test.exs
Add test for custom binary path configurationtest/numscriptex/assets_manager_test.exs
README.md
Document `:binary_path` configuration optionREADME.md
:binary_pathconfiguration option.:binary_path.