@blazetrails/rake
Port of the rake gem: a make-like build utility
| Measure | Value |
|---|---|
| Rails counterpart | rake v13.2.1 |
| API methods matched | 100% (465 of 465) |
| Rails tests matched | — |
| Ruby files ported | 36 |
| Ruby files unported | 0 |
| Measured at | fe89b44726 |
Gaps by file
No gaps recorded for this package.
Missing methods
None recorded for this package.
Unported Ruby files
Every compared Ruby file has a TypeScript file.
Deviation receipts
JSDoc receipt tags in the package's source, by the receipt each carries.
| Tag | PERMANENT | CONVERGEABLE | none |
|---|---|---|---|
@noRailsEquivalent | 6 | 0 | 0 |
@missingRailsCall | 3 | 0 | 0 |
@missingRailsArgs | 6 | 0 | 0 |
@inventedArm | 7 | 0 | 0 |
@inlinedFrom | 0 | 0 | 1 |
@internal | 0 | 0 | 116 |
Permanently skipped tests
Method visibility is compile-time only (Module#private, basic_obj_respond_to's pub) (1)
No section cited (3)
Ruby protocol methods with a different JS mechanism (1)
Ruby idioms that do not translate literally (1)
Ratified deviations
Each rule below is ratified in the repository's CLAUDE.md files. The first paragraph is quoted; the link opens the full section at this build's commit.
Ruby idioms that do not translate literally
These are the recurring silent-divergence traps. Check each one whenever you port a body:
Method visibility is compile-time only (Module#private, basic_obj_respond_to's pub)
Ruby's basic_obj_respond_to (vendor/ruby/v3.3.11/vm_method.c:2864-2879) takes a pub flag and hands it to method_boundp (:1788-1818), so respond_to?(:m) and respond_to?(:m, true) can answer differently for the same receiver, and Kernel#public_send (vm_eval.c:1350) raises NoMethodError "private method '…' called for …" where send dispatches. Visibility is a property of the method entry, readable at run time.
Ruby protocol methods with a different JS mechanism
Five Ruby protocol names are neither portable by name nor meaningless: JS has the capability, in a different place. Each is decided here, and each but hash / eql? is its own SKIP_GROUPS entry in scripts/parity/conventions.ts:
FileList#to_ary reads a resolved list
Rake::FileList#to_ary is to_a, and to_a calls resolve, which globs in line (vendor/rake/v13.2.1/lib/rake/file_list.rb:176-185, :210-218). In trails resolve and toA are async, since the glob is async fs, but Ruby's implicit conversion is synchronous: rbCheckArrayType behind flatten, Array(fl) and splat, and include / exclude's fn.to_ary (file_list.rb:119-120, :152-153), cannot await.
TestTask runs node, which takes no -w or -I
Rake::TestTask#ruby_opts_string prepends -w and -I"lib" (vendor/rake/v13.2.1/lib/rake/testtask.rb:152-157), and FileUtils::RUBY is node, which rejects both as bad options. -w ports as --pending-deprecation, Node's nearest switch. Node has no load-path switch, so -I"#{lib_path}" moves from ruby_opts_string to behind the :rake loader in run_code, and rake-test-loader.ts does what Ruby's -I does (vendor/ruby/v3.3.11/ruby.c, proc_options): it expands each entry onto the front of LOAD_PATH before any test file loads. rbFRequireFile reads LOAD_PATH; a plain ES import does not. The :direct loader's -e program is the JS spelling of Ruby's, preceded by the same LOAD_PATH unshift on the test process's ruby-compat, and :testrb stays Rake's string and takes no -I, since testrb has no Node counterpart. The default pattern keeps test/test*.rb.
Ruby's main object (Rake::DSL)
A runtime fact Node does not expose (root § "Runtime facts Node does not expose").