Commit 413bb83
committed
feat: defer merging of common stanza imports
proof of concept
retain imports for foreignLib section
retain imports for executable section
retain imports for test-suite
retain imports for benchmark
attempt to insert used imports and not all imports
use newtype
change import data type; fix issues with import propagation & decoration
fix missing import names in testSuite
fix missing import names in benchmark
run fourmolu
run hlint
defer merging prototype
Currently we have achieve the following:
- Stop merging, the merging function "endo" is id
- CondTree are completly retained in bigger types such as libarry and
executable
We will need to do the following:
- Allow merging in the accessor
We broke:
- A bunch of Read and Ord instances
Revert "defer merging prototype"
This reverts commit 21636db.
stop merging
retain common stanza in GenericPackageDescription
experiment: use WithImport in gpd
add function to merge imports
mergeLibrary
fix transitive imports retaintion and merging
run fourmolu
deferred merging for sublibraries
simplification; remove todos
retain foreignlib imports
retain executable imports
retain TestSuiteStanza imports
We isolated the type TestSuiteStanza and the logic to infer test type
retain BenchmarkStanza imports
We isolated the BenchmarkStanza type and the logic to infer benchmark
type.
clean up
remove benchmark import field
We now use the WithImports type to tag imports
introduce type alias in GenericPackageDescription
add GenericPackageDescription pattern to hide internal implementation
backward compatible accessors
fix compiler errors
add todo
fix compiler errors for integration test
run fourmolu
don't expose intemediary accessors
remove early experiment "import" fields in TestSuite and Benchmark
move TestSuiteStanza validation to its module
clean up {TestSuite,Benchmark}Stanza exports from FieldGrammar
restore old behaviour in code working with PackageDescription
we fixed GenericPackageDescription's constructor
patch {TestSuite,Benchmark}Stanza type when using accessor
remove accessors tests
fix accessor dropping common stanza map when non it is not required
This guarantees that unmerged internal representation is correct
run fourmolu
remove FieldGrammar export {TestSuite,Benchmark}Stanza
fix(GenericPackageDescription): "pattern" keyword deprecated after 914
test: remove new test files
test: add tests for gpd accessors
test: check equality on each field
test: improve import list
test: use @? operator
test: use a tuple to store all gpd fields
test: define ToExpr tuple instance manually
test: update expected
test: use Rec constructor to annotate field names
test: update expected
test: remove comment not in scope for this PR
test: use field equality in hackage tests
test: add new test files
test: fix test build
test: newtype to guide GPD ToExpr instance
test: add internal accessors test
test: update expected for internal accessors test
test: update expected
test: fix hackage tests ToExpr instance1 parent 8365cec commit 413bb83
File tree
70 files changed
+2184
-611
lines changed- Cabal-syntax
- src/Distribution
- PackageDescription
- Types
- GenericPackageDescription
- Imports
- Cabal-tests/tests
- ParserTests
- accessors
- regressions
- UnitTests/Distribution/Utils
- custom-setup
- Cabal-tree-diff/src/Data/TreeDiff/Instances
- cabal-install-solver/src/Distribution/Solver/Modular
- cabal-install/src/Distribution/Client
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
70 files changed
+2184
-611
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| |||
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
| 164 | + | |
| 165 | + | |
163 | 166 | | |
164 | 167 | | |
165 | 168 | | |
| |||
183 | 186 | | |
184 | 187 | | |
185 | 188 | | |
| 189 | + | |
186 | 190 | | |
187 | 191 | | |
188 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
| |||
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
| 96 | + | |
91 | 97 | | |
92 | 98 | | |
93 | 99 | | |
| |||
105 | 111 | | |
106 | 112 | | |
107 | 113 | | |
| 114 | + | |
108 | 115 | | |
109 | 116 | | |
110 | 117 | | |
| |||
124 | 131 | | |
125 | 132 | | |
126 | 133 | | |
| 134 | + | |
127 | 135 | | |
128 | 136 | | |
Lines changed: 0 additions & 232 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 26 | | |
36 | 27 | | |
37 | | - | |
38 | 28 | | |
39 | | - | |
40 | | - | |
41 | 29 | | |
42 | 30 | | |
43 | 31 | | |
| |||
48 | 36 | | |
49 | 37 | | |
50 | 38 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 39 | | |
58 | 40 | | |
59 | 41 | | |
| |||
290 | 272 | | |
291 | 273 | | |
292 | 274 | | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | 275 | | |
331 | 276 | | |
332 | 277 | | |
| |||
361 | 306 | | |
362 | 307 | | |
363 | 308 | | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | 309 | | |
444 | 310 | | |
445 | 311 | | |
446 | 312 | | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | 313 | | |
476 | 314 | | |
477 | 315 | | |
| |||
503 | 341 | | |
504 | 342 | | |
505 | 343 | | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | 344 | | |
577 | 345 | | |
578 | 346 | | |
| |||
0 commit comments