guard-haskell 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/CHANGELOG.md +5 -0
- data/lib/guard/haskell/repl.rb +2 -1
- data/lib/guard/haskell/version.rb +1 -1
- data/spec/guard/haskell/repl_spec.rb +27 -67
- data/spec/run-files/cpp-exception.error +6 -0
- data/spec/run-files/hspec-exception.error +3 -0
- data/spec/run-files/runtime-linker-couldn't-find-symbol.error +9 -0
- data/spec/run-files/runtime-linker-duplicate-definition-for-symbol.error +10 -0
- data/spec/run-files/spec-failure.error +16 -0
- data/spec/run-files/spec-pass.success +9 -0
- metadata +14 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGVmNTAyMjBkMDZhNGJiYmI5ZDhhNmNkYTA5YTU0MDNmZDQ5MTVkNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODdjMjQxNTc3Y2ZmOTI0MjQ1OTIzNGE2YjFjMDJjZDQ3ZDA4NmQxOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDkyM2Y2Nzg3YWYxMzliNTI1MmY3ZjAwN2JjMDJlM2ZiOTg1NWJjZmQyYjRm
|
10
|
+
ODE0Y2Y1MTQ3YTBkNDEwMDc5YWU4OTQ2MTNkOGI0MTFkMmYxY2VkYzRlODg4
|
11
|
+
ZmE1YjBjNmEwNzE1NzNkNDgxMzQzOTBiM2Y1YWU0MTg1ZGRkMzE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTUzOWIyZDE4NjU2MGU1ZTAwMDEyNDgyZTlkMzViYTQ5MzY4ZWExNjliZTAw
|
14
|
+
OTgxMzZiNmRjZjdhYTQzYzkyNDA2ZmI4NWM1ZGRiYzgzZTk4ODY3ODdlNGMz
|
15
|
+
MmQyYzJjMGNhZDAwMjM0ZTRkNDhkMGViOGJiOWE4MzMxZmIzZGE=
|
data/CHANGELOG.md
CHANGED
data/lib/guard/haskell/repl.rb
CHANGED
@@ -17,7 +17,8 @@ class ::Guard::Haskell::Repl
|
|
17
17
|
when /Failed, modules loaded:/,
|
18
18
|
/\*{3} Exception:/,
|
19
19
|
/phase `C pre-processor' failed/,
|
20
|
-
/GHCi runtime linker: fatal error
|
20
|
+
/GHCi runtime linker: fatal error:/,
|
21
|
+
/During interactive linking, GHCi couldn't find the following symbol:/
|
21
22
|
:compile_failure
|
22
23
|
end
|
23
24
|
end
|
@@ -1,6 +1,9 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'guard/notifier'
|
3
3
|
|
4
|
+
dev_null = ::File.open("/dev/null", "w")
|
5
|
+
run_file = ->(file) { "spec/run-files/#{file}" }
|
6
|
+
|
4
7
|
describe ::Guard::Haskell::Repl do
|
5
8
|
let(:repl) do
|
6
9
|
::Guard::Haskell::Repl.new
|
@@ -87,105 +90,62 @@ describe ::Guard::Haskell::Repl do
|
|
87
90
|
|
88
91
|
describe '#listen' do
|
89
92
|
context 'real world' do
|
90
|
-
it "handles typical
|
91
|
-
in_stream
|
92
|
-
Useful.Git
|
93
|
-
fromGraph
|
94
|
-
- creates `git init' script from empty graph
|
95
|
-
- creates git script from two-node graph
|
96
|
-
- creates git script from three-node graph
|
97
|
-
- creates git script from three-node chain graph
|
98
|
-
|
99
|
-
Finished in 0.0054 seconds
|
100
|
-
4 examples, 0 failures
|
101
|
-
FOO
|
102
|
-
out_stream = File.open("/dev/null", "w")
|
93
|
+
it "handles typical pass run" do
|
94
|
+
in_stream = ::File.open(run_file["spec-pass.success"])
|
103
95
|
repl.instance_variable_set(:@running, true)
|
104
96
|
|
105
|
-
repl.send(:listen, in_stream,
|
97
|
+
repl.send(:listen, in_stream, dev_null)
|
106
98
|
|
107
99
|
expect(repl.instance_variable_get(:@running)).to eq(false)
|
108
100
|
expect(repl.instance_variable_get(:@result)).to eq(:success)
|
109
101
|
end
|
110
102
|
|
111
|
-
it "handles typical
|
112
|
-
in_stream
|
113
|
-
Useful.Git
|
114
|
-
fromGraph
|
115
|
-
- creates `git init' script from empty graph
|
116
|
-
- creates git script from two-node graph FAILED [1]
|
117
|
-
- creates git script from three-node graph
|
118
|
-
- creates git script from three-node chain graph
|
119
|
-
|
120
|
-
1) Useful.Git.fromGraph creates git script from two-node graph
|
121
|
-
expected: Just [InitE,OrphanE "foo" "7",CommitE "bar" ["1"] "2"]
|
122
|
-
but got: Just [InitE,OrphanE "foo" "1",CommitE "bar" ["1"] "2"]
|
123
|
-
|
124
|
-
Randomized with seed 4611685481380198536
|
125
|
-
|
126
|
-
Finished in 0.0089 seconds
|
127
|
-
4 examples, 1 failure
|
128
|
-
*** Exception: ExitFailure 1
|
129
|
-
FOO
|
130
|
-
out_stream = File.open("/dev/null", "w")
|
103
|
+
it "handles typical failure run" do
|
104
|
+
in_stream = ::File.open(run_file["spec-failure.error"])
|
131
105
|
repl.instance_variable_set(:@running, true)
|
132
106
|
|
133
|
-
repl.send(:listen, in_stream,
|
107
|
+
repl.send(:listen, in_stream, dev_null)
|
134
108
|
|
135
109
|
expect(repl.instance_variable_get(:@running)).to eq(false)
|
136
110
|
expect(repl.instance_variable_get(:@result)).to eq(:runtime_failure)
|
137
111
|
end
|
138
112
|
|
139
|
-
it
|
140
|
-
in_stream
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
out_stream = File.open("/dev/null", "w")
|
113
|
+
it 'handles "duplicate definition" runtime linker error' do
|
114
|
+
in_stream = ::File.open(run_file["runtime-linker-duplicate-definition-for-symbol.error"])
|
115
|
+
repl.instance_variable_set(:@running, true)
|
116
|
+
|
117
|
+
repl.send(:listen, in_stream, dev_null)
|
118
|
+
|
119
|
+
expect(repl.instance_variable_get(:@running)).to eq(false)
|
120
|
+
expect(repl.instance_variable_get(:@result)).to eq(:compile_failure)
|
121
|
+
end
|
122
|
+
|
123
|
+
# Unfortunately I can't remember why it happened :-(
|
124
|
+
it 'handles "couldn\'t find symbol" runtime linker error' do
|
125
|
+
in_stream = ::File.open(run_file["runtime-linker-couldn't-find-symbol.error"])
|
153
126
|
repl.instance_variable_set(:@running, true)
|
154
127
|
|
155
|
-
repl.send(:listen, in_stream,
|
128
|
+
repl.send(:listen, in_stream, dev_null)
|
156
129
|
|
157
130
|
expect(repl.instance_variable_get(:@running)).to eq(false)
|
158
131
|
expect(repl.instance_variable_get(:@result)).to eq(:compile_failure)
|
159
132
|
end
|
160
133
|
|
161
134
|
it "handles hspec exceptions" do
|
162
|
-
in_stream
|
163
|
-
*Main> Ok, modules loaded: Main, Useful.Parser, Useful.Graph, Useful.Git.
|
164
|
-
*Main>
|
165
|
-
*** Exception: Prelude.undefined
|
166
|
-
FOO
|
167
|
-
out_stream = File.open("/dev/null", "w")
|
135
|
+
in_stream = ::File.open(run_file["hspec-exception.error"])
|
168
136
|
repl.instance_variable_set(:@running, true)
|
169
137
|
|
170
|
-
repl.send(:listen, in_stream,
|
138
|
+
repl.send(:listen, in_stream, dev_null)
|
171
139
|
|
172
140
|
expect(repl.instance_variable_get(:@running)).to eq(false)
|
173
141
|
expect(repl.instance_variable_get(:@result)).to eq(:compile_failure)
|
174
142
|
end
|
175
143
|
|
176
144
|
it "handles CPP exceptions" do
|
177
|
-
in_stream
|
178
|
-
*Main>
|
179
|
-
test/Useful/GitSpec.hs:4:0:
|
180
|
-
error: invalid preprocessing directive #ifd
|
181
|
-
#ifd
|
182
|
-
^
|
183
|
-
phase `C pre-processor' failed (exitcode = 1)
|
184
|
-
FOO
|
185
|
-
out_stream = File.open("/dev/null", "w")
|
145
|
+
in_stream = ::File.open(run_file["cpp-exception.error"])
|
186
146
|
repl.instance_variable_set(:@running, true)
|
187
147
|
|
188
|
-
repl.send(:listen, in_stream,
|
148
|
+
repl.send(:listen, in_stream, dev_null)
|
189
149
|
|
190
150
|
expect(repl.instance_variable_get(:@running)).to eq(false)
|
191
151
|
expect(repl.instance_variable_get(:@result)).to eq(:compile_failure)
|
@@ -0,0 +1,9 @@
|
|
1
|
+
During interactive linking, GHCi couldn't find the following symbol:
|
2
|
+
Conf_zuverbose_closure
|
3
|
+
This may be due to you not asking GHCi to load extra object files,
|
4
|
+
archives or DLLs needed by your current session. Restart GHCi, specifying
|
5
|
+
the missing library using the -L/path/to/object/dir and -lmissinglibname
|
6
|
+
flags, or simply by naming the relevant files on the GHCi command line.
|
7
|
+
Alternatively, this link failure might indicate a bug in GHCi.
|
8
|
+
If you suspect the latter, please send a bug report to:
|
9
|
+
glasgow-haskell-bugs@haskell.org
|
@@ -0,0 +1,10 @@
|
|
1
|
+
GHCi runtime linker: fatal error: I found a duplicate definition for symbol
|
2
|
+
HUnitzm1zi2zi5zi2_TestziHUnitziBase_zdwzdcshowsPrec_slow
|
3
|
+
whilst processing object file
|
4
|
+
/home/maksenov/.cabal/lib/HUnit-1.2.5.2/ghc-7.6.2/HSHUnit-1.2.5.2.o
|
5
|
+
This could be caused by:
|
6
|
+
* Loading two different object files which export the same symbol
|
7
|
+
* Specifying the same object file twice on the GHCi command line
|
8
|
+
* An incorrect `package.conf' entry, causing some object to be
|
9
|
+
loaded twice.
|
10
|
+
GHCi cannot safely continue in this situation. Exiting now. Sorry.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Useful.Git
|
2
|
+
fromGraph
|
3
|
+
- creates `git init' script from empty graph
|
4
|
+
- creates git script from two-node graph FAILED [1]
|
5
|
+
- creates git script from three-node graph
|
6
|
+
- creates git script from three-node chain graph
|
7
|
+
|
8
|
+
1) Useful.Git.fromGraph creates git script from two-node graph
|
9
|
+
expected: Just [InitE,OrphanE "foo" "7",CommitE "bar" ["1"] "2"]
|
10
|
+
but got: Just [InitE,OrphanE "foo" "1",CommitE "bar" ["1"] "2"]
|
11
|
+
|
12
|
+
Randomized with seed 4611685481380198536
|
13
|
+
|
14
|
+
Finished in 0.0089 seconds
|
15
|
+
4 examples, 1 failure
|
16
|
+
*** Exception: ExitFailure 1
|
@@ -0,0 +1,9 @@
|
|
1
|
+
Useful.Git
|
2
|
+
fromGraph
|
3
|
+
- creates `git init' script from empty graph
|
4
|
+
- creates git script from two-node graph
|
5
|
+
- creates git script from three-node graph
|
6
|
+
- creates git script from three-node chain graph
|
7
|
+
|
8
|
+
Finished in 0.0054 seconds
|
9
|
+
4 examples, 0 failures
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-haskell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matvey Aksenov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -101,6 +101,12 @@ files:
|
|
101
101
|
- lib/guard/haskell/version.rb
|
102
102
|
- spec/guard/haskell/repl_spec.rb
|
103
103
|
- spec/guard/haskell_spec.rb
|
104
|
+
- spec/run-files/cpp-exception.error
|
105
|
+
- spec/run-files/hspec-exception.error
|
106
|
+
- spec/run-files/runtime-linker-couldn't-find-symbol.error
|
107
|
+
- spec/run-files/runtime-linker-duplicate-definition-for-symbol.error
|
108
|
+
- spec/run-files/spec-failure.error
|
109
|
+
- spec/run-files/spec-pass.success
|
104
110
|
- spec/spec_helper.rb
|
105
111
|
homepage: https://github.com/supki/guard-haskell#readme
|
106
112
|
licenses:
|
@@ -129,4 +135,10 @@ summary: Guard gem for Haskell
|
|
129
135
|
test_files:
|
130
136
|
- spec/guard/haskell/repl_spec.rb
|
131
137
|
- spec/guard/haskell_spec.rb
|
138
|
+
- spec/run-files/cpp-exception.error
|
139
|
+
- spec/run-files/hspec-exception.error
|
140
|
+
- spec/run-files/runtime-linker-couldn't-find-symbol.error
|
141
|
+
- spec/run-files/runtime-linker-duplicate-definition-for-symbol.error
|
142
|
+
- spec/run-files/spec-failure.error
|
143
|
+
- spec/run-files/spec-pass.success
|
132
144
|
- spec/spec_helper.rb
|