Commit bbd2eeb
committed
fix(build): refuse to cache an index package whose upstream is local
A key covers an upstream package by folding in that package's KEY, and a local
package's key covers its file list but not its file contents — nothing could,
without hashing a tree that may change between the hash and the compile. So a
cached downstream entry would keep looking valid after a local upstream's source
was edited.
No index descriptor can declare a path dependency today, which makes the shape
unreachable in practice. Enforced structurally anyway: "unreachable today" is
exactly how the transitive path-dep leak got in.
Also asserts the invariant that cache-served units keep their
compile_commands.json entries — they stay in the plan on purpose so clangd does
not lose the dependency's sources.1 parent 5daaacb commit bbd2eeb
2 files changed
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3902 | 3902 | | |
3903 | 3903 | | |
3904 | 3904 | | |
| 3905 | + | |
| 3906 | + | |
| 3907 | + | |
| 3908 | + | |
| 3909 | + | |
| 3910 | + | |
| 3911 | + | |
| 3912 | + | |
| 3913 | + | |
| 3914 | + | |
| 3915 | + | |
| 3916 | + | |
| 3917 | + | |
3905 | 3918 | | |
3906 | 3919 | | |
3907 | 3920 | | |
| |||
3933 | 3946 | | |
3934 | 3947 | | |
3935 | 3948 | | |
| 3949 | + | |
| 3950 | + | |
| 3951 | + | |
| 3952 | + | |
3936 | 3953 | | |
3937 | 3954 | | |
3938 | 3955 | | |
3939 | 3956 | | |
| 3957 | + | |
3940 | 3958 | | |
3941 | 3959 | | |
3942 | 3960 | | |
| |||
3979 | 3997 | | |
3980 | 3998 | | |
3981 | 3999 | | |
| 4000 | + | |
| 4001 | + | |
3982 | 4002 | | |
3983 | 4003 | | |
3984 | 4004 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1040 | 1040 | | |
1041 | 1041 | | |
1042 | 1042 | | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
0 commit comments