trmnl_preview 0.23.0 → 0.23.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ae35ca9666591a11737a146ccc41ce507f64e9828df8e099d4200e3d6fda809
4
- data.tar.gz: fafd948b1cac498f3b24a793075782eff32dd3608ea083242cc90807227ab6a7
3
+ metadata.gz: 8124e73871c707f410d584753b41438447d13ad2afd1cabc8e3cdbe5380e2122
4
+ data.tar.gz: 07d30b092fd5d63dbc3851b505cedda84c71d378f16593a40571bb8def898a2f
5
5
  SHA512:
6
- metadata.gz: 3877a9953a508027f9fb2ad2700a138842f7376f4f7567af2259b168a82a910d1bec70e9a192ad50623410c575f8c47ffc0ba60f1a8681c6e4f8aff68fdb47b0
7
- data.tar.gz: 8da826b2291adbc73c08043c9c8239a9924103aecd42f16e1a5e072e63832ba8dbb79081591d368f526861359aa26880b2912e256d2fbc1f1928781a7499379f
6
+ metadata.gz: 81b1aa797fca660e60ea557ee60914ff00109526376931c64e54f5742cde11da52c0711db3997530e5454ee6bb67faa666a38b959753d520f7d3e9f2e685395d
7
+ data.tar.gz: 689f8792288c7c8fc9487923f52ac5775cc9357b8cdb3e23edc127a5fef8ff24139cc2e8aa86e2770da88d031340be551f398793354fc60464a49d9cffecd307
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
 
2
2
  # Changelog
3
3
 
4
+ ## 0.23.1
5
+
6
+ - A transform that prints more than about 64 KB no longer hangs until its timeout in `trmnlp test` and `trmnlp serve`; its output is read while it runs.
7
+
4
8
  ## 0.23.0
5
9
 
6
10
  - `TRMNLP::Poller#fetch_responses` is public: each polling url as TRMNL resolves it, with its live response. A tool can keep them as the mocks `trmnlp test` answers with.
@@ -65,13 +65,16 @@ module TRMNLP
65
65
  @on_spawn&.call(wait_thr.pid)
66
66
  stdin_io.write(stdin)
67
67
  stdin_io.close
68
+ # Read while it runs: a process that fills a pipe waits for its reader, so reading after it exits hangs.
69
+ stdout_reader = Thread.new { stdout_io.read }
70
+ stderr_reader = Thread.new { stderr_io.read }
68
71
 
69
72
  unless wait_thr.join(timeout_seconds)
70
73
  kill(wait_thr)
71
74
  return failure("timeout after #{timeout_seconds}s", monotonic_ms - started)
72
75
  end
73
76
 
74
- build_result(stdout_io.read, stderr_io.read, wait_thr.value, output_path, monotonic_ms - started)
77
+ build_result(stdout_reader.value, stderr_reader.value, wait_thr.value, output_path, monotonic_ms - started)
75
78
  end
76
79
  end
77
80
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TRMNLP
4
- VERSION = '0.23.0'
4
+ VERSION = '0.23.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trmnl_preview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0
4
+ version: 0.23.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rockwell Schrock