-
Notifications
You must be signed in to change notification settings - Fork 12
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
Display Tact compilation errors #19
Comments
The Tact compiler does not throw an errors in some cases; instead, it logs them to the console, as detailed in issue tact-lang/tact#262. As a temporary workaround, I have implemented a method to capture console.error outputs and display them in the Nujan log. Please notify me if there are any issues with errors not being logged properly. |
@rahulyadav-57 I think this shall be re-opened, as |
Hi @novusnota, I tested it and it works for me; could you help me to reproduce it? |
Sure @rahulyadav-57, it works in |
@novusnota Instead of intercepting the console which I did previously, which captures everything globally, I propose an alternative solution. We could replace the Something like const disptachEvent = (type, args) => {
const tactEvent = new CustomEvent("tactLogger", {
detail: { data: args, type},
});
document.dispatchEvent(tactEvent);
console[type](args);
}
exports.consoleLogger = {
log: (message) => disptachEvent('log', message),
error: (message) => disptachEvent('log', message),
}; What are your thoughts @anton-trunov on this? |
@rahulyadav-57 I think we should fix it in Tact itself |
In general I would strongly discourage patching things up. Please don't shy away from fixing things in the compiler or any other tool, i.e. where it's relevant |
I agree with you. But for the current or older version of Tact, how should we proceed? |
We can fix the current version of Tact, release it as v1.3.1 and require it should be the minimal Tact version for Nujan |
Yes, that solution would resolve the issue. I'll make the changes and raise a PR. However, in Nujan, we plan to support multiple versions of Tact, including older versions as well. |
Observed behaviour
Upon compilation error, user sees a cryptic "Error while building" message in the log output. And that's it, no details.
Expected behavior or possible solutions
Tact compiler provides details on compilation errors and it would be nice to see them in the log output even if the stack trace is truncated.
The text was updated successfully, but these errors were encountered: