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

Verbose warning option? #1485

Open
josh-degraw opened this issue Mar 30, 2021 · 5 comments
Open

Verbose warning option? #1485

josh-degraw opened this issue Mar 30, 2021 · 5 comments
Labels
bug It went crazy and killed everyone. help wanted

Comments

@josh-degraw
Copy link

josh-degraw commented Mar 30, 2021

Is your feature request related to a problem? Please describe.

I've been trying to debug some issues on my app to get it compatible with IE 11. In the process, I'm encountering a lot of warnings (only in IE) e.g. Warning [JSS] SyntaxError, Warning: [JSS] Rule is not linked. Missing sheet option "link: true".. I'm sure there's a valid reason for the warnings, but I'm at a loss as to where they are being triggered from or what the exact problems are, because the above warnings are the only information I have.

Describe the solution you'd like
Ideally, I would like to at least have the option of seeing the full error stack when warnings are encountered by jss, so I can more easily identify what is causing the issues I'm running into. I'm not sure if such a behavior already exists, but from my investigation so far I have not found any.

Are you willing to implement it?
Yes

@kof
Copy link
Member

kof commented Apr 1, 2021

I would love to see a proper issue and a reproduction on codesandbox. By proper I mean the minimal thing that triggers a warning. Then we can see why the warning is wrong or how to make it more helpful if it is not wrong.

Silencing warnings instead of fixing them sounds like a not very healthy strategy. At the very end you can always override console.warn in your app and filter warnings, but I don't think this is a good way of dealing with them in general.

@kof
Copy link
Member

kof commented Apr 1, 2021

Also be sure to check other issues, maybe this is already reported.

@josh-degraw
Copy link
Author

I apologize if I wasn't clear enough in what I was asking for. I never said that the warnings are wrong or shouldn't be there.

What I'm saying is that I'm sure the warnings are there for a reason, and are valid, but literally the only thing that shows in some of these warnings is Warning [JSS] SyntaxError, with no other information.

I'm asking for an option to have more warning information, not less.

Because without something like the error's stack trace, I have no idea where the warning is coming from or what's triggering it, so I can't really fix it, since I don't have any idea what that error really was. And since I'm only getting that warning logged in IE, I know it's not just something with my code in general, it's some IE quirk. And without the further context, I can't identify the actual problem.

@kof
Copy link
Member

kof commented Apr 1, 2021

I agree this is suboptimal, stacktrace or more info should be provided, but for now, here are 2 options:

  1. open jss in node_modules and literall ythrow an error where this warning is triggered, it seems it can only be this one, all others have a more specific message

  2. Another option - bisecting

@kof
Copy link
Member

kof commented Apr 26, 2021

Could be related #1492

@kof kof added bug It went crazy and killed everyone. help wanted labels Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It went crazy and killed everyone. help wanted
Projects
None yet
Development

No branches or pull requests

2 participants