crystalruby 0.2.1 → 0.2.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/lib/crystalruby/library.rb +7 -2
- data/lib/crystalruby/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a42a64a49b31ff6fe0ca8e300eba350d73e0b5b0f8c3e2ebbaf69f042f870987
|
4
|
+
data.tar.gz: be38f7bd47ed57ff0bed8b44c5ca110aeaef3188ff3e87e2c916f28e2a0ffb13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0b9a4328268e9e73d03ca080697e1296f0a8d491a78212c8dd39f1d54f3bee03f31dc4d0eac03426b109d8ccbd6ae77948ac137303953b5bd7257420c085b6b
|
7
|
+
data.tar.gz: 74f3843047960b390647a097ba44480db4b25d207ebfe27bb51a2eb5ce35d97bec1ef458dbdcaa75574506da5cfb5fa1b76958a28828b563f50c33133bcec410
|
data/lib/crystalruby/library.rb
CHANGED
@@ -81,7 +81,7 @@ module CrystalRuby
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def lib_file
|
84
|
-
lib_dir / "#{name}
|
84
|
+
lib_dir / FFI::LibraryPath.new("#{name}#{config.debug ? "-debug" : ""}", abi_number: digest).to_s
|
85
85
|
end
|
86
86
|
|
87
87
|
def shard_file
|
@@ -168,15 +168,20 @@ module CrystalRuby
|
|
168
168
|
chunks.delete_if { |chnk| chnk[:module_name] == module_name && chnk[:chunk_name] == chunk_name }
|
169
169
|
chunks << { module_name: module_name, chunk_name: chunk_name, body: body }
|
170
170
|
existing = Dir.glob(codegen_dir / "**/*.cr")
|
171
|
+
|
172
|
+
current_index_contents = index_contents
|
171
173
|
chunks.each do |chunk|
|
172
174
|
module_name, chunk_name, body = chunk.values_at(:module_name, :chunk_name, :body)
|
173
175
|
|
174
176
|
file_digest = Digest::MD5.hexdigest body
|
175
177
|
filename = (codegen_dir / module_name / "#{chunk_name}_#{file_digest}.cr").to_s
|
176
178
|
|
177
|
-
unless
|
179
|
+
unless current_index_contents.include?("#{module_name}/#{chunk_name}_#{file_digest}.cr")
|
178
180
|
methods.each_value(&:unattach!)
|
179
181
|
@compiled = false
|
182
|
+
end
|
183
|
+
|
184
|
+
unless existing.delete(filename)
|
180
185
|
FileUtils.mkdir_p(codegen_dir / module_name)
|
181
186
|
File.write(filename, body)
|
182
187
|
end
|
data/lib/crystalruby/version.rb
CHANGED