Commit 9e6a305
committed
[Xamarin.Android.Build.Tasks] _LinkAssembliesNoShrink timestamps
Context: 3d999d3#diff-42a9402e6466c65d49d0ee7caf21f327R164
Since 3d999d3, a test is failing downstream in monodroid that is
testing the following scenario:
- With `Fast Deployment` enabled, run `/t:Install`
- Make a small code change
- Run `/t:Install` again
- Assemblies are getting uploaded to the device that should already be
up to date!
3d999d3 was addressing a symptom of the problem, but not the root
cause. The `OutputStep` of the linker has various uses of `File.Copy`,
which *preserves* the timestamp of the source file.
https://github.com/mono/linker/blob/615f62c32705322aeb0f3f15212a3dbb94b7f0aa/linker/Linker.Steps/OutputStep.cs#L187
The solution, then, is to run the `<Touch />` MSBuild task on the
linker's output. This will keep the proper timestamps, and a portion
of the changes in 3d999d3 are no longer needed.
I updated the `CheckTimestamps` test to validate `Debug` and `Release`
configurations, so `_LinkAssembliesShrink` is also tested in this
manner. It turns out `_LinkAssembliesShrink` is currently working
fine, since it uses `$(_AndroidLinkFlag)` as its `Outputs`.1 parent e2967da commit 9e6a305
File tree
3 files changed
+15
-8
lines changed- src/Xamarin.Android.Build.Tasks
- Tasks
- Tests/Xamarin.Android.Build.Tests
3 files changed
+15
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | | - | |
| 163 | + | |
165 | 164 | | |
166 | | - | |
167 | 165 | | |
168 | 166 | | |
169 | 167 | | |
| |||
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
212 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
213 | 215 | | |
214 | 216 | | |
215 | 217 | | |
| |||
240 | 242 | | |
241 | 243 | | |
242 | 244 | | |
243 | | - | |
| 245 | + | |
| 246 | + | |
244 | 247 | | |
245 | 248 | | |
246 | 249 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2078 | 2078 | | |
2079 | 2079 | | |
2080 | 2080 | | |
2081 | | - | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
2082 | 2088 | | |
2083 | 2089 | | |
2084 | 2090 | | |
| |||
0 commit comments