I haven’t tested this with rewatch yet. Would you be able to open an issue? It would be helpful if you could include some basic information about your project structure.
I created a very simple project, built it with rewatch, and tested it - it seems to work as intended. Are you perhaps using rewatch in a monorepo setup?
I cloned the shared pnpm_workspace repository and tried to build it according to the README instructions, but I’m encountering errors. How should I manage dependencies and orchestrate the build process?
pnpm --filter "@testrepo/dep01" res:build
> @testrepo/dep01@0.0.1 res:build /Users/woonki/GitHub/projects/rewatch-pnpm/packages/dep01
> rescript
>>>> Start compiling
Warning: bsconfig.json is deprecated. Migrate it to rescript.json
Warning number 3
/Users/woonki/GitHub/projects/rewatch-pnpm/packages/dep01/bsconfig.json:7:20-22
5 ┆ "subdirs": true
6 ┆ },
7 ┆ "package-specs": {
8 ┆ "module": "es6",
9 ┆ "in-source": true
10 ┆ },
deprecated: Option "es6" is deprecated. Use "esmodule" instead.
File "bsconfig.json", line 1
Error: package @testrepo/new-namespace not found or built
- Did you install it?
>>>> Finish compiling (exit: 2)
/Users/woonki/GitHub/projects/rewatch-pnpm/packages/dep01:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @testrepo/dep01@0.0.1 res:build: `rescript`
Exit status 2
I’ve identified that the issue in monorepos appears to be related to path resolution. If you open your IDE at the package or app root level within the monorepo, the dependency information should display correctly. However, if you open the IDE at the monorepo root and use the extension, the information likely won’t appear. I’ll be releasing an updated version that supports monorepos soon.
OH yeah sorry, was on mobile last night but that repo was created specifically for reproducing that issue in rewatch with pnpm. Just thought it’d help showcase project structure
If it’d help, I know how to fix for it and can update the repository so that it actually works
Other loose ideas on this topic (do with it what you will):
Sort nodes on the most vs least dependencies
Filter nodes on least/max amount of dependents and/or dependencies
Highlight all paths to a node
Show what file modules have interfaces vs not
This doesn’t exist, but if Rewatch can produce compilation info (like average speed of compilation for said file) per file, that could be shown per file module as well
@hellos3b@fham@illusionalsagacity I released version v0.5.0 which supports monorepos. After some investigation, it seems that ReScript projects have slightly different monorepo structures. For example, whether the rescript.json file exists in the monorepo root or not. If you encounter any issues with your specific monorepo configuration, please contact me with additional inquiries or create an issue. Thank you.