-
Notifications
You must be signed in to change notification settings - Fork 427
prepack.io/repl.html doesn't show code in presence of warnings #2285
Comments
Hi @NTillmann, I would love to take this issue ! As far as I see this would be something like adding another clause here: https://github.com/facebook/prepack/blob/067a378227d0c2034aa963c8981cf243356f349a/website/js/repl.js#L170 with a "warning" type branch and modifying: https://github.com/facebook/prepack/blob/067a378227d0c2034aa963c8981cf243356f349a/website/js/repl-worker.js#L40 to dispatch a "warning" instead of just success/error, right ? I will need to look further on Prepack code to know how warnings are formatted in order to know which kind of result to dispatch. Do you we want to display the generated code as well as the warning message underneath ? Btw, I come from the React podcast, very interesting episode ! EDIT:found that |
Summary: cc NTillmann Following up #2285, website shows the generated coded even when there are some warnings. Lot of changes because prettier wasn't applied to the files, but I basically only checked for the error buffer containing only items with `severity === 'Warning'` and create the `warning` result type to behave the same than `success` one. Next step would be to show the code AND warning messages. Either using the same display than error messages or creating a variation of it (changing text color to yellow for example). I can do it if you want. Let me know if this is what you were looking for. Have a nice day ! P.S: not sure if this PR was supposed to be into `gh-pages` or `master`. Let me know if that needs to be changed. Pull Request resolved: #2528 Differential Revision: D9882040 Pulled By: NTillmann fbshipit-source-id: bc8266a673e6def023bfa65b93b94ea9c7ad5b1d
Shouldn't this be closed or is there still something I can help with? |
It should be closed, yes. And same than @bencooper222, let me know if there is anything else you need help with ! |
Already fixed. Thanks! |
Check out:
https://prepack.io/repl.html#BQMwrgdgxgLglgewgAmASmQbwFDOQGwFMZkFkBeLAXwG5dlxp4kH0t68EA6ADwuQBMAZjp48AJ2JhxKBKORV6AfSUIADvAC2cAF6FQaeQHN8CAEYBDfFxD8QdKmnQ0gA
Perfectly prepackable, but the (newly introduced) warning causes the website to not show the generated code.
The text was updated successfully, but these errors were encountered: