You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.
We’ve run into an issue where use of Math.abs is causing the build task to fail silently, generating only a subset of our components. The issue is similar to what is described in #114, but it not only stops JS compilation: a handful of components (their templates, stylesheets, even their directories) are entirely omitted from compilation and the build task completes “successfully”. Removing the offending line consistently causes the previously missing components to be compiled correctly.
Possible root cause
I believe the issue is that gulp-babel (or, more precisely, @babel/minify) is emitting an error, but because there is no handling in emulsify-gulp, we never hear of it. Since this project uses Gulp pre-v4 (which does not fail on thrown errors), the task fails silently. I suspect a failure of the scripts task is causing the pl:full task to stop rendering components because tasks are run in parallel the way they are declared here, but I could be wrong about that. What I can say for sure is that removing Math.abs from the offending JS file results in correctly-compiled components, and re-introducing Math.abs consistently causes the problem to arise.
Proposed solution
Logging the error to the console would, at the very least, make the problem more visible. Ideally, however, we would find a way to surface the error by exiting with a non-zero code, at least in the case of the build task (I realize this would be annoying in the theme task, though we should at least be logging bright red errors to the console in that case).
The text was updated successfully, but these errors were encountered:
We were looking at this this afternoon, and we found that the specific error emitted by gulp-babel was "Could not find intersection".
We didn't have time today to run it down to the source, but we did find that the workaround in the babel issue--calling gulp-babel with [minify, {builtIns: false}]--will do as a temporary fix.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We’ve run into an issue where use of
Math.abs
is causing thebuild
task to fail silently, generating only a subset of our components. The issue is similar to what is described in #114, but it not only stops JS compilation: a handful of components (their templates, stylesheets, even their directories) are entirely omitted from compilation and thebuild
task completes “successfully”. Removing the offending line consistently causes the previously missing components to be compiled correctly.Possible root cause
I believe the issue is that
gulp-babel
(or, more precisely,@babel/minify
) is emitting an error, but because there is no handling inemulsify-gulp
, we never hear of it. Since this project uses Gulp pre-v4 (which does not fail on thrown errors), the task fails silently. I suspect a failure of thescripts
task is causing thepl:full
task to stop rendering components because tasks are run in parallel the way they are declared here, but I could be wrong about that. What I can say for sure is that removingMath.abs
from the offending JS file results in correctly-compiled components, and re-introducingMath.abs
consistently causes the problem to arise.Proposed solution
Logging the error to the console would, at the very least, make the problem more visible. Ideally, however, we would find a way to surface the error by exiting with a non-zero code, at least in the case of the
build
task (I realize this would be annoying in thetheme
task, though we should at least be logging bright red errors to the console in that case).The text was updated successfully, but these errors were encountered: