Skip to content

Support end-of-life information in bundler + rubygems #9251

@HeyNonster

Description

@HeyNonster

There currently isn't a mechanism for adding end-of-life date information to a gem. Users of bundler and rubygems instead have to rely on other sources to get that information.

It could be nice if end-of-life information could be included in the .gemspec. Perhaps like:

Gem::Specification.new do |spec|
  spec.name = "foo"
  spec.end_of_life("< 7.2", Time.new(2027, 1, 1)
  spec.end_of_life("< 8.0", Time.new(2028, 1, 1)
end

I think it gets a little tricky, however, with conflicting dates:

Gem::Specification.new do |spec|
  spec.name = "foo"
  spec.end_of_life("< 7.2", Time.new(2027, 1, 1))
  spec.end_of_life("< 8.0", Time.new(2024, 1, 1)) # 8.0 was end-of-life before 7.2?
end

Some validation could be built in to eol declarations or the burden of ensuring eol information is comprehensible could fall to the gem owners themselves.

It's common for end-of-life dates to change after they've been set. In that case I imagine rubygems would display the end-of-life information from the gemspec of the latest version of the gem that was published.

I would also find it useful to have a bundle eol command to display which gems in the lockfile currently are, or soon to be, end-of-life.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions