guard-haskell 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- M2MzMTgzOGIwYWRkNTkyYmNmYzBiNGM4YmEwMDA0Mzk2YTgxYmUzZQ==
4
+ ZGVmNTAyMjBkMDZhNGJiYmI5ZDhhNmNkYTA5YTU0MDNmZDQ5MTVkNg==
5
5
  data.tar.gz: !binary |-
6
- NmQxZTYxM2NkNDgyZGUzNDFiZTc1YjdkOTMzZjg4OTk5N2MyNmZmMg==
6
+ ODdjMjQxNTc3Y2ZmOTI0MjQ1OTIzNGE2YjFjMDJjZDQ3ZDA4NmQxOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2M2ZTc4ODU1NWRhNWI1MTUzOThhYjQ4NzFhNmEyZDc1NWIzMDhhYmQ0NWJi
10
- MmNkNDAzYmQ0MmIxMDhkNWUyZTMxMjAwZTk1NjQyMmQzZGRmZmM4NTU2ZGQ3
11
- YWU2MzgzODkyYmE1NTBjZWE0OTYzODhkYWJiMzZiMzU0MjBhMjg=
9
+ MDkyM2Y2Nzg3YWYxMzliNTI1MmY3ZjAwN2JjMDJlM2ZiOTg1NWJjZmQyYjRm
10
+ ODE0Y2Y1MTQ3YTBkNDEwMDc5YWU4OTQ2MTNkOGI0MTFkMmYxY2VkYzRlODg4
11
+ ZmE1YjBjNmEwNzE1NzNkNDgxMzQzOTBiM2Y1YWU0MTg1ZGRkMzE=
12
12
  data.tar.gz: !binary |-
13
- YTc3MWI3NjcwYTllNTVmOTBmMTc0ZThiYTZjMTI1YWE5ZTM1ODIxZTA5N2U2
14
- ZjU4MTZjMzg5M2QzMWY0ZTNiZmE3YTQ3ZTQ0NDNlOTQ1ZmQ4ZDM3Y2NmYTM2
15
- MzVhYjlmZmU4NGZlMzUwMjJkNmViNTdlMTgwMDg0NTRlODIxZTE=
13
+ OTUzOWIyZDE4NjU2MGU1ZTAwMDEyNDgyZTlkMzViYTQ5MzY4ZWExNjliZTAw
14
+ OTgxMzZiNmRjZjdhYTQzYzkyNDA2ZmI4NWM1ZGRiYzgzZTk4ODY3ODdlNGMz
15
+ MmQyYzJjMGNhZDAwMjM0ZTRkNDhkMGViOGJiOWE4MzMxZmIzZGE=
@@ -1,3 +1,8 @@
1
+ 1.4.0
2
+ =====
3
+
4
+ * Catch more obscure runtime linker errors
5
+
1
6
  1.3.0
2
7
  =====
3
8
 
@@ -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,5 +1,5 @@
1
1
  module Guard
2
2
  module HaskellVersion
3
- VERSION = '1.3.0'
3
+ VERSION = '1.4.0'
4
4
  end
5
5
  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 passed run" do
91
- in_stream = ::StringIO.open(<<-FOO)
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, out_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 failed spec run" do
112
- in_stream = ::StringIO.open(<<-FOO)
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, out_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 "handles runtime linker error" do
140
- in_stream = ::StringIO.open(<<-FOO)
141
- GHCi runtime linker: fatal error: I found a duplicate definition for symbol
142
- HUnitzm1zi2zi5zi2_TestziHUnitziBase_zdwzdcshowsPrec_slow
143
- whilst processing object file
144
- /home/maksenov/.cabal/lib/HUnit-1.2.5.2/ghc-7.6.2/HSHUnit-1.2.5.2.o
145
- This could be caused by:
146
- * Loading two different object files which export the same symbol
147
- * Specifying the same object file twice on the GHCi command line
148
- * An incorrect `package.conf' entry, causing some object to be
149
- loaded twice.
150
- GHCi cannot safely continue in this situation. Exiting now. Sorry.
151
- FOO
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, out_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 = ::StringIO.open(<<-FOO)
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, out_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 = ::StringIO.open(<<-FOO)
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, out_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,6 @@
1
+ *Main>
2
+ test/Useful/GitSpec.hs:4:0:
3
+ error: invalid preprocessing directive #ifd
4
+ #ifd
5
+ ^
6
+ phase `C pre-processor' failed (exitcode = 1)
@@ -0,0 +1,3 @@
1
+ *Main> Ok, modules loaded: Main, Useful.Parser, Useful.Graph, Useful.Git.
2
+ *Main>
3
+ *** Exception: Prelude.undefined
@@ -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.3.0
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-10 00:00:00.000000000 Z
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