winwatch 0.1.0 → 0.1.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 +4 -4
- data/README.md +11 -269
- data/lib/winwatch.rb +4 -688
- metadata +10 -90
- data/CHANGELOG.md +0 -35
- data/ext/winwatch/extconf.rb +0 -19
- data/ext/winwatch/winwatch.c +0 -883
- data/lib/winwatch/version.rb +0 -5
metadata
CHANGED
|
@@ -1,109 +1,30 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: winwatch
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ned
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
-
dependencies:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
requirements:
|
|
16
|
-
- - "~>"
|
|
17
|
-
- !ruby/object:Gem::Version
|
|
18
|
-
version: '13.0'
|
|
19
|
-
type: :development
|
|
20
|
-
prerelease: false
|
|
21
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
-
requirements:
|
|
23
|
-
- - "~>"
|
|
24
|
-
- !ruby/object:Gem::Version
|
|
25
|
-
version: '13.0'
|
|
26
|
-
- !ruby/object:Gem::Dependency
|
|
27
|
-
name: rake-compiler
|
|
28
|
-
requirement: !ruby/object:Gem::Requirement
|
|
29
|
-
requirements:
|
|
30
|
-
- - "~>"
|
|
31
|
-
- !ruby/object:Gem::Version
|
|
32
|
-
version: '1.2'
|
|
33
|
-
type: :development
|
|
34
|
-
prerelease: false
|
|
35
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
-
requirements:
|
|
37
|
-
- - "~>"
|
|
38
|
-
- !ruby/object:Gem::Version
|
|
39
|
-
version: '1.2'
|
|
40
|
-
- !ruby/object:Gem::Dependency
|
|
41
|
-
name: minitest
|
|
42
|
-
requirement: !ruby/object:Gem::Requirement
|
|
43
|
-
requirements:
|
|
44
|
-
- - "~>"
|
|
45
|
-
- !ruby/object:Gem::Version
|
|
46
|
-
version: '5.0'
|
|
47
|
-
type: :development
|
|
48
|
-
prerelease: false
|
|
49
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
-
requirements:
|
|
51
|
-
- - "~>"
|
|
52
|
-
- !ruby/object:Gem::Version
|
|
53
|
-
version: '5.0'
|
|
54
|
-
- !ruby/object:Gem::Dependency
|
|
55
|
-
name: vcvars
|
|
56
|
-
requirement: !ruby/object:Gem::Requirement
|
|
57
|
-
requirements:
|
|
58
|
-
- - "~>"
|
|
59
|
-
- !ruby/object:Gem::Version
|
|
60
|
-
version: '0.1'
|
|
61
|
-
- - ">="
|
|
62
|
-
- !ruby/object:Gem::Version
|
|
63
|
-
version: 0.1.1
|
|
64
|
-
type: :development
|
|
65
|
-
prerelease: false
|
|
66
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
67
|
-
requirements:
|
|
68
|
-
- - "~>"
|
|
69
|
-
- !ruby/object:Gem::Version
|
|
70
|
-
version: '0.1'
|
|
71
|
-
- - ">="
|
|
72
|
-
- !ruby/object:Gem::Version
|
|
73
|
-
version: 0.1.1
|
|
74
|
-
description: |
|
|
75
|
-
winwatch watches a directory (optionally a whole subtree) with a single
|
|
76
|
-
overlapped ReadDirectoryChangesW operation and delivers :added/:modified/
|
|
77
|
-
:removed/:renamed events with absolute UTF-8 paths. Kernel buffer overflow is
|
|
78
|
-
surfaced as an explicit :rescan event (never silently dropped) and a dying
|
|
79
|
-
watch (root deleted, network loss) as a terminal :gone event. Blocking pulls
|
|
80
|
-
release the GVL and are interrupt-safe; under the winloop fiber scheduler the
|
|
81
|
-
watcher parks fibers on the loop's completion port with zero extra threads.
|
|
82
|
-
|
|
83
|
-
Public API: Winwatch.watch(path, recursive:, filter:, buffer_size:,
|
|
84
|
-
normalize_names:) with a block form, Watcher#take/#each/#close, and a frozen
|
|
85
|
-
Winwatch::Event struct. Windows MSVC (mswin) Ruby only.
|
|
11
|
+
dependencies: []
|
|
12
|
+
description: winwatch is discontinued. This final release contains no code and exists
|
|
13
|
+
only so that installing winwatch explains the discontinuation instead of building
|
|
14
|
+
an unmaintained native extension.
|
|
86
15
|
executables: []
|
|
87
|
-
extensions:
|
|
88
|
-
- ext/winwatch/extconf.rb
|
|
16
|
+
extensions: []
|
|
89
17
|
extra_rdoc_files: []
|
|
90
18
|
files:
|
|
91
|
-
- CHANGELOG.md
|
|
92
19
|
- LICENSE.txt
|
|
93
20
|
- README.md
|
|
94
|
-
- ext/winwatch/extconf.rb
|
|
95
|
-
- ext/winwatch/winwatch.c
|
|
96
21
|
- lib/winwatch.rb
|
|
97
|
-
- lib/winwatch/version.rb
|
|
98
|
-
homepage: https://github.com/main-path/winwatch
|
|
99
22
|
licenses:
|
|
100
23
|
- MIT
|
|
101
24
|
metadata:
|
|
102
|
-
homepage_uri: https://github.com/main-path/winwatch
|
|
103
|
-
source_code_uri: https://github.com/main-path/winwatch
|
|
104
|
-
changelog_uri: https://github.com/main-path/winwatch/blob/main/CHANGELOG.md
|
|
105
|
-
bug_tracker_uri: https://github.com/main-path/winwatch/issues
|
|
106
25
|
rubygems_mfa_required: 'true'
|
|
26
|
+
post_install_message: winwatch is discontinued and this release contains no code.
|
|
27
|
+
Use listen (with wdm on Windows) instead.
|
|
107
28
|
rdoc_options: []
|
|
108
29
|
require_paths:
|
|
109
30
|
- lib
|
|
@@ -111,7 +32,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
111
32
|
requirements:
|
|
112
33
|
- - ">="
|
|
113
34
|
- !ruby/object:Gem::Version
|
|
114
|
-
version: '
|
|
35
|
+
version: '2.0'
|
|
115
36
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
37
|
requirements:
|
|
117
38
|
- - ">="
|
|
@@ -120,6 +41,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
120
41
|
requirements: []
|
|
121
42
|
rubygems_version: 3.6.9
|
|
122
43
|
specification_version: 4
|
|
123
|
-
summary:
|
|
124
|
-
fiber-cooperative under winloop.
|
|
44
|
+
summary: Discontinued. Use listen (with wdm on Windows) instead.
|
|
125
45
|
test_files: []
|
data/CHANGELOG.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## [0.1.0] - 2026-06-27
|
|
4
|
-
|
|
5
|
-
Initial release.
|
|
6
|
-
|
|
7
|
-
- `Winwatch.watch(path, recursive:, filter:, buffer_size:, normalize_names:)` — the single
|
|
8
|
-
validated entry point, with a block form that ensure-closes the watcher.
|
|
9
|
-
- `Winwatch::Watcher#take(timeout:)` — the blocking pull; returns a non-empty
|
|
10
|
-
`Array<Winwatch::Event>` or `nil` on timeout, releases the GVL, and is interrupt-safe
|
|
11
|
-
(`Thread#kill` / Ctrl-C / `Timeout` break an infinite wait via a per-op `CancelIoEx`).
|
|
12
|
-
- `Winwatch::Watcher#each` — yields events forever; returns after the terminal `:gone` event
|
|
13
|
-
or when the watcher is closed from elsewhere.
|
|
14
|
-
- `Winwatch::Watcher#close` / `#closed?` — idempotent, safe from any thread/fiber.
|
|
15
|
-
- `Winwatch::Watcher#path` / `#recursive?` / `#filter` / `#buffer_size` / `#mode`.
|
|
16
|
-
- `Winwatch::Event(type, path, from, code)` — frozen, pattern-matchable; six types
|
|
17
|
-
`:added` / `:modified` / `:removed` / `:renamed` / `:rescan` / `:gone`. Paths are absolute,
|
|
18
|
-
UTF-8, forward-slash separated.
|
|
19
|
-
- **Lossless overflow signaling**: a kernel buffer overflow surfaces as one `:rescan` event
|
|
20
|
-
(all three RDCW spellings funnel to it), never a silent drop and never an exception.
|
|
21
|
-
- **Terminal `:gone`**: a dying watch (root deleted, volume dismounted, network loss) surfaces
|
|
22
|
-
as one `:gone` event with the Win32 `code`, then auto-closes. `FILE_SHARE_DELETE` means the
|
|
23
|
-
watched root stays deletable.
|
|
24
|
-
- **Fiber-cooperative under winloop**: a `:winloop` mode (gate
|
|
25
|
-
`Fiber.scheduler.respond_to?(:await_op)`, winloop ≥ 0.2) parks fibers on the loop's IOCP
|
|
26
|
-
with zero extra threads; a `:standalone` mode works everywhere else, offloading to a
|
|
27
|
-
`run_blocking` worker under any other active scheduler.
|
|
28
|
-
- `Winwatch.run_blocking` / `Winwatch.ms_for` — the suite's worker-offload and timeout
|
|
29
|
-
helpers.
|
|
30
|
-
- Errors: `Winwatch::Error` → `OSError` (`#code`) → `NotFound` / `AccessDenied` /
|
|
31
|
-
`Unsupported`; `NotADirectory` and `Closed` subclass `Error` directly.
|
|
32
|
-
|
|
33
|
-
Windows MSVC (mswin) Ruby only.
|
|
34
|
-
|
|
35
|
-
[0.1.0]: https://github.com/main-path/winwatch/releases/tag/v0.1.0
|
data/ext/winwatch/extconf.rb
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
#
|
|
3
|
-
# extconf.rb for the winwatch extension — ReadDirectoryChangesW directory
|
|
4
|
-
# watching with overlapped (async) directory I/O.
|
|
5
|
-
|
|
6
|
-
require "mkmf"
|
|
7
|
-
|
|
8
|
-
unless RbConfig::CONFIG["target_os"] =~ /mswin/
|
|
9
|
-
abort <<~MSG
|
|
10
|
-
winwatch requires a native Windows MSVC (mswin) Ruby — it binds
|
|
11
|
-
ReadDirectoryChangesW and overlapped directory I/O, and is built with
|
|
12
|
-
cl.exe. Your Ruby is "#{RbConfig::CONFIG['arch']}".
|
|
13
|
-
MSG
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
# Pure C — no -EHsc, so rb_raise/longjmp is the normal, safe error mechanism.
|
|
17
|
-
# kernel32 only (linked by default): CreateFileW / ReadDirectoryChangesW /
|
|
18
|
-
# CancelIoEx / event waits / GetOverlappedResult / GetLongPathNameW.
|
|
19
|
-
create_makefile("winwatch/winwatch")
|