Skip to content

Remove supress warnings#63

Open
dogagenc wants to merge 1 commit into
pablo-abc:mainfrom
dogagenc:main
Open

Remove supress warnings#63
dogagenc wants to merge 1 commit into
pablo-abc:mainfrom
dogagenc:main

Conversation

@dogagenc

@dogagenc dogagenc commented Mar 4, 2023

Copy link
Copy Markdown

The code line console.warn = ... is causing an error in Firefox that interrupts the program's execution. In addition, I believe that it is not advisable to silence warnings from the framework or UI library when they are used as a sub-package.

@pablo-abc

Copy link
Copy Markdown
Owner

Hey! Is there a way to silence this warnings now? This was added due to many complaints about the "unused prop" warnings. The console can be flooded by these.

@dogagenc

Copy link
Copy Markdown
Author

Hey! Is there a way to silence this warnings now? This was added due to many complaints about the "unused prop" warnings. The console can be flooded by these.

@pablo-abc It is not wise to clear Svelte warnings. What if you miss a warning that helps you to fix a bug? I recommend that you keep it as is. You can always enable/disable warnings in browser console.

@aryzing

aryzing commented Oct 3, 2023

Copy link
Copy Markdown

Second the change. Silently modifying globals is a sure way to cause a lot of pain. If it helps, all modern consoles have filters that can be used to tune out unwanted logs.

@dogagenc

dogagenc commented Oct 3, 2023

Copy link
Copy Markdown
Author

@aryzing Maintainer seems unresponsive. So, i have created and published fixed version to npm. See my comment here:

#64 (comment)

@aryzing

aryzing commented Oct 3, 2023

Copy link
Copy Markdown

Thank you @dogagenc. I'll take a look at your fork.

Fyi @pablo-abc, if you've got too much on your plate now, you may want to consider adding contributors to this repo. Seems that if this repo doesn't receive more attention, more forks may start to take off. Given this repo's popularity, seems we would best served by capturing further improvements here.

@myieye

myieye commented Nov 27, 2023

Copy link
Copy Markdown

@pablo-abc suppressWarnings() appears to be killing our server, because you only undo the override in onMount i.e. on the client, so the server call-stack for console.warn just grows and grows 💥.

2023-11-27T11:20:41.244562118Z server-error-hook RangeError: Maximum call stack size exceeded
    at console.warn (file:///app/server/chunks/FormError-9675a090.js:3981:18)
    at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5)
2023-11-27T11:20:41.244590339Z     at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5)
    at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5)
    at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5)
    at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5)
    at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5)
2023-11-27T11:20:41.244610389Z     at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5)
    at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5)
2023-11-27T11:20:41.244616359Z     at console.warn (file:///app/server/chunks/FormError-9675a090.js:3986:5) {

@myieye

myieye commented Nov 28, 2023

Copy link
Copy Markdown

FYI I opened a PR which is a bit less drastic than just suppressing all the warnings (which are truly annoying).
I also noticed that even SvelteKit supresses warnings like this, so it seems fairly reasonable if done well.

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

Successfully merging this pull request may close these issues.

4 participants