Skip to content

Commit 2d659bf

Browse files
committed
Add foo.cabal package so that packages exist
1 parent 6426b05 commit 2d659bf

File tree

4 files changed

+272
-2
lines changed

4 files changed

+272
-2
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Foo where
2+
3+
a :: Int
4+
a = 42
Lines changed: 257 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,257 @@
1+
# cabal v2-update
2+
Downloading the latest package list from test-local-repo
3+
# checking that we detect when the same config is imported via many different paths
4+
# cabal v2-build
5+
Warning: 2 imports of yops-4.config;
6+
yops-4.config
7+
imported by: yops/yops-3.config
8+
imported by: yops-0.project
9+
yops-4.config
10+
imported by: yops/yops-3.config
11+
imported by: yops-2.config
12+
imported by: yops/yops-1.config
13+
imported by: yops-0.project
14+
Warning: 2 imports of yops-6.config;
15+
yops-6.config
16+
imported by: yops/yops-5.config
17+
imported by: yops-4.config
18+
imported by: yops/yops-3.config
19+
imported by: yops-0.project
20+
yops-6.config
21+
imported by: yops/yops-5.config
22+
imported by: yops-4.config
23+
imported by: yops/yops-3.config
24+
imported by: yops-2.config
25+
imported by: yops/yops-1.config
26+
imported by: yops-0.project
27+
Warning: 2 imports of yops-8.config;
28+
yops-8.config
29+
imported by: yops/yops-7.config
30+
imported by: yops-6.config
31+
imported by: yops/yops-5.config
32+
imported by: yops-4.config
33+
imported by: yops/yops-3.config
34+
imported by: yops-0.project
35+
yops-8.config
36+
imported by: yops/yops-7.config
37+
imported by: yops-6.config
38+
imported by: yops/yops-5.config
39+
imported by: yops-4.config
40+
imported by: yops/yops-3.config
41+
imported by: yops-2.config
42+
imported by: yops/yops-1.config
43+
imported by: yops-0.project
44+
Warning: 2 imports of yops/yops-3.config;
45+
yops/yops-3.config
46+
imported by: yops-0.project
47+
yops/yops-3.config
48+
imported by: yops-2.config
49+
imported by: yops/yops-1.config
50+
imported by: yops-0.project
51+
Warning: 2 imports of yops/yops-5.config;
52+
yops/yops-5.config
53+
imported by: yops-4.config
54+
imported by: yops/yops-3.config
55+
imported by: yops-0.project
56+
yops/yops-5.config
57+
imported by: yops-4.config
58+
imported by: yops/yops-3.config
59+
imported by: yops-2.config
60+
imported by: yops/yops-1.config
61+
imported by: yops-0.project
62+
Warning: 2 imports of yops/yops-7.config;
63+
yops/yops-7.config
64+
imported by: yops-6.config
65+
imported by: yops/yops-5.config
66+
imported by: yops-4.config
67+
imported by: yops/yops-3.config
68+
imported by: yops-0.project
69+
yops/yops-7.config
70+
imported by: yops-6.config
71+
imported by: yops/yops-5.config
72+
imported by: yops-4.config
73+
imported by: yops/yops-3.config
74+
imported by: yops-2.config
75+
imported by: yops/yops-1.config
76+
imported by: yops-0.project
77+
Warning: 2 imports of yops/yops-9.config;
78+
yops/yops-9.config
79+
imported by: yops-8.config
80+
imported by: yops/yops-7.config
81+
imported by: yops-6.config
82+
imported by: yops/yops-5.config
83+
imported by: yops-4.config
84+
imported by: yops/yops-3.config
85+
imported by: yops-0.project
86+
yops/yops-9.config
87+
imported by: yops-8.config
88+
imported by: yops/yops-7.config
89+
imported by: yops-6.config
90+
imported by: yops/yops-5.config
91+
imported by: yops-4.config
92+
imported by: yops/yops-3.config
93+
imported by: yops-2.config
94+
imported by: yops/yops-1.config
95+
imported by: yops-0.project
96+
Resolving dependencies...
97+
Build profile: -w ghc-<GHCVER> -O1
98+
In order, the following would be built:
99+
- foo-0.1 (lib:foo) (first run)
100+
# checking that we detect when the same config is imported via many different paths
101+
# cabal v2-build
102+
Warning: 10 imports of https://www.stackage.org/lts-21.25/cabal.config;
103+
https://www.stackage.org/lts-21.25/cabal.config
104+
imported by: woops-2.config
105+
imported by: woops/woops-1.config
106+
imported by: woops-0.project
107+
https://www.stackage.org/lts-21.25/cabal.config
108+
imported by: woops/woops-3.config
109+
imported by: woops-2.config
110+
imported by: woops/woops-1.config
111+
imported by: woops-0.project
112+
https://www.stackage.org/lts-21.25/cabal.config
113+
imported by: woops-4.config
114+
imported by: woops/woops-3.config
115+
imported by: woops-2.config
116+
imported by: woops/woops-1.config
117+
imported by: woops-0.project
118+
https://www.stackage.org/lts-21.25/cabal.config
119+
imported by: woops/woops-5.config
120+
imported by: woops-4.config
121+
imported by: woops/woops-3.config
122+
imported by: woops-2.config
123+
imported by: woops/woops-1.config
124+
imported by: woops-0.project
125+
https://www.stackage.org/lts-21.25/cabal.config
126+
imported by: woops-6.config
127+
imported by: woops/woops-5.config
128+
imported by: woops-4.config
129+
imported by: woops/woops-3.config
130+
imported by: woops-2.config
131+
imported by: woops/woops-1.config
132+
imported by: woops-0.project
133+
https://www.stackage.org/lts-21.25/cabal.config
134+
imported by: woops/woops-7.config
135+
imported by: woops-6.config
136+
imported by: woops/woops-5.config
137+
imported by: woops-4.config
138+
imported by: woops/woops-3.config
139+
imported by: woops-2.config
140+
imported by: woops/woops-1.config
141+
imported by: woops-0.project
142+
https://www.stackage.org/lts-21.25/cabal.config
143+
imported by: woops-8.config
144+
imported by: woops/woops-7.config
145+
imported by: woops-6.config
146+
imported by: woops/woops-5.config
147+
imported by: woops-4.config
148+
imported by: woops/woops-3.config
149+
imported by: woops-2.config
150+
imported by: woops/woops-1.config
151+
imported by: woops-0.project
152+
https://www.stackage.org/lts-21.25/cabal.config
153+
imported by: woops/woops-9.config
154+
imported by: woops-8.config
155+
imported by: woops/woops-7.config
156+
imported by: woops-6.config
157+
imported by: woops/woops-5.config
158+
imported by: woops-4.config
159+
imported by: woops/woops-3.config
160+
imported by: woops-2.config
161+
imported by: woops/woops-1.config
162+
imported by: woops-0.project
163+
Warning: 2 imports of woops-4.config;
164+
woops-4.config
165+
imported by: woops/woops-3.config
166+
imported by: woops-0.project
167+
woops-4.config
168+
imported by: woops/woops-3.config
169+
imported by: woops-2.config
170+
imported by: woops/woops-1.config
171+
imported by: woops-0.project
172+
Warning: 2 imports of woops-6.config;
173+
woops-6.config
174+
imported by: woops/woops-5.config
175+
imported by: woops-4.config
176+
imported by: woops/woops-3.config
177+
imported by: woops-0.project
178+
woops-6.config
179+
imported by: woops/woops-5.config
180+
imported by: woops-4.config
181+
imported by: woops/woops-3.config
182+
imported by: woops-2.config
183+
imported by: woops/woops-1.config
184+
imported by: woops-0.project
185+
Warning: 2 imports of woops-8.config;
186+
woops-8.config
187+
imported by: woops/woops-7.config
188+
imported by: woops-6.config
189+
imported by: woops/woops-5.config
190+
imported by: woops-4.config
191+
imported by: woops/woops-3.config
192+
imported by: woops-0.project
193+
woops-8.config
194+
imported by: woops/woops-7.config
195+
imported by: woops-6.config
196+
imported by: woops/woops-5.config
197+
imported by: woops-4.config
198+
imported by: woops/woops-3.config
199+
imported by: woops-2.config
200+
imported by: woops/woops-1.config
201+
imported by: woops-0.project
202+
Warning: 2 imports of woops/woops-3.config;
203+
woops/woops-3.config
204+
imported by: woops-0.project
205+
woops/woops-3.config
206+
imported by: woops-2.config
207+
imported by: woops/woops-1.config
208+
imported by: woops-0.project
209+
Warning: 2 imports of woops/woops-5.config;
210+
woops/woops-5.config
211+
imported by: woops-4.config
212+
imported by: woops/woops-3.config
213+
imported by: woops-0.project
214+
woops/woops-5.config
215+
imported by: woops-4.config
216+
imported by: woops/woops-3.config
217+
imported by: woops-2.config
218+
imported by: woops/woops-1.config
219+
imported by: woops-0.project
220+
Warning: 2 imports of woops/woops-7.config;
221+
woops/woops-7.config
222+
imported by: woops-6.config
223+
imported by: woops/woops-5.config
224+
imported by: woops-4.config
225+
imported by: woops/woops-3.config
226+
imported by: woops-0.project
227+
woops/woops-7.config
228+
imported by: woops-6.config
229+
imported by: woops/woops-5.config
230+
imported by: woops-4.config
231+
imported by: woops/woops-3.config
232+
imported by: woops-2.config
233+
imported by: woops/woops-1.config
234+
imported by: woops-0.project
235+
Warning: 2 imports of woops/woops-9.config;
236+
woops/woops-9.config
237+
imported by: woops-8.config
238+
imported by: woops/woops-7.config
239+
imported by: woops-6.config
240+
imported by: woops/woops-5.config
241+
imported by: woops-4.config
242+
imported by: woops/woops-3.config
243+
imported by: woops-0.project
244+
woops/woops-9.config
245+
imported by: woops-8.config
246+
imported by: woops/woops-7.config
247+
imported by: woops-6.config
248+
imported by: woops/woops-5.config
249+
imported by: woops-4.config
250+
imported by: woops/woops-3.config
251+
imported by: woops-2.config
252+
imported by: woops/woops-1.config
253+
imported by: woops-0.project
254+
Resolving dependencies...
255+
Build profile: -w ghc-9.4.8 -O1
256+
In order, the following would be built:
257+
- foo-0.1 (lib:foo) (first run)

cabal-testsuite/PackageTests/ProjectImport/UniquePathDuplicates/cabal.test.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ main = cabalTest . withRepo "repo" . recordMode RecordMarked $ do
3535
-- +-- yops/yops-9.config (no further imports)
3636
-- +-- yops/yops-9.config (no further imports)
3737
log "checking that we detect when the same config is imported via many different paths"
38-
yopping <- cabal' "v2-build" [ "--project-file=yops-0.project", "--project-file-parser=legacy" ]
38+
yopping <- cabal' "v2-build" [ "--project-file=yops-0.project", "--project-file-parser=legacy", "--dry-run" ]
3939
assertOutputContains "Warning: 2 imports" yopping
4040

4141
log "checking that we detect when the same config is imported via many different paths"
42-
wooping <- cabal' "v2-build" [ "--project-file=woops-0.project", "--project-file-parser=legacy" ]
42+
wooping <- cabal' "v2-build" [ "--project-file=woops-0.project", "--project-file-parser=legacy", "--dry-run" ]
4343
assertOutputContains "Warning: 10 imports" wooping
4444

4545
return ()
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: foo
2+
version: 0.1
3+
license: BSD3
4+
cabal-version: >=1.2
5+
build-type: Simple
6+
7+
library
8+
exposed-modules: Foo
9+
build-depends: base

0 commit comments

Comments
 (0)