Skip to content

Commit 287d347

Browse files
authored
Merge pull request #10508 from cabalism/repro/config-from-duplicates
Add Y-forking import project
2 parents 628ddc8 + 563be04 commit 287d347

File tree

12 files changed

+199
-0
lines changed

12 files changed

+199
-0
lines changed

cabal-testsuite/PackageTests/ConditionalAndImport/cabal.out

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,156 @@ Could not resolve dependencies:
277277
(constraint from oops-0.project requires ==1.4.3.0)
278278
[__1] fail (backjumping, conflict set: hashable, oops)
279279
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: hashable (3), oops (2)
280+
# checking if we detect when the same config is imported via many different paths (we don't)
281+
# cabal v2-build
282+
Configuration is affected by the following files:
283+
- yops-0.project
284+
Configuration is affected by the following files:
285+
- yops-2.config
286+
imported by: yops/yops-1.config
287+
imported by: yops-0.project
288+
Configuration is affected by the following files:
289+
- yops-4.config
290+
imported by: yops/yops-3.config
291+
imported by: yops-0.project
292+
Configuration is affected by the following files:
293+
- yops-4.config
294+
imported by: yops/yops-3.config
295+
imported by: yops-2.config
296+
imported by: yops/yops-1.config
297+
imported by: yops-0.project
298+
Configuration is affected by the following files:
299+
- yops-6.config
300+
imported by: yops/yops-5.config
301+
imported by: yops-0.project
302+
Configuration is affected by the following files:
303+
- yops-6.config
304+
imported by: yops/yops-5.config
305+
imported by: yops-4.config
306+
imported by: yops/yops-3.config
307+
imported by: yops-0.project
308+
Configuration is affected by the following files:
309+
- yops-6.config
310+
imported by: yops/yops-5.config
311+
imported by: yops-4.config
312+
imported by: yops/yops-3.config
313+
imported by: yops-2.config
314+
imported by: yops/yops-1.config
315+
imported by: yops-0.project
316+
Configuration is affected by the following files:
317+
- yops-8.config
318+
imported by: yops/yops-7.config
319+
imported by: yops-0.project
320+
Configuration is affected by the following files:
321+
- yops-8.config
322+
imported by: yops/yops-7.config
323+
imported by: yops-6.config
324+
imported by: yops/yops-5.config
325+
imported by: yops-0.project
326+
Configuration is affected by the following files:
327+
- yops-8.config
328+
imported by: yops/yops-7.config
329+
imported by: yops-6.config
330+
imported by: yops/yops-5.config
331+
imported by: yops-4.config
332+
imported by: yops/yops-3.config
333+
imported by: yops-0.project
334+
Configuration is affected by the following files:
335+
- yops-8.config
336+
imported by: yops/yops-7.config
337+
imported by: yops-6.config
338+
imported by: yops/yops-5.config
339+
imported by: yops-4.config
340+
imported by: yops/yops-3.config
341+
imported by: yops-2.config
342+
imported by: yops/yops-1.config
343+
imported by: yops-0.project
344+
Configuration is affected by the following files:
345+
- yops/yops-1.config
346+
imported by: yops-0.project
347+
Configuration is affected by the following files:
348+
- yops/yops-3.config
349+
imported by: yops-0.project
350+
Configuration is affected by the following files:
351+
- yops/yops-3.config
352+
imported by: yops-2.config
353+
imported by: yops/yops-1.config
354+
imported by: yops-0.project
355+
Configuration is affected by the following files:
356+
- yops/yops-5.config
357+
imported by: yops-0.project
358+
Configuration is affected by the following files:
359+
- yops/yops-5.config
360+
imported by: yops-4.config
361+
imported by: yops/yops-3.config
362+
imported by: yops-0.project
363+
Configuration is affected by the following files:
364+
- yops/yops-5.config
365+
imported by: yops-4.config
366+
imported by: yops/yops-3.config
367+
imported by: yops-2.config
368+
imported by: yops/yops-1.config
369+
imported by: yops-0.project
370+
Configuration is affected by the following files:
371+
- yops/yops-7.config
372+
imported by: yops-0.project
373+
Configuration is affected by the following files:
374+
- yops/yops-7.config
375+
imported by: yops-6.config
376+
imported by: yops/yops-5.config
377+
imported by: yops-0.project
378+
Configuration is affected by the following files:
379+
- yops/yops-7.config
380+
imported by: yops-6.config
381+
imported by: yops/yops-5.config
382+
imported by: yops-4.config
383+
imported by: yops/yops-3.config
384+
imported by: yops-0.project
385+
Configuration is affected by the following files:
386+
- yops/yops-7.config
387+
imported by: yops-6.config
388+
imported by: yops/yops-5.config
389+
imported by: yops-4.config
390+
imported by: yops/yops-3.config
391+
imported by: yops-2.config
392+
imported by: yops/yops-1.config
393+
imported by: yops-0.project
394+
Configuration is affected by the following files:
395+
- yops/yops-9.config
396+
imported by: yops-0.project
397+
Configuration is affected by the following files:
398+
- yops/yops-9.config
399+
imported by: yops-8.config
400+
imported by: yops/yops-7.config
401+
imported by: yops-0.project
402+
Configuration is affected by the following files:
403+
- yops/yops-9.config
404+
imported by: yops-8.config
405+
imported by: yops/yops-7.config
406+
imported by: yops-6.config
407+
imported by: yops/yops-5.config
408+
imported by: yops-0.project
409+
Configuration is affected by the following files:
410+
- yops/yops-9.config
411+
imported by: yops-8.config
412+
imported by: yops/yops-7.config
413+
imported by: yops-6.config
414+
imported by: yops/yops-5.config
415+
imported by: yops-4.config
416+
imported by: yops/yops-3.config
417+
imported by: yops-0.project
418+
Configuration is affected by the following files:
419+
- yops/yops-9.config
420+
imported by: yops-8.config
421+
imported by: yops/yops-7.config
422+
imported by: yops-6.config
423+
imported by: yops/yops-5.config
424+
imported by: yops-4.config
425+
imported by: yops/yops-3.config
426+
imported by: yops-2.config
427+
imported by: yops/yops-1.config
428+
imported by: yops-0.project
429+
Up to date
280430
# checking bad conditional
281431
# cabal v2-build
282432
Error: [Cabal-7090]

cabal-testsuite/PackageTests/ConditionalAndImport/cabal.test.hs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,39 @@ main = cabalTest . withRepo "repo" . recordMode RecordMarked $ do
225225
\ imported by: oops-0.project")
226226
oopsing
227227

228+
-- The project is named yops as it is like hops but with y's for forks.
229+
-- +-- yops-0.project
230+
-- +-- yops/yops-1.config
231+
-- +-- yops-2.config
232+
-- +-- yops/yops-3.config
233+
-- +-- yops-4.config
234+
-- +-- yops/yops-5.config
235+
-- +-- yops-6.config
236+
-- +-- yops/yops-7.config
237+
-- +-- yops-8.config
238+
-- +-- yops/yops-9.config (no further imports)
239+
-- +-- yops/yops-3.config
240+
-- +-- yops-4.config
241+
-- +-- yops/yops-5.config
242+
-- +-- yops-6.config
243+
-- +-- yops/yops-7.config
244+
-- +-- yops-8.config
245+
-- +-- yops/yops-9.config (no further imports)
246+
-- +-- yops/yops-5.config
247+
-- +-- yops-6.config
248+
-- +-- yops/yops-7.config
249+
-- +-- yops-8.config
250+
-- +-- yops/yops-9.config (no further imports)
251+
-- +-- yops/yops-7.config
252+
-- +-- yops-8.config
253+
-- +-- yops/yops-9.config (no further imports)
254+
-- +-- yops/yops-9.config (no further imports)
255+
--
256+
-- We don't check and don't error or warn on the same config being imported
257+
-- via many different paths.
258+
log "checking if we detect when the same config is imported via many different paths (we don't)"
259+
yopping <- cabal' "v2-build" [ "--project-file=yops-0.project" ]
260+
228261
log "checking bad conditional"
229262
badIf <- fails $ cabal' "v2-build" [ "--project-file=bad-conditional.project" ]
230263
assertOutputContains "Cannot set compiler in a conditional clause of a cabal project file" badIf
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
packages: .
2+
3+
import: yops/yops-1.config
4+
import: yops/yops-3.config
5+
import: yops/yops-5.config
6+
import: yops/yops-7.config
7+
import: yops/yops-9.config
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import: yops/yops-3.config
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import: yops/yops-5.config
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import: yops/yops-7.config
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import: yops/yops-9.config
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import: ../yops-2.config
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import: ../yops-4.config
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import: ../yops-6.config

0 commit comments

Comments
 (0)