Skip to content

Use top-level path in fileutils.rbs to suppress deprecation warning#2949

Open
ksss wants to merge 1 commit intoruby:masterfrom
ksss:suppress-fileutils-path-deprecation-warning
Open

Use top-level path in fileutils.rbs to suppress deprecation warning#2949
ksss wants to merge 1 commit intoruby:masterfrom
ksss:suppress-fileutils-path-deprecation-warning

Conversation

@ksss
Copy link
Copy Markdown
Collaborator

@ksss ksss commented May 6, 2026

Summary

  • FileUtils::path is deprecated in favor of the top-level path type.
  • Replace internal references in stdlib/fileutils/0/fileutils.rbs so steep check --validate=library no longer emits RBS::DeprecatedTypeName warnings.
  • The deprecated alias (type path = ::path) and its %a{deprecated: ...} annotation are kept for backward compatibility.
../rbs/stdlib/fileutils/0/fileutils.rbs:192:18: [warning] Type `::FileUtils::path` is deprecated: Use top-level `path` instead
│ Diagnostic ID: RBS::DeprecatedTypeName
│
└   type pathlist = path | Array[path]
                    ~~~~

../rbs/stdlib/fileutils/0/fileutils.rbs:192:31: [warning] Type `::FileUtils::path` is deprecated: Use top-level `path` instead
│ Diagnostic ID: RBS::DeprecatedTypeName
│
└   type pathlist = path | Array[path]
                                 ~~~~

../rbs/stdlib/fileutils/0/fileutils.rbs:231:17: [warning] Type `::FileUtils::path` is deprecated: Use top-level `path` instead
│ Diagnostic ID: RBS::DeprecatedTypeName
│
└   def self?.cd: (path dir, ?verbose: boolish) -> void
                   ~~~~

...

Test plan

  • bundle exec steep check --validate=library

Generated with Claude Code

`FileUtils::path` is deprecated in favor of the top-level `path` type.
Replace internal references so `steep check --validate=library` no
longer emits RBS::DeprecatedTypeName warnings.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ksss ksss force-pushed the suppress-fileutils-path-deprecation-warning branch from 54d5f0d to 3a28e5f Compare May 6, 2026 09:54
@ksss ksss added this to the RBS 4.1 milestone May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant