Skip to content
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

"Could not read folder: test/intl" when having @rescript/core as a dependency #109

Open
cknitt opened this issue May 4, 2024 · 4 comments

Comments

@cknitt
Copy link
Member

cknitt commented May 4, 2024

When building my project, I get the following output

[1/7]πŸ“¦ Building package tree...Could not read folder: test/intl...
[1/7] πŸ“¦ Built package tree in 0.01s
[2/7] πŸ•΅οΈ  Found source files in 0.00s
[3/7] πŸ“ Read compile state 0.03s
[4/7] 🧹 Cleaned 0/1503 0.00s
[5/7] 🧱 Parsed 0 source files in 0.00s
[6/7] ️🌴 Collected deps in 0.01s
[7/7] 🀺 ️Compiled 0 modules in 0.00s

Problems:

  1. It is not clear in the output which package the message "Could not read folder: test/intl" applies to. Took me some searching to find out that it is @rescript/core.
  2. test/intl is a dev source dir in @rescript/core and therefore should not be attempted to build when @rescript/core is used as a dependency (to my understanding).
@rolandpeelen
Copy link
Member

@jfrolich - Any clue here? I'm not sure if we're correctly ignoring dev dependencies by the look of this πŸ€”

@jfrolich
Copy link
Collaborator

jfrolich commented May 6, 2024

Yes we are ignoring it right now, perhaps compile them always. I think there was some issue with a package that added a clashing namespace in dev deps that broke our monorepo, so we turned it off.

Edit: oh wait, it's actually trying to compile it.. Hmm weird! Even more strange since we are successfully compiling @rescript/core

@jderochervlk
Copy link

I'm also seeing this on a fresh project.

[1/7]πŸ“¦ Building package tree...Could not read folder: test/intl...
[1/7] πŸ“¦ Built package tree in 0.00s
[2/7] πŸ•΅οΈ  Found source files in 0.00s
[3/7] πŸ“ Reading compile state...thread 'main' panicked at src/build/read_compile_state.rs: 21: 78:
called `Option: :unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@jderochervlk
Copy link

Tried backing down to 1.0.5 and was able to get a backtrace:

[1/7]πŸ“¦ Building package tree...Could not read folder: test/intl...
[1/7] πŸ“¦ Built package tree in 0.00s
[2/7] πŸ•΅οΈ  Found source files in 0.00s
[3/7] πŸ“ Reading compile state...thread 'main' panicked at src/build/read_compile_state.rs:21:78:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:           0x4ecbee - std::backtrace_rs::backtrace::libunwind::trace::h103e47e00552e141
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5
   1:           0x4ecbee - std::backtrace_rs::backtrace::trace_unsynchronized::h592221613f1fd095
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:           0x4ecbee - std::sys_common::backtrace::_print_fmt::hf8a30f8299b1bef3
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/sys_common/backtrace.rs:68:5
   3:           0x4ecbee - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5a6e3e7cc140e753
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/sys_common/backtrace.rs:44:22
   4:           0x34a6fc - core::fmt::rt::Argument::fmt::hd62a89729b8d4079
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/fmt/rt.rs:142:9
   5:           0x34a6fc - core::fmt::write::haa8a32127a7b0d75
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/fmt/mod.rs:1153:17
   6:           0x4bb062 - std::io::Write::write_fmt::hc541adb06d0aeac1
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/io/mod.rs:1843:15
   7:           0x4f24df - std::sys_common::backtrace::_print::h59dc0d5369ede572
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/sys_common/backtrace.rs:47:5
   8:           0x4f24df - std::sys_common::backtrace::print::hbb7b999054d983a7
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/sys_common/backtrace.rs:34:9
   9:           0x4f1ce8 - std::panicking::default_hook::{{closure}}::hd143a60ad2fc5a07
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:272:22
  10:           0x4f2e3b - std::panicking::default_hook::h2aff2dd57e84e09f
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:292:9
  11:           0x4f2e3b - std::panicking::rust_panic_with_hook::h6811313e71f57da8
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:779:13
  12:           0x4f2868 - std::panicking::begin_panic_handler::{{closure}}::h2eb4991eec554504
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:649:13
  13:           0x4f27f6 - std::sys_common::backtrace::__rust_end_short_backtrace::h05983ae26e2c8878
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/sys_common/backtrace.rs:171:18
  14:           0x4f27e3 - rust_begin_unwind
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:645:5
  15:           0x349114 - core::panicking::panic_fmt::h49eed7d6e9368ad2
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/panicking.rs:72:14
  16:           0x34a342 - core::panicking::panic::h464a54e325df6587
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/panicking.rs:145:5
  17:           0x34ec25 - core::option::unwrap_failed::h58d787c9e91059ae
                               at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/option.rs:1985:5
  18:           0x484ec3 - rewatch::build::initialize_build::hde8c940c453b7470
  19:           0x4a7e36 - rewatch::watcher::async_watch::{{closure}}::hc56001ad0e142beb
  20:           0x2cbf9d - rewatch::main::h59fe0e617b61cdd1
  21:           0x2c1c33 - std::sys_common::backtrace::__rust_begin_short_backtrace::h30a4a5163105040b
  22:           0x2d4c67 - main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants