relay-compiler --watchman false option fails with FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal. when --src is current directory
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Using version `1.2.0`
This seems to only happen when `src` is the current directory: `.`
```
./node_modules/.bin/relay-compiler --src . --schema ./schema.json --watchman false Thu 17 Aug 11:11:25 2017
FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
1: node::Abort() [/Users/stevehollaar1/.nvm/versions/node/v8.4.0/bin/node]
2: node::FatalException(v8::Isolate*, v8::Local, v8::Local) [/Users/stevehollaar1/.nvm/versions/node/v8.4.0/bin/node]
3: v8::V8::ToLocalEmpty() [/Users/stevehollaar1/.nvm/versions/node/v8.4.0/bin/node]
4: node::ReadDir(v8::FunctionCallbackInfo const&) [/Users/stevehollaar1/.nvm/versions/node/v8.4.0/bin/node]
5: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo const&)) [/Users/stevehollaar1/.nvm/versions/node/v8.4.0/bin/node]
6: v8::internal::MaybeHandle v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate*, v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::BuiltinArguments) [/Users/stevehollaar1/.nvm/versions/node/v8.4.0/bin/node]
7: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/stevehollaar1/.nvm/versions/node/v8.4.0/bin/node]
8: 0x3e92849840dd
fish: './node_modules/.bin/relay-compi…' terminated by signal SIGABRT (Abort)
```
Setting `src` to a subdirectory works as expected:
```
node_modules/.bin/relay-compiler --src app --schema ./schema.json --watchman false 1538ms Thu 17 Aug 11:14:01 2017
HINT: pass --watch to keep watching for changes.
Parsed default in 0.03s
Writing default
Writer time: 0.52s [0.43s compiling, 0.09s generating, 0.00s extra]
Unchanged: 133 files
Written default in 0.57s
```
Contributor guide
Research direction
Reproduce with relay-compiler 1.2.0 using --src . --schema ./schema.json --watchman false, then compare with the working --src app invocation. Start from the relay-compiler entry point and trace directory scanning when the source is the current directory. Done means the current-directory command completes without the V8 fatal error and produces the expected compiler output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100