Commit c0d34aa
authored
Call
This commit fixes an issue where `--code-coverage=@path` does not work
if `path` has any symlinks in it (which happens e.g. when testing `Pkg`
in tree - ref #60058). The issue is that we call `realpath` on the cli
argument, but do not currently call realpath when inserting the
instrumentation. One fix would be to stop calling realpath on the cli
argument, but that has the potential to break users who rely on this
behavior.
The other fix (implemented here) is to also call realpath when doing the
comparison. However, this is a bit aweful, because, as currently
structured, this requires us to do a file system query for every line
table entry. Most of those line table entries will probably have the
same file, so that's a lot of redundant (and depending on filesystem,
potentially expensive work).
That said, I think this is the best solution for the time being. At some
point in the near future we need to completely overhaul all and move the
filtering to the writer side (rather than during codegen), as well as
making coverage cacheable and work in the interpreter. Until then, this
at least helps with addressing the test failure.realpath before comparing coverage paths (#60088)1 parent 3747300 commit c0d34aa
3 files changed
+17
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8898 | 8898 | | |
8899 | 8899 | | |
8900 | 8900 | | |
8901 | | - | |
| 8901 | + | |
| 8902 | + | |
| 8903 | + | |
| 8904 | + | |
| 8905 | + | |
| 8906 | + | |
8902 | 8907 | | |
8903 | 8908 | | |
8904 | 8909 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1170 | 1170 | | |
1171 | 1171 | | |
1172 | 1172 | | |
1173 | | - | |
| 1173 | + | |
1174 | 1174 | | |
1175 | 1175 | | |
1176 | 1176 | | |
| |||
1245 | 1245 | | |
1246 | 1246 | | |
1247 | 1247 | | |
1248 | | - | |
| 1248 | + | |
1249 | 1249 | | |
1250 | 1250 | | |
1251 | 1251 | | |
| |||
1260 | 1260 | | |
1261 | 1261 | | |
1262 | 1262 | | |
1263 | | - | |
| 1263 | + | |
1264 | 1264 | | |
1265 | 1265 | | |
1266 | 1266 | | |
1267 | 1267 | | |
1268 | 1268 | | |
1269 | 1269 | | |
1270 | | - | |
| 1270 | + | |
1271 | 1271 | | |
1272 | | - | |
| 1272 | + | |
1273 | 1273 | | |
1274 | | - | |
| 1274 | + | |
1275 | 1275 | | |
1276 | | - | |
| 1276 | + | |
1277 | 1277 | | |
1278 | | - | |
| 1278 | + | |
1279 | 1279 | | |
1280 | 1280 | | |
1281 | 1281 | | |
1282 | | - | |
| 1282 | + | |
1283 | 1283 | | |
1284 | 1284 | | |
1285 | 1285 | | |
1286 | 1286 | | |
1287 | 1287 | | |
1288 | 1288 | | |
1289 | | - | |
| 1289 | + | |
1290 | 1290 | | |
1291 | 1291 | | |
1292 | 1292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1909 | 1909 | | |
1910 | 1910 | | |
1911 | 1911 | | |
| 1912 | + | |
1912 | 1913 | | |
1913 | 1914 | | |
1914 | 1915 | | |
| |||
0 commit comments