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

Rescript compile errors not being displayed on code. #384

Closed
henriquezago opened this issue Jul 23, 2022 · 9 comments
Closed

Rescript compile errors not being displayed on code. #384

henriquezago opened this issue Jul 23, 2022 · 9 comments

Comments

@henriquezago
Copy link

plugin version: 0.106.1-2022.1

Description

I know the README says Rescript users, please use other editor. so I come with the intention to start contributing here if possible.

If anyone could give me a hint on how to make the rescript compile errors display at the code where it origins, that would be amazing.
More importantly, is it possible to do so? Would be good to have an insight before setting up my dev env.
Screen Shot 2022-07-23 at 11 00 51

I prefer Webstorm features to run tests, scripts and merge conflicts, but having to chase compile errors from the console is a bit counter-productive, so I keep using VSC as my main editor.

@giraud
Copy link
Owner

giraud commented Jul 25, 2022

Hi. it should be able to display the error.
given the names of your component, do you use automatic namespacing in your project ?
is the project public and available ?

@henriquezago
Copy link
Author

@giraud unfortunately the project is not public.
Forgive me, but I'm not entirely sure about the automatic namespacing, the project has many modules and their bsconfig.json have:
name: "@[companyName]/[moduleName]"
namespace: true

@henriquezago
Copy link
Author

I've added a System.out.println("line: " + line); at RescriptOutputAnalyzer.java:28 and the output was:

line: sh: -c: line 0: unexpected EOF while looking for matching `''
line: sh: -c: line 1: syntax error: unexpected end of file
line: File "/private/var/folders/gk/dz5wt7kj3gz03_xy6_d6fg0c0000gn/T/BS_walnut_monorepo/RangeCalendar.res", line 1, characters 0-0:
line: Error: Error while running external preprocessor
line: Command line: '/Users/henriquelobatozago/Development/walnut_monorepo/node_modules/bisect_ppx/ppx '/var/folders/gk/dz5wt7kj3gz03_xy6_d6fg0c0000gn/T/ppx47a6cdRangeCalendar.res' '/var/folders/gk/dz5wt7kj3gz03_xy6_d6fg0c0000gn/T/ppx7d57eaRangeCalendar.res'
line: 
2022-07-25 15:33:37,107 [  30433]   WARN - R.h.rincewind - Failure: Sys_error("/private/var/folders/gk/dz5wt7kj3gz03_xy6_d6fg0c0000gn/T/BS_walnut_monorepo/RangeCalendar.cmt: No such file or directory")

RangeCalendar.res is the file where I scrambled a module name to produce an error.

@giraud
Copy link
Owner

giraud commented Jul 25, 2022

namespace: true is automatic namespacing.
automatic namespacing is not really supported in plugin

@giraud
Copy link
Owner

giraud commented Jul 25, 2022

if you want more debug, you can use the debug log settings in help | diagnostic tools.
use ReasonML for all debug, and ReasonML.xxxx for a specific log

@henriquezago
Copy link
Author

@giraud do you have any information or hints on supporting automatic namespacing?
It's been a while but I remember having no idea on how to proceed with this.

@giraud
Copy link
Owner

giraud commented Jan 24, 2023

I suspect there is another problem that prevent error location to be parsed correctly for rescript logs.
I have it sometimes even for projects that have no namespace. Some issue in console filters, I don’t know the root cause.

@giraud
Copy link
Owner

giraud commented Feb 8, 2023

I found the root cause, it will be fixed in next release

giraud added a commit that referenced this issue Feb 9, 2023
giraud added a commit that referenced this issue Feb 9, 2023
giraud added a commit that referenced this issue Mar 1, 2023
@giraud
Copy link
Owner

giraud commented Mar 1, 2023

fixed in 0.110

@giraud giraud closed this as completed Mar 1, 2023
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

2 participants