File TODO.md added (mode: 100644) (index 0000000..0085f2f) |
|
1 |
|
# Core # |
|
2 |
|
|
|
3 |
|
## Determine build predecessor by commits and branches. ## |
|
4 |
|
|
|
5 |
|
| ID | Status | Type | |
|
6 |
|
|------|-----------|---------------| |
|
7 |
|
| ARY | planned | improvement | |
|
8 |
|
|
|
9 |
|
Currently it's just a mapping of `N` to `N - 1`. |
|
10 |
|
|
|
11 |
|
The implementation could be as follows: |
|
12 |
|
|
|
13 |
|
1. Collect commit ids from all previous builds (with `id < N`). (This is cheap.) |
|
14 |
|
These must be ordered by branch matching branch of current build and then by |
|
15 |
|
build ids. |
|
16 |
|
2. Do breadth first search from commit of current build. Pseudo-code: |
|
17 |
|
|
|
18 |
|
knownIdsToBuildIdsMap; |
|
19 |
|
if (knownIdsToBuildIdsMap.empty()) { |
|
20 |
|
return {}; |
|
21 |
|
} |
|
22 |
|
|
|
23 |
|
ids = { <current build's commit> }; |
|
24 |
|
while (!ids.empty()) { |
|
25 |
|
newIds = {}; |
|
26 |
|
for (id : ids) { |
|
27 |
|
for (parent : id.parents()) { |
|
28 |
|
if (parent in knownIdsToBuildIdsMap) { |
|
29 |
|
return knownIdsToBuildIdsMap[parent]; |
|
30 |
|
} |
|
31 |
|
|
|
32 |
|
newIds.insert(parent); |
|
33 |
|
} |
|
34 |
|
} |
|
35 |
|
ids = newIds; |
|
36 |
|
} |
|
37 |
|
return {}; |
|
38 |
|
|
|
39 |
|
|
|
40 |
|
We might want to actually find *the closest* build instead of the first one, |
|
41 |
|
this should give better results. This can be even slower, so a persistent cache |
|
42 |
|
could be needed. |
|
43 |
|
|
|
44 |
|
This can be somewhat slow, so some caching could be useful. |
|
45 |
|
For that we could use memoization in a function like `getCommitParents()` that |
|
46 |
|
would remember its results. |
|
47 |
|
|
|
48 |
|
Functions to use: |
|
49 |
|
- `git_commit_parent_id()` |
|
50 |
|
- `git_commit_parentcount()` |
|
51 |
|
|
|
52 |
|
## @branch notation to lookup the latest build on that branch. ## |
|
53 |
|
|
|
54 |
|
| ID | Status | Type | |
|
55 |
|
|------|-------------|------------| |
|
56 |
|
| ERY | undecided | addition | |
|
57 |
|
|
|
58 |
|
At least one use case when it's handy is when you're at `feature` branch |
|
59 |
|
and want to see how things changed relative to `master` branch: |
|
60 |
|
|
|
61 |
|
uncov changed @master @@ |
|
62 |
|
|
|
63 |
|
## Maybe display commit information in `build`. ## |
|
64 |
|
|
|
65 |
|
| ID | Status | Type | |
|
66 |
|
|------|-------------|------------| |
|
67 |
|
| GSY | undecided | addition | |
|
68 |
|
|
|
69 |
|
## Maybe indicate when build matches repo reference. ## |
|
70 |
|
|
|
71 |
|
| ID | Status | Type | |
|
72 |
|
|------|-------------|--------| |
|
73 |
|
| JRY | undecided | idea | |
|
74 |
|
|
|
75 |
|
That is when `HEAD` of non-bare repositories matches commit of builds or |
|
76 |
|
maybe even when branch ref matches build commit. |
|
77 |
|
|
|
78 |
|
Maybe should also indicate "temporary" commits somehow. |
|
79 |
|
|
|
80 |
|
## Source-highlight hangs if passed in std::istream is at EOF? ## |
|
81 |
|
|
|
82 |
|
| ID | Status | Type | |
|
83 |
|
|------|-------------|---------| |
|
84 |
|
| MRY | undecided | issue | |
|
85 |
|
|
|
86 |
|
Need to check on their trunk and see if happens there (should do nothing |
|
87 |
|
instead). |
|
88 |
|
|
|
89 |
|
## Maybe make use of information about file contents change. ## |
|
90 |
|
|
|
91 |
|
| ID | Status | Type | |
|
92 |
|
|------|-------------|--------| |
|
93 |
|
| NRY | undecided | idea | |
|
94 |
|
|
|
95 |
|
Could: |
|
96 |
|
* Mark somehow files that are changed between builds (changed by contents). |
|
97 |
|
* Could list them separately or just indicate as changed. |
|
98 |
|
|
|
99 |
|
Coveralls has four listings: |
|
100 |
|
* All |
|
101 |
|
* Changed |
|
102 |
|
* Source Changed |
|
103 |
|
* Coverage Changed |
|
104 |
|
Not all seem to be awfully useful though. |
|
105 |
|
|
|
106 |
|
## Introduce DBException and RepositoryException classes? ## |
|
107 |
|
|
|
108 |
|
| ID | Status | Type | |
|
109 |
|
|------|-------------|---------------| |
|
110 |
|
| PRY | undecided | improvement | |
|
111 |
|
|
|
112 |
|
This can help make some error messages better, but is it really that useful |
|
113 |
|
(not sure handling of exceptions will actually differ, so maybe only to |
|
114 |
|
provide more details about the error). |
|
115 |
|
|
|
116 |
|
## Maybe something to exclude files. ## |
|
117 |
|
|
|
118 |
|
| ID | Status | Type | |
|
119 |
|
|------|-------------|------------| |
|
120 |
|
| VRY | undecided | addition | |
|
121 |
|
|
|
122 |
|
Or should this be handled by coverage providers? |
|
123 |
|
|
|
124 |
|
## Named pipes can be employed to pass multiple files to pager. ## |
|
125 |
|
|
|
126 |
|
| ID | Status | Type | |
|
127 |
|
|------|-------------|--------| |
|
128 |
|
| WRY | undecided | idea | |
|
129 |
|
|
|
130 |
|
## A way to disable file highlighting. ## |
|
131 |
|
|
|
132 |
|
| ID | Status | Type | |
|
133 |
|
|------|-----------|---------------| |
|
134 |
|
| YRY | planned | improvement | |
|
135 |
|
|
|
136 |
|
It's slow for huge diffs/files (quite understandable). |
|
137 |
|
|
|
138 |
|
## More code documentation comments. ## |
|
139 |
|
|
|
140 |
|
| ID | Status | Type | |
|
141 |
|
|------|---------------|--------| |
|
142 |
|
| ZRY | in progress | task | |
|
143 |
|
|
|
144 |
|
## Language detection for file highlight relies on file name only. ## |
|
145 |
|
|
|
146 |
|
| ID | Status | Type | |
|
147 |
|
|------|-------------|---------| |
|
148 |
|
| aRY | undecided | issue | |
|
149 |
|
|
|
150 |
|
Could examine for shebang or even employ `libmagic`. |
|
151 |
|
|
|
152 |
|
## Add configuration. ## |
|
153 |
|
|
|
154 |
|
| ID | Status | Type | |
|
155 |
|
|------|-----------|------------| |
|
156 |
|
| gRY | planned | addition | |
|
157 |
|
|
|
158 |
|
Could use git config file in repos (or shouldn't?). |
|
159 |
|
|
|
160 |
|
Another suitable place is separate table in the database. |
|
161 |
|
|
|
162 |
|
And might need a global one at some point too. |
|
163 |
|
|
|
164 |
|
## Maybe introduce range syntax to specify two builds. ## |
|
165 |
|
|
|
166 |
|
| ID | Status | Type | |
|
167 |
|
|------|-------------|--------| |
|
168 |
|
| kRY | undecided | idea | |
|
169 |
|
|
|
170 |
|
E.g. `@10..@@`. |
|
171 |
|
|
|
172 |
|
## Maybe differentiate between ##### and ===== in gcov output. ## |
|
173 |
|
|
|
174 |
|
| ID | Status | Type | |
|
175 |
|
|------|-------------|---------------| |
|
176 |
|
| nRY | undecided | improvement | |
|
177 |
|
|
|
178 |
|
`#####` means not reached on normal path. |
|
179 |
|
|
|
180 |
|
`=====` is the same, but for exceptional paths (inside `catch` branches). |
|
181 |
|
|
|
182 |
|
## Consider displaying line numbers in "diff". ## |
|
183 |
|
|
|
184 |
|
| ID | Status | Type | |
|
185 |
|
|------|-------------|----------| |
|
186 |
|
| qRY | undecided | change | |
|
187 |
|
|
|
188 |
|
They are sometimes useful, but not always (and take up space). |
|
189 |
|
|
|
190 |
|
So maybe add, but make it configurable. |
|
191 |
|
|
|
192 |
|
## "branch" subcommand to show builds of only one branch. ## |
|
193 |
|
|
|
194 |
|
| ID | Status | Type | |
|
195 |
|
|------|-------------|------------| |
|
196 |
|
| tRY | undecided | addition | |
|
197 |
|
|
|
198 |
|
Or extend `builds` accordingly. |
|
199 |
|
|
|
200 |
|
## Consider basic history editing. ## |
|
201 |
|
|
|
202 |
|
| ID | Status | Type | |
|
203 |
|
|------|-------------|--------| |
|
204 |
|
| uRY | undecided | idea | |
|
205 |
|
|
|
206 |
|
Maybe add an option to `new` or separate command (e.g. `amend`) or a way to |
|
207 |
|
edit build history. This can make it easier to see new coverage while |
|
208 |
|
developing and then discarding that temporary data or to drop accidental/broken |
|
209 |
|
builds. |
|
210 |
|
|
|
211 |
|
Maybe just allow at most one build from working tree. |
|
212 |
|
|
|
213 |
|
Maybe store uncommitted files in the database directly. Stray commit is |
|
214 |
|
created now by `uncov-gcov`. |
|
215 |
|
|
|
216 |
|
Removed/deleted builds could just be marked as such to do not affect numbering. |
|
217 |
|
|
|
218 |
|
## More flexible way to specify database location. ## |
|
219 |
|
|
|
220 |
|
| ID | Status | Type | |
|
221 |
|
|------|-------------|---------------| |
|
222 |
|
| uSY | undecided | improvement | |
|
223 |
|
|
|
224 |
|
For more complicated (but rarer) case when coverage repository differs from |
|
225 |
|
the working one. |
|
226 |
|
|
|
227 |
|
Symlinks work fine at the moment. |
|
228 |
|
|
|
229 |
|
## More control over not relevant files. ## |
|
230 |
|
|
|
231 |
|
| ID | Status | Type | |
|
232 |
|
|------|-------------|---------------| |
|
233 |
|
| vSY | undecided | improvement | |
|
234 |
|
|
|
235 |
|
E.g., an option to don't show files with no relevant lines in output of, say, |
|
236 |
|
`files`. Or maybe just a subcommand, like `relevant`? |
|
237 |
|
|
|
238 |
|
Maybe a way to sort files which will group such files on one part of the table. |
|
239 |
|
|
|
240 |
|
## Maybe print distance between builds (in commits). ## |
|
241 |
|
|
|
242 |
|
| ID | Status | Type | |
|
243 |
|
|------|-------------|------------| |
|
244 |
|
| xRY | undecided | addition | |
|
245 |
|
|
|
246 |
|
Related to `ARY`, we need to analyze commit graph to do this. |
|
247 |
|
|
|
248 |
|
# Vim Plugin # |
|
249 |
|
|
|
250 |
|
## Don't depend on fugitive in the plugin. ## |
|
251 |
|
|
|
252 |
|
| ID | Status | Type | |
|
253 |
|
|------|-----------|---------------| |
|
254 |
|
| cRY | planned | improvement | |
|
255 |
|
|
|
256 |
|
We need too little from it. |
|
257 |
|
|
|
258 |
|
Outline of possible implementation: |
|
259 |
|
|
|
260 |
|
function! s:GetGitRelPath() |
|
261 |
|
" find .git file/directory by searching up directory tree |
|
262 |
|
" print meaningful error if not in git repository |
|
263 |
|
" make absolute path of location of .git directory |
|
264 |
|
" make absolute path of current buffer |
|
265 |
|
" remove path to .git from path of the buffer |
|
266 |
|
" return the result |
|
267 |
|
endfunction |
|
268 |
|
|
|
269 |
|
## Don't rely on autochdir in the plugin. ## |
|
270 |
|
|
|
271 |
|
| ID | Status | Type | |
|
272 |
|
|------|-----------|---------------| |
|
273 |
|
| eRY | planned | improvement | |