canopus 0.6.1 → 0.6.2
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/CHANGELOG.md +5 -0
- data/README.md +2 -2
- data/docs/adr/005-windows-runtime.md +1 -1
- data/docs/tasks.md +3 -3
- data/exe/canopus +2 -2
- data/lib/canopus/buffer.rb +7 -5
- data/lib/canopus/version.rb +1 -1
- data/lib/canopus.rb +1 -0
- data/tools/check_dependencies.rb +3 -3
- data/tools/package.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 013571d4fd7a6edfd38e0110f8a2a36107932361bd19153d161632b354d16c27
|
|
4
|
+
data.tar.gz: 4330cff9ebe687ff4841736a7f1a5da170d1201956b132104389fecae9cb5a2d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d13cf4ece7e1b4ebe6bcaf02e216ccfece40a33bada9abb1e7ff6b829ec9f0448a8931936e0229a7038840a9926f8a2d363346ba9c6d84bcc5aace62d57cf246
|
|
7
|
+
data.tar.gz: c87250d7daf362912550a79cd1a45e82306cbe1086e73561832ac551004ea1e67f10b21a049a7d7755f955acdfdfb24aadf44dee35d35eac05fd3f5a0b803d5a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.2 — 2026-09-23
|
|
4
|
+
|
|
5
|
+
- Use Xamidimura for stable source snapshots and SHA-256 save-conflict checks.
|
|
6
|
+
- Require CRuby 3.2 or newer for Xamidimura compatibility.
|
|
7
|
+
|
|
3
8
|
## 0.6.1 — 2026-09-21
|
|
4
9
|
|
|
5
10
|
- Add a deterministic terminal walkthrough cast and editor demo image with regeneration tasks.
|
data/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<a href="https://rubygems.org/gems/canopus"><img src="https://img.shields.io/gem/v/canopus.svg" alt="Gem version"></a>
|
|
11
11
|
<a href="https://rubygems.org/gems/canopus"><img src="https://img.shields.io/gem/dt/canopus.svg" alt="Gem downloads"></a>
|
|
12
12
|
<a href="https://github.com/noxdea/canopus/actions/workflows/main.yml"><img src="https://github.com/noxdea/canopus/actions/workflows/main.yml/badge.svg" alt="CI"></a>
|
|
13
|
-
<img src="https://img.shields.io/badge/CRuby-%3E%3D%203.
|
|
13
|
+
<img src="https://img.shields.io/badge/CRuby-%3E%3D%203.2-cc342d.svg" alt="CRuby 3.2 or newer">
|
|
14
14
|
<a href="LICENSE.txt"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT license"></a>
|
|
15
15
|
</p>
|
|
16
16
|
|
|
@@ -53,7 +53,7 @@ gem install canopus
|
|
|
53
53
|
canopus --version
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Canopus requires CRuby 3.
|
|
56
|
+
Canopus requires CRuby 3.2 or newer. The launcher enables YJIT when supported
|
|
57
57
|
and otherwise uses the interpreter. Native windows also require the `fiddle`
|
|
58
58
|
standard-library component; some Ruby distributions package it separately.
|
|
59
59
|
|
|
@@ -13,7 +13,7 @@ and performance expectations.
|
|
|
13
13
|
|
|
14
14
|
## Decision
|
|
15
15
|
|
|
16
|
-
Require CRuby 3.
|
|
16
|
+
Require CRuby 3.2 or newer. Attempt to enable YJIT on macOS and Linux, falling
|
|
17
17
|
back to the interpreter when the selected Ruby build lacks it. On native Windows,
|
|
18
18
|
preserve an already enabled JIT but do not pass an unsupported YJIT flag.
|
|
19
19
|
|
data/docs/tasks.md
CHANGED
|
@@ -59,6 +59,6 @@ and all output parsing remains frame-budgeted. Matcher lines and unfinished
|
|
|
59
59
|
input are limited to 64 KiB, each matcher retains at most 1,000 diagnostics,
|
|
60
60
|
and regular expressions use a timeout. A matcher that times out is disabled for
|
|
61
61
|
the rest of that task run while its already-published diagnostics are retained.
|
|
62
|
-
On Ruby 3.1, one timeout on a complete line is deferred to the next
|
|
63
|
-
disabling, which avoids dropping a matcher after a transient
|
|
64
|
-
an unterminated final line is disabled on its first timeout.
|
|
62
|
+
On unsupported Ruby 3.1, one timeout on a complete line is deferred to the next
|
|
63
|
+
frame before disabling, which avoids dropping a matcher after a transient
|
|
64
|
+
scheduler delay; an unterminated final line is disabled on its first timeout.
|
data/exe/canopus
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
require "rbconfig"
|
|
5
5
|
require "rubygems"
|
|
6
|
-
unless RUBY_ENGINE == "ruby" && (RUBY_VERSION.split(".").first(2).map(&:to_i) <=> [3,
|
|
7
|
-
abort "Canopus requires CRuby 3.
|
|
6
|
+
unless RUBY_ENGINE == "ruby" && (RUBY_VERSION.split(".").first(2).map(&:to_i) <=> [3, 2]) >= 0
|
|
7
|
+
abort "Canopus requires CRuby 3.2 or newer."
|
|
8
8
|
end
|
|
9
9
|
unless RUBY_PLATFORM.match?(/mswin|mingw/) || RbConfig::CONFIG["YJIT_SUPPORT"] != "yes" ||
|
|
10
10
|
(defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled?) || ENV["CANOPUS_YJIT_REEXEC"] == "1"
|
data/lib/canopus/buffer.rb
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "digest"
|
|
4
3
|
require "tempfile"
|
|
5
4
|
require "denebola"
|
|
6
5
|
require_relative "denebola_compat"
|
|
@@ -26,14 +25,17 @@ module Canopus
|
|
|
26
25
|
return new("", path: path, read_only: true, rope: rope, encoding: detection.encoding,
|
|
27
26
|
bom: detection.bom, detection: detection)
|
|
28
27
|
end
|
|
29
|
-
|
|
28
|
+
snapshot = Xamidimura::SourceRevision.read(path)
|
|
29
|
+
raw = snapshot.bytes
|
|
30
30
|
detection = detect_bytes(raw, encoding: encoding)
|
|
31
31
|
raise Error, "cannot edit binary file" if detection.binary
|
|
32
32
|
text = Menkar.decode(raw, detection)
|
|
33
33
|
new(text, path: path, encoding: detection.encoding, bom: detection.bom, detection: detection,
|
|
34
|
-
disk_digest:
|
|
34
|
+
disk_digest: snapshot.digest)
|
|
35
35
|
rescue Menkar::Error => error
|
|
36
36
|
raise Error, error.message
|
|
37
|
+
rescue Xamidimura::Error => error
|
|
38
|
+
raise Error, "cannot read #{path}: #{error.message}"
|
|
37
39
|
rescue EncodingError => error
|
|
38
40
|
raise Error, "cannot decode #{path}: #{error.message}"
|
|
39
41
|
end
|
|
@@ -279,7 +281,7 @@ module Canopus
|
|
|
279
281
|
destination = File.realpath(destination) if File.symlink?(destination)
|
|
280
282
|
original = File.file?(destination) ? File.binread(destination) : nil
|
|
281
283
|
same_file = @path && (File.expand_path(path) == @path || (File.exist?(@path) && File.exist?(destination) && File.identical?(@path, destination)))
|
|
282
|
-
if !force && same_file && @disk_digest && (!original ||
|
|
284
|
+
if !force && same_file && @disk_digest && (!original || Xamidimura::SourceRevision.digest(original) != @disk_digest)
|
|
283
285
|
raise SaveConflict, "file changed on disk: #{path}"
|
|
284
286
|
end
|
|
285
287
|
raise SaveConflict, "destination exists: #{path}" if !force && original && (!same_file || !@disk_digest)
|
|
@@ -301,7 +303,7 @@ module Canopus
|
|
|
301
303
|
@detection = detection
|
|
302
304
|
@encoding, @bom = detection.encoding, detection.bom
|
|
303
305
|
end
|
|
304
|
-
@saved_rope, @disk_digest = snapshot,
|
|
306
|
+
@saved_rope, @disk_digest = snapshot, Xamidimura::SourceRevision.digest(encoded)
|
|
305
307
|
self
|
|
306
308
|
end
|
|
307
309
|
rescue EncodingError => error
|
data/lib/canopus/version.rb
CHANGED
data/lib/canopus.rb
CHANGED
data/tools/check_dependencies.rb
CHANGED
|
@@ -13,7 +13,7 @@ smoke = ARGV.first && File.expand_path(ARGV.fetch(0))
|
|
|
13
13
|
abort "Usage: ruby tools/check_dependencies.rb [smoke.rb]" if ARGV.length > 1 || (smoke && !File.file?(smoke))
|
|
14
14
|
specification = Gem::Specification.load(File.join(root, "#{entry}.gemspec"))
|
|
15
15
|
dependencies = specification.runtime_dependencies.map(&:name).sort
|
|
16
|
-
expected = %w[alhena alkaid antares denebola editorconfig gienah kochab megrez menkar porrima prism rexml rouge sadr saiph spica tarazed thuban timeout unicode-display_width zaniah]
|
|
16
|
+
expected = %w[alhena alkaid antares denebola editorconfig gienah kochab megrez menkar porrima prism rexml rouge sadr saiph spica tarazed thuban timeout unicode-display_width xamidimura zaniah]
|
|
17
17
|
abort "unexpected runtime gem dependencies" unless dependencies == expected
|
|
18
18
|
abort "native extension declaration" unless specification.extensions.empty?
|
|
19
19
|
abort "packaged native binary" if specification.files.any? { |path| path.match?(/\.(?:so|bundle|dll|dylib|a|o)\z/i) }
|
|
@@ -33,10 +33,10 @@ Dir.mktmpdir("#{entry}-install-") do |directory|
|
|
|
33
33
|
environment = ENV.each_key.grep(/\ABUNDLE/).to_h { |key| [key, nil] }.merge(
|
|
34
34
|
"GEM_HOME" => installation, "GEM_PATH" => ([installation] + Gem.path).join(File::PATH_SEPARATOR),
|
|
35
35
|
"RUBYLIB" => nil, "RUBYOPT" => nil, "GIENAH_PATH" => nil, "ZANIAH_PATH" => nil, "ALKAID_PATH" => nil, "ANTARES_PATH" => nil,
|
|
36
|
-
"MEGREZ_PATH" => nil, "MENKAR_PATH" => nil, "SADR_PATH" => nil, "SAIPH_PATH" => nil, "TARAZED_PATH" => nil
|
|
36
|
+
"MEGREZ_PATH" => nil, "MENKAR_PATH" => nil, "SADR_PATH" => nil, "SAIPH_PATH" => nil, "TARAZED_PATH" => nil, "XAMIDIMURA_PATH" => nil
|
|
37
37
|
)
|
|
38
38
|
{"GIENAH_PATH" => "gienah", "ZANIAH_PATH" => "zaniah", "ALKAID_PATH" => "alkaid", "ANTARES_PATH" => "antares", "MEGREZ_PATH" => "megrez", "MENKAR_PATH" => "menkar", "SADR_PATH" => "sadr", "SAIPH_PATH" => "saiph",
|
|
39
|
-
"TARAZED_PATH" => "tarazed"}.each do |variable, name|
|
|
39
|
+
"TARAZED_PATH" => "tarazed", "XAMIDIMURA_PATH" => "xamidimura"}.each do |variable, name|
|
|
40
40
|
next unless ENV[variable]
|
|
41
41
|
|
|
42
42
|
dependency_root = File.realpath(ENV.fetch(variable))
|
data/tools/package.rb
CHANGED
|
@@ -91,7 +91,7 @@ module CanopusPackage
|
|
|
91
91
|
$shortcut = $shell.CreateShortcut((Join-Path $Destination 'Canopus.lnk'))
|
|
92
92
|
$shortcut.TargetPath = Join-Path $PSScriptRoot 'canopus.cmd'
|
|
93
93
|
$shortcut.WorkingDirectory = [Environment]::GetFolderPath('UserProfile')
|
|
94
|
-
$shortcut.Description = 'Canopus text editor (requires CRuby 3.
|
|
94
|
+
$shortcut.Description = 'Canopus text editor (requires CRuby 3.2+)'
|
|
95
95
|
$shortcut.Save()
|
|
96
96
|
POWERSHELL
|
|
97
97
|
write_windows_installers(output, version)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: canopus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yudai Takada
|
|
@@ -301,6 +301,20 @@ dependencies:
|
|
|
301
301
|
- - "~>"
|
|
302
302
|
- !ruby/object:Gem::Version
|
|
303
303
|
version: '3.2'
|
|
304
|
+
- !ruby/object:Gem::Dependency
|
|
305
|
+
name: xamidimura
|
|
306
|
+
requirement: !ruby/object:Gem::Requirement
|
|
307
|
+
requirements:
|
|
308
|
+
- - "~>"
|
|
309
|
+
- !ruby/object:Gem::Version
|
|
310
|
+
version: 0.1.0
|
|
311
|
+
type: :runtime
|
|
312
|
+
prerelease: false
|
|
313
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
314
|
+
requirements:
|
|
315
|
+
- - "~>"
|
|
316
|
+
- !ruby/object:Gem::Version
|
|
317
|
+
version: 0.1.0
|
|
304
318
|
- !ruby/object:Gem::Dependency
|
|
305
319
|
name: zaniah
|
|
306
320
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -526,7 +540,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
526
540
|
requirements:
|
|
527
541
|
- - ">="
|
|
528
542
|
- !ruby/object:Gem::Version
|
|
529
|
-
version: '3.
|
|
543
|
+
version: '3.2'
|
|
530
544
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
531
545
|
requirements:
|
|
532
546
|
- - ">="
|