Skip to content

Commit

Permalink
Switch use of xplat/hermes-inspector to xplat/js/react-native-github/…
Browse files Browse the repository at this point in the history
…ReactCommon/hermes/inspector

Summary: Changelog: [Internal]

Reviewed By: dulinriley

Differential Revision: D18364013

fbshipit-source-id: 1c077cf4f886ea620a62d8fe83dfd725850bcd31
  • Loading branch information
mhorowitz authored and facebook-github-bot committed Nov 12, 2019
1 parent abb4590 commit 8e750d7
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions ReactCommon/hermes/inspector/DEFS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ load("@fbsource//xplat/hermes/defs:hermes.bzl", "hermes_is_debugger_enabled")

def hermes_inspector_dep_list():
return [
"fbsource//xplat/hermes-inspector:chrome",
"fbsource//xplat/hermes-inspector:inspectorlib",
"fbsource//xplat/js/react-native-github/ReactCommon/hermes/inspector:chrome",
"fbsource//xplat/js/react-native-github/ReactCommon/hermes/inspector:inspectorlib",
] if hermes_is_debugger_enabled() else []
14 changes: 7 additions & 7 deletions ReactCommon/hermes/inspector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ can get debug logs to show even when tests are passing by running the test
executable directly:

```
$ buck build fbsource//xplat/hermes-inspector:chrome-tests
$ buck-out/gen/hermes-inspector/chrome-tests
$ buck build fbsource//xplat/js/react-native-github/ReactCommon/hermes/inspector:chrome-tests
$ buck-out/gen/js/react-native-github/ReactCommon/hermes/inspector/chrome-tests
[...]
```

You can use standard gtest filters to only execute a particular set of tests:

```
$ buck-out/gen/hermes-inspector/chrome-tests \
$ buck-out/gen/js/react-native-github/ReactCommon/hermes/inspector/chrome-tests \
--gtest_filter='ConnectionTests.testSetBreakpoint'
```

You can debug the tests using lldb or gdb:

```
$ lldb buck-out/gen/hermes-inspector/chrome-tests
$ gdb buck-out/gen/hermes-inspector/chrome-tests
$ lldb buck-out/gen/js/react-native-github/ReactCommon/hermes/inspector/chrome-tests
$ gdb buck-out/gen/js/react-native-github/ReactCommon/hermes/inspector/chrome-tests
```

# Formatting
Expand All @@ -42,7 +42,7 @@ Make sure the code is formatted using the hermes clang-format rules before
committing:

```
$ xplat/hermes-inspector/tools/format
$ xplat/js/react-native-github/ReactCommon/hermes/inspector/tools/format
```

We follow the clang format rules used by the rest of the Hermes project.
Expand All @@ -53,7 +53,7 @@ To add support for a new Chrome DevTools protocol message, add the message you
want to add to tools/message_types.txt, and re-run the message types generator:

```
$ xplat/hermes-inspector/tools/run_msggen
$ xplat/js/react-native-github/ReactCommon/hermes/inspector/tools/run_msggen
```

This will generate C++ structs for the new message type in
Expand Down
2 changes: 1 addition & 1 deletion ReactCommon/hermes/inspector/tools/format
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ cd "$DIR"

FBSOURCE="$(hg root)"
CLANG_FORMAT="$FBSOURCE/tools/third-party/clang-format/clang-format"
SRC="$FBSOURCE/xplat/hermes-inspector"
SRC="$FBSOURCE/xplat/js/react-native-github/ReactCommon/hermes/inspector"

find "$SRC" '(' -name '*.h' -or -name '*.cpp' ')' -exec "$CLANG_FORMAT" -i -style=file '{}' ';'
6 changes: 3 additions & 3 deletions ReactCommon/hermes/inspector/tools/run_msggen
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ yarn install
yarn build

FBSOURCE=$(hg root)
MSGTYPES_PATH="${FBSOURCE}/xplat/hermes-inspector/tools/message_types.txt"
MSGTYPES_PATH="${FBSOURCE}/xplat/js/react-native-github/ReactCommon/hermes/inspector/tools/message_types.txt"
PROTO_PATH="${FBSOURCE}/xplat/third-party/chrome-devtools-protocol/json/js_protocol.json"
HEADER_PATH="${FBSOURCE}/xplat/hermes-inspector/chrome/MessageTypes.h"
CPP_PATH="${FBSOURCE}/xplat/hermes-inspector/chrome/MessageTypes.cpp"
HEADER_PATH="${FBSOURCE}/xplat/js/react-native-github/ReactCommon/hermes/inspector/chrome/MessageTypes.h"
CPP_PATH="${FBSOURCE}/xplat/js/react-native-github/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp"

node bin/index.js \
--ignore-experimental \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
THIS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source "$THIS_DIR/setup.sh"

buck test fbsource//xplat/hermes-inspector:chrome &&
buck test fbsource//xplat/hermes-inspector:detail &&
buck test fbsource//xplat/hermes-inspector:inspectorlib &&
buck build fbsource//xplat/hermes-inspector:hermes-chrome-debug-server
buck test fbsource//xplat/js/react-native-github/ReactCommon/hermes/inspector:chrome &&
buck test fbsource//xplat/js/react-native-github/ReactCommon/hermes/inspector:detail &&
buck test fbsource//xplat/js/react-native-github/ReactCommon/hermes/inspector:inspectorlib &&
buck build fbsource//xplat/js/react-native-github/ReactCommon/hermes/inspector:hermes-chrome-debug-server

0 comments on commit 8e750d7

Please sign in to comment.