Project

General

Profile

Actions

Misc #21968

open

The pathname gem needs a new release

Misc #21968: The pathname gem needs a new release

Added by Eregon (Benoit Daloze) 5 days ago.

Status:
Open
Assignee:
-
[ruby-core:125143]

Description

The current pathname gem release (0.4.0) has several issues:

Many warnings on Ruby 4.0

It emits many constant & method redefinition warnings.
This happens notably when an application has pathname as a dependency (direct or transitive) in the Gemfile.

This is with the default $VERBOSE:

$ gem i pathname
$ ruby -e 'gem "pathname"; require "pathname"'     
/home/eregon/.rubies/ruby-4.0.1/lib/ruby/gems/4.0.0/gems/pathname-0.4.0/lib/pathname.rb:17: warning: already initialized constant Pathname::VERSION
<internal:pathname_builtin>:194: warning: previous definition of VERSION was here
/home/eregon/.rubies/ruby-4.0.1/lib/ruby/gems/4.0.0/gems/pathname-0.4.0/lib/pathname.rb:36: warning: already initialized constant Pathname::SEPARATOR_LIST
<internal:pathname_builtin>:312: warning: previous definition of SEPARATOR_LIST was here
/home/eregon/.rubies/ruby-4.0.1/lib/ruby/gems/4.0.0/gems/pathname-0.4.0/lib/pathname.rb:37: warning: already initialized constant Pathname::SEPARATOR_PAT
<internal:pathname_builtin>:313: warning: previous definition of SEPARATOR_PAT was here
/home/eregon/.rubies/ruby-4.0.1/lib/ruby/gems/4.0.0/gems/pathname-0.4.0/lib/pathname.rb:43: warning: already initialized constant Pathname::ABSOLUTE_PATH
<internal:pathname_builtin>:323: warning: previous definition of ABSOLUTE_PATH was here

And 53 warnings with -w:

$ ruby -we 'gem "pathname"; require "pathname"'
/home/eregon/.rubies/ruby-4.0.1/lib/ruby/gems/4.0.0/gems/pathname-0.4.0/lib/pathname.rb:17: warning: already initialized constant Pathname::VERSION
<internal:pathname_builtin>:194: warning: previous definition of VERSION was here
/home/eregon/.rubies/ruby-4.0.1/lib/ruby/gems/4.0.0/gems/pathname-0.4.0/lib/pathname.rb:36: warning: already initialized constant Pathname::SEPARATOR_LIST
<internal:pathname_builtin>:312: warning: previous definition of SEPARATOR_LIST was here
/home/eregon/.rubies/ruby-4.0.1/lib/ruby/gems/4.0.0/gems/pathname-0.4.0/lib/pathname.rb:37: warning: already initialized constant Pathname::SEPARATOR_PAT
<internal:pathname_builtin>:313: warning: previous definition of SEPARATOR_PAT was here
/home/eregon/.rubies/ruby-4.0.1/lib/ruby/gems/4.0.0/gems/pathname-0.4.0/lib/pathname.rb:43: warning: already initialized constant Pathname::ABSOLUTE_PATH
<internal:pathname_builtin>:323: warning: previous definition of ABSOLUTE_PATH was here
/home/eregon/.rubies/ruby-4.0.1/lib/ruby/gems/4.0.0/gems/pathname-0.4.0/lib/pathname.rb:50: warning: method redefined; discarding old chop_basename
<internal:pathname_builtin>:359: warning: previous definition of chop_basename was here
/home/eregon/.rubies/ruby-4.0.1/lib/ruby/gems/4.0.0/gems/pathname-0.4.0/lib/pathname.rb:61: warning: method redefined; discarding old split_names
<internal:pathname_builtin>:370: warning: previous definition of split_names was here
...

See https://github.com/ruby/pathname/issues/66

The gem fails to install on JRuby

See https://github.com/ruby/pathname/issues/94#issuecomment-4016566593

The gem crashes on TruffleRuby

It causes errors like pathname.so: undefined symbol: rb_block_call_kw.
See https://github.com/ruby/pathname/issues/94#issue-4038536603

Release request

These 3 issues are fixed on ruby/pathname master by https://github.com/ruby/pathname/pull/56 and https://github.com/ruby/pathname/pull/57, but no release including those fixes has been published yet.

I also opened a GitHub issue about the release request here: https://github.com/ruby/pathname/issues/94.

Would it be possible to make a new pathname release?

No data to display

Actions

Also available in: PDF Atom