-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Defer throwing asset errors until after dependencies are handled. (#2475
) * Defer throwing asset errors until after dependencies are handled. This allows compiled langauges like Elm that handle their own dependency compilation to set up watchers for dependencies so that hot-reload continues to work due to errors in new depdenencies. Fixes #2147. * Fix Elm error generation. I'm not entirely sure why this fix is necessary, but without it a compile error during a rebuild results in Parcel printing "Unknown error" instead of anything useful. Since we are intecepting the error though, we can also remove redundant stack information. * Add test for tracking dependencies on error * revert hmr-runtime changes * Transform all errors in Pipeline.process. This prevents error data from being lost when Pipeline is run via `WorkerFarm`. * Separate error-depenency test input from basic Elm tests. * Update ElmAsset.js
- Loading branch information
1 parent
d04192b
commit c3d99de
Showing
8 changed files
with
129 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
packages/core/integration-tests/test/integration/elm-dep-error/elm.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"type": "application", | ||
"source-directories": [ | ||
"src" | ||
], | ||
"elm-version": "0.19.0", | ||
"dependencies": { | ||
"direct": { | ||
"elm/browser": "1.0.0", | ||
"elm/core": "1.0.0", | ||
"elm/html": "1.0.0" | ||
}, | ||
"indirect": { | ||
"elm/json": "1.0.0", | ||
"elm/time": "1.0.0", | ||
"elm/url": "1.0.0", | ||
"elm/virtual-dom": "1.0.0" | ||
} | ||
}, | ||
"test-dependencies": { | ||
"direct": {}, | ||
"indirect": {} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
packages/core/integration-tests/test/integration/elm-dep-error/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
var local = require('./src/Main.elm'); | ||
|
||
module.exports = function () { | ||
return local; | ||
}; |
8 changes: 8 additions & 0 deletions
8
packages/core/integration-tests/test/integration/elm-dep-error/src/BrokenDep.elm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module BrokenDep exposing (anError) | ||
|
||
{- This module causes a compiler error -} | ||
|
||
|
||
anError : String | ||
anError = | ||
2 |
7 changes: 7 additions & 0 deletions
7
packages/core/integration-tests/test/integration/elm-dep-error/src/Main.elm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module Main exposing (main) | ||
|
||
import Html | ||
|
||
|
||
main = | ||
Html.text "Hello, world!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters