-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Added boa examples #634
Added boa examples #634
Conversation
Codecov Report
@@ Coverage Diff @@
## master #634 +/- ##
=======================================
Coverage 72.81% 72.81%
=======================================
Files 179 179
Lines 13197 13197
=======================================
Hits 9609 9609
Misses 3588 3588 Continue to review full report at Codecov.
|
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.
Thank you for the contribution! I added some suggestions where I found them reasonable.
I think it would be best if we used normal Cargo examples for the examples, instead of creating a new package.
In any case, about the examples, I didn't have the time to check them thoroughly, but there are some things missing:
- I noticed no
\n
at the end of many files. This doesn't seem to be following the.editorConfig
file in the project. Most code editors should use it by default. - We should add CI for all these examples.
- I'm missing more module-level documentation in each example file.
examples/src/modulehandler.rs
Outdated
//Read the module source file | ||
println!("Loading: {}", libfile); | ||
let buffer = read_to_string(libfile); | ||
if buffer.is_err(){ |
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.
As clippy
suggests, we should use if...let
here.
examples/src/modulehandler.rs
Outdated
let return_value = ResultValue::from(Ok(Value::from(module_exports))); | ||
return return_value; | ||
} | ||
} |
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.
} | |
} | |
@HalidOdat Changed to engine.to_string as suggested in #633 I am able to run it in the dev branch but the CI fails at the following code snippets. Request help thanks. Pattern 1 Pattern 2 |
it should be the other way around
The previous implementation of |
I think this should be blocked until #627 lands. That will give us much better examples. |
Hi @elasmojs, how is this going? |
oops, rebased it and it somehow lost the changes here. I've created a new PR |
Added boa examples as per issue #446 Overtaken #634 Somehow screwed that branch up by rebasing it and losing access pings @elasmojs This Pull Request fixes/closes #446 . Co-authored-by: Jason Williams <jase.williams@gmail.com> Co-authored-by: Iban Eguia (Razican) <razican@protonmail.ch> Co-authored-by: jasonwilliams <jase.williams@gmail.com> Co-authored-by: jedel1043 <jedel0124@gmail.com>
Added boa examples as per issue #446 Overtaken boa-dev/boa#634 Somehow screwed that branch up by rebasing it and losing access pings @elasmojs This Pull Request fixes/closes #446 . Co-authored-by: Jason Williams <jase.williams@gmail.com> Co-authored-by: Iban Eguia (Razican) <razican@protonmail.ch> Co-authored-by: jasonwilliams <jase.williams@gmail.com> Co-authored-by: jedel1043 <jedel0124@gmail.com>
This Pull Request fixes/closes #446 .
It changes the following: