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

sourcedirs.rs panics after upgrading from v1.0.4 to 1.0.5 #108

Open
vasco3 opened this issue Apr 30, 2024 · 11 comments
Open

sourcedirs.rs panics after upgrading from v1.0.4 to 1.0.5 #108

vasco3 opened this issue Apr 30, 2024 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@vasco3
Copy link

vasco3 commented Apr 30, 2024

run rewatch clean and rewatch watch. Then i see the following error

> pnpm rewatch watch . 

[1/7] πŸ“¦ Built package tree in 0.00s
[2/7] πŸ•΅οΈ  Found source files in 0.00s
[3/7] πŸ“ Read compile state 0.00s
[4/7] 🧹 Cleaned 0/0 0.00s
[5/7] 🧱 Parsed 120 source files in 0.14s
[6/7] ️🌴 Collected deps in 0.00s
[7/7] 🀺 ️Compiling... β ‚ 122/122                                                        thread 'thread '<unnamed><unnamed>' panicked at src/sourcedirs.rs:26:10:
called `Result::unwrap()` on an `Err` value: StripPrefixError(())
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
' panicked at src/sourcedirs.rs:26:10:
called `Result::unwrap()` on an `Err` value: StripPrefixError(())
 ELIFECYCLE  Command failed with exit code 101.

I rolled back and it works fine again.

dependencies

  • "@rescript/react": "^0.12.1",
  • "rescript": "11.1.0",
@rolandpeelen
Copy link
Member

Will have a look into this.

Can you run it with a backtrace with any chance? RUST_BACKTRACE=1 ?

@rolandpeelen rolandpeelen self-assigned this May 6, 2024
@rolandpeelen rolandpeelen added the bug Something isn't working label May 6, 2024
@rolandpeelen
Copy link
Member

@vasco3 - Made this optional for now: https://github.com/teamwalnut/rewatch/releases/tag/v1.0.6 -- Release is building.

But - would love to work on fixing this. It looks to me like the path of the package it's trying to resolve is a sub path of another package. Are you able to build Rewatch from source? Ie - If I prepare a branch for you with some debug statements, would you be able to compile it and run it on your repo so we get some debug information?

@vasco3
Copy link
Author

vasco3 commented May 6, 2024

RUST_BACKTRACE=1

like this? (v1.0.6)
image

@rolandpeelen
Copy link
Member

Yeah, could be that this doesn't work in release mode. But let's try:

  1. pnpm rewatch clean . - clean state
  2. RUST_BACKTRACE=1 pnpm rewatch build . (this should then spawn the error and hopefully give us a backtrace).

If it doesn't I'll try and prepare a build for you that you can install which will have some more debug info.

@vasco3
Copy link
Author

vasco3 commented May 6, 2024

@rolandpeelen
looks like now its working fine?
v1.0.6

image

@rolandpeelen
Copy link
Member

Hey! Yes, we made them optional. Sorry, should have included the tag. So;

  1. pnpm rewatch clean . - clean state
  2. RUST_BACKTRACE=1 pnpm rewatch --create-sourcedirs true build .

@vasco3
Copy link
Author

vasco3 commented May 7, 2024

@rolandpeelen
here is the result

CleanShot 2024-05-07 at 14 04 25@2x

@vasco3
Copy link
Author

vasco3 commented May 7, 2024

running with full
CleanShot 2024-05-07 at 14 06 40@2x

@rolandpeelen
Copy link
Member

Awesome. Thank you!
Ok. there is not that much info there unfortunately. Would you happen to have you have a small public github repo that reproduces this issue?

Alternatively, I can build you a version of Rewatch that does some more logging. But not sure when I can get to that

@vasco3
Copy link
Author

vasco3 commented May 8, 2024

@rolandpeelen yeah I'll put together a repro repo soon

@vasco3
Copy link
Author

vasco3 commented May 14, 2024

@rolandpeelen good news,
The sourcedirs error happens when I add @rescript/react

here is the minimal repo
https://github.com/vasco3/rewatch-pnpm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants