Sitelet https://github.com/microsoft/Chakra-Samples/pull/48
Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Update ChakraCore samples to latest JSRT - #48

Merged
Oguz Bastemur (obastemur) merged 1 commit into
microsoft:masterfrom
obastemur:update_samples
Nov 16, 2016
Merged

Oguz Bastemur (obastemur) merged 1 commit into
microsoft:masterfrom
obastemur:update_samples

Conversation

@obastemur

Copy link
Copy Markdown
Contributor

No description provided.

@obastemur

Copy link
Copy Markdown
Contributor Author

/cc Limin Zhu (@liminzhu)

@obastemur

Copy link
Copy Markdown
Contributor Author

Fixes #47

@kphillisjr

Copy link
Copy Markdown

Thanks for the Quick fix on the bug, and the review involves compile bugs and notes involving Ubuntu Linux 16.04 LTS.

@liminzhu

Copy link
Copy Markdown
Member

Oguz Bastemur (@obastemur) why only fail_check a portion of the API calls?

@jcoffland

Copy link
Copy Markdown

Why change the output of the Hello World example from Hello World! to SUCCESS? That doesn't make sense to me.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Joseph Coffland (@jcoffland), Limin Zhu (@liminzhu), and Oguz Bastemur (@obastemur), I believe a code review is a good idea... Here is some notes.


// Your script; try replace hello-world with something else
const char* script = "(()=>{return \'Hello world!\';})()";
const char* script = "(()=>{return \'SUCCESS\';})()";

Choose a reason for hiding this comment

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

I Believe it would be best to avoid changing the output strings for the samples whenever possible. This is a hello world example, so printing "Hello World" is the expected output.

//-------------------------------------------------------------------------------------------------------

#include "ChakraCore.h"
#include <stdlib.h>

Choose a reason for hiding this comment

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

Might want to also include stddef.h, This is because nullptr is undefined on Ubuntu Linux 16.04 LTS without this header.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Kenney Phillis Jr. (@kphillisjr) we don't need to include stddef.h explicitly. Feel free to open an issue if you experience a problem. (and please add all the steps to reproduce)

Choose a reason for hiding this comment

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

The reason I ran into the issue is that I changed the standard compile flag. The examples currently use -std=c++0x, and I was compiling against the flag -std=c++11.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

makes sense. We don't force devs to use c++11 though. We just use it internally.

@obastemur

Copy link
Copy Markdown
Contributor Author

Cool we have so many people on board 👍

@obastemur

Copy link
Copy Markdown
Contributor Author

Why change the output of the Hello World example from Hello World! to SUCCESS? That doesn't make sense to me.

Joseph Coffland (@jcoffland) That comes straight from our native tests. Hello World indeed makes more sense. Thanks for this.

Oguz Bastemur (@obastemur) why only fail_check a portion of the API calls?

Good idea to show to devs each and every single method may return an error value there.

@obastemur

Copy link
Copy Markdown
Contributor Author

Kenney Phillis Jr. (@kphillisjr) Limin Zhu (@liminzhu) Joseph Coffland (@jcoffland) Thanks for the review

@obastemur
Oguz Bastemur (obastemur) merged commit 8c26110 into microsoft:master Nov 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants