Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

fix: refactor error annotation, to not loose original error #1152

Merged
merged 1 commit into from
Jul 19, 2022
Merged

Conversation

danez
Copy link
Contributor

@danez danez commented Jul 19, 2022

With the previous approach all custom error properties like for example code were lost
Instead of wrapping the error we now only add the customErrorInfo and leave it untouched otherwise.

The current version of zisi breaks @netlify/build because it makes some assumptions about errors (message, code, type) that were changed in #1146

With the previous approach for example `code` was lost
Instead of wrapping the error we now only annotate it
@danez danez added the type: bug code to address defects in shipped code label Jul 19, 2022
@danez danez requested a review from a team July 19, 2022 11:58
@github-actions
Copy link
Contributor

⏱ Benchmark results

Comparing with eb1d3dd

largeDepsEsbuild: 7.8s

⬇️ 4.14% decrease vs. eb1d3dd

^                                                                   8.2s          
│                                                                   ┌──┐    7.8s  
│                                                   7.4s            |  |    ┌──┐  
│                                                   ┌──┐            |  |    |▒▒|  
│                                                   |  |            |  |    |▒▒|  
│ ──────────────────6.2s─────────────6s──────6s─────┼──┼─────6s─────┼──┼────|▒▒|──
│   5.9s    5.9s    ┌──┐    5.8s    ┌──┐    ┌──┐    |  |    ┌──┐    |  |    |▒▒|  
│   ┌──┐    ┌──┐    |  |    ┌──┐    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    T-9     T-8     T-7     T-6     T-5     T-4     T-3     T-2     T-1      T    
Legend

largeDepsNft: 37.5s

⬇️ 9.01% decrease vs. eb1d3dd

^                                                                  40.9s          
│                                                  38.7s            ┌──┐          
│                                                   ┌──┐            |  |   37.5s  
│                                                   |  |            |  |    ┌──┐  
│                                                   |  |            |  |    |▒▒|  
│ ─────────────────────────────────────────29.8s────┼──┼───29.8s────┼──┼────|▒▒|──
│  29.2s   29.1s                            ┌──┐    |  |    ┌──┐    |  |    |▒▒|  
│   ┌──┐    ┌──┐           26.8s            |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |            ┌──┐            |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |            |  |            |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |            |  |            |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |            |  |            |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |            |  |            |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |            |  |            |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |            |  |            |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |            |  |            |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |            |  |            |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |            |  |            |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |            |  |            |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |            |  |            |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |            |  |            |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    n/a     |  |    n/a     |  |    |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────────────┴──┴────────────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    T-9     T-8     T-7     T-6     T-5     T-4     T-3     T-2     T-1      T    
Legend

largeDepsZisi: 56.8s

⬇️ 0.60% decrease vs. eb1d3dd

^                                                                  57.1s   56.8s  
│                                                  54.3s            ┌──┐    ┌──┐  
│                                                   ┌──┐            |  |    |▒▒|  
│                                                   |  |            |  |    |▒▒|  
│ ─────────────────45.7s───────────────────44.8s────┼──┼────────────┼──┼────|▒▒|──
│  43.7s            ┌──┐   41.8s    44s     ┌──┐    |  |   44.2s    |  |    |▒▒|  
│   ┌──┐            |  |    ┌──┐    ┌──┐    |  |    |  |    ┌──┐    |  |    |▒▒|  
│   |  |            |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |            |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |            |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |            |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |            |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |            |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |            |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |            |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |            |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |            |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |            |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |            |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |            |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |            |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    n/a     |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
└───┴──┴────────────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    T-9     T-8     T-7     T-6     T-5     T-4     T-3     T-2     T-1      T    
Legend

@danez danez merged commit adc08c5 into main Jul 19, 2022
@danez danez deleted the error branch July 19, 2022 12:44
Skn0tt pushed a commit to netlify/build that referenced this pull request May 21, 2024
…zip-it-and-ship-it#1152)

With the previous approach for example `code` was lost
Instead of wrapping the error we now only annotate it
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants