Commit 247f52a
fix(packager): "packaging application" log never stops when building for multiple architectures (#3006)
* Fix "packaging application" log never stopping when building for multiple architectures
There's some kinda complex race condition ish behaviour in the current way the packagerSpinner is handled.
At the moment there's one variable for all architectures, that gets created in one of the later afterCopyHooks, and dismissed both in the first hook, and at the end of all the hooks. This would work if architectures where built for sequentially, but, at least on my system, these builds happen in parallel. Meaning one of the architectures packageSpinners overwrites the other, before the first is dismissed. At the end of the build the second packageSpinner has success fired on it, while the first continues to spin, preventing the process from exiting.
The solution in this commit is far less than ideal.
Constraints:
- Without access to the list of architectures (the function to generate that list is not exported from electron-packer) we don't even know how many architectures we're building for.
- This one is a little self-imposed, and maybe not a constraint for the project, but the code aims not to change any public facing apis. So we need to have one spinner we can pass to the postPackage hook. https://www.electronforge.io/configuration#postpackage
Given these constraints the solution in this commit has one initial prepare / package spinner. AS well as prepare / package spinners per architecture.
One downside is if the afterCopyHooks are executed one architecture at a time, instead of parallelized by architecture, the overarching prepareSpinner could be ended early, (though architecture specific prepare spinners would still be accurate).
* Simplify Package spinners, removing prepackage & making package smarter.
* build: update electron-packager
Co-authored-by: Samuel Attard <sattard@salesforce.com>1 parent 300387f commit 247f52aCopy full SHA for 247f52a
6 files changed
+83-47Lines changed: 83 additions & 47 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- packages
- api/core
- src/api
- plugin/webpack
- utils/types
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
52 | 52 | |
53 | 53 | |
54 | 54 | |
55 | | - |
| 55 | + |
56 | 56 | |
57 | 57 | |
58 | 58 | |
|
Collapse file
packages/api/core/package.json
Copy file name to clipboardExpand all lines: packages/api/core/package.json+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
52 | 52 | |
53 | 53 | |
54 | 54 | |
55 | | - |
| 55 | + |
56 | 56 | |
57 | 57 | |
58 | 58 | |
|
Collapse file
packages/api/core/src/api/package.ts
Copy file name to clipboardExpand all lines: packages/api/core/src/api/package.ts+66-30Lines changed: 66 additions & 30 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | 3 | |
4 | | - |
| 4 | + |
5 | 5 | |
6 | 6 | |
7 | 7 | |
8 | 8 | |
9 | 9 | |
10 | | - |
| 10 | + |
11 | 11 | |
12 | 12 | |
13 | 13 | |
| ||
25 | 25 | |
26 | 26 | |
27 | 27 | |
28 | | - |
| 28 | + |
29 | 29 | |
30 | | - |
| 30 | + |
31 | 31 | |
32 | 32 | |
33 | 33 | |
34 | 34 | |
35 | 35 | |
36 | | - |
| 36 | + |
37 | 37 | |
| 38 | + |
38 | 39 | |
39 | 40 | |
40 | 41 | |
| ||
44 | 45 | |
45 | 46 | |
46 | 47 | |
47 | | - |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
48 | 53 | |
49 | 54 | |
50 | 55 | |
51 | 56 | |
52 | 57 | |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
53 | 72 | |
54 | 73 | |
55 | 74 | |
| ||
83 | 102 | |
84 | 103 | |
85 | 104 | |
86 | | - |
87 | | - |
| 105 | + |
88 | 106 | |
89 | 107 | |
90 | 108 | |
| ||
100 | 118 | |
101 | 119 | |
102 | 120 | |
103 | | - |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
104 | 137 | |
105 | 138 | |
106 | 139 | |
107 | 140 | |
108 | 141 | |
109 | | - |
110 | | - |
111 | | - |
112 | | - |
113 | | - |
114 | 142 | |
115 | 143 | |
116 | 144 | |
117 | 145 | |
118 | 146 | |
119 | 147 | |
120 | 148 | |
121 | | - |
122 | 149 | |
123 | 150 | |
124 | 151 | |
125 | 152 | |
126 | 153 | |
127 | | - |
128 | 154 | |
129 | 155 | |
130 | | - |
131 | | - |
132 | | - |
133 | | - |
134 | | - |
135 | | - |
136 | | - |
137 | | - |
138 | | - |
139 | | - |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | + |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | + |
| 170 | + |
| 171 | + |
| 172 | + |
| 173 | + |
140 | 174 | |
141 | | - |
| 175 | + |
| 176 | + |
| 177 | + |
142 | 178 | |
143 | 179 | |
144 | 180 | |
| ||
168 | 204 | |
169 | 205 | |
170 | 206 | |
| 207 | + |
171 | 208 | |
172 | 209 | |
173 | 210 | |
| ||
202 | 239 | |
203 | 240 | |
204 | 241 | |
205 | | - |
| 242 | + |
206 | 243 | |
207 | 244 | |
208 | | - |
209 | | - |
| 245 | + |
210 | 246 | |
Collapse file
packages/plugin/webpack/package.json
Copy file name to clipboardExpand all lines: packages/plugin/webpack/package.json+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
14 | 14 | |
15 | 15 | |
16 | 16 | |
17 | | - |
| 17 | + |
18 | 18 | |
19 | 19 | |
20 | 20 | |
|
Collapse file
packages/utils/types/package.json
Copy file name to clipboardExpand all lines: packages/utils/types/package.json+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
9 | 9 | |
10 | 10 | |
11 | 11 | |
12 | | - |
| 12 | + |
13 | 13 | |
14 | 14 | |
15 | 15 | |
|
Collapse file
+13-13Lines changed: 13 additions & 13 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1141 | 1141 | |
1142 | 1142 | |
1143 | 1143 | |
| 1144 | + |
| 1145 | + |
| 1146 | + |
| 1147 | + |
| 1148 | + |
| 1149 | + |
| 1150 | + |
| 1151 | + |
1144 | 1152 | |
1145 | 1153 | |
1146 | 1154 | |
| ||
3904 | 3912 | |
3905 | 3913 | |
3906 | 3914 | |
3907 | | - |
3908 | | - |
3909 | | - |
3910 | | - |
3911 | | - |
3912 | | - |
3913 | | - |
3914 | | - |
3915 | | - |
3916 | | - |
3917 | | - |
3918 | | - |
| 3915 | + |
| 3916 | + |
| 3917 | + |
| 3918 | + |
3919 | 3919 | |
3920 | 3920 | |
3921 | 3921 | |
| 3922 | + |
3922 | 3923 | |
3923 | 3924 | |
3924 | 3925 | |
3925 | 3926 | |
3926 | | - |
3927 | 3927 | |
3928 | 3928 | |
3929 | 3929 | |
|
0 commit comments