Skip to content

Avoid deprecation warnings in File and TCPSocket constructors [fixup #16034]#16043

Merged
Blacksmoke16 merged 2 commits intocrystal-lang:masterfrom
ysbaddaden:fixup/pr-16034
Aug 1, 2025
Merged

Avoid deprecation warnings in File and TCPSocket constructors [fixup #16034]#16043
Blacksmoke16 merged 2 commits intocrystal-lang:masterfrom
ysbaddaden:fixup/pr-16034

Conversation

@ysbaddaden
Copy link
Collaborator

Use internal constructors to pass the deprecated blocking argument so we don't warn about stdlib internal calls in File and TCPSocket.

Ref. #16034 (comment)

Copy link
Member

@Blacksmoke16 Blacksmoke16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed no longer getting deprecation warnings from the stdlib.

@Blacksmoke16 Blacksmoke16 merged commit 48b0f69 into crystal-lang:master Aug 1, 2025
40 checks passed
@ysbaddaden ysbaddaden deleted the fixup/pr-16034 branch August 1, 2025 16:44
@Blacksmoke16
Copy link
Member

Blacksmoke16 commented Aug 2, 2025

Seems there's one more:

  In D:\a\_temp\crystal-nightly-true-undefined\src\crystal\system\win32\file_descriptor.cr:369:59
  
   369 | io = IO::FileDescriptor.new(handle.address, blocking: true)
                                                               ^
  Warning: Warning: Deprecated argument blocking. Use IO::FileDescriptor.set_blocking instead.

EDIT: What is IO::FileDescriptor.set_blocking? Doesn't seem to exist in the API docs.

@straight-shoota
Copy link
Member

set_blocking is from #16033

@ysbaddaden
Copy link
Collaborator Author

@ysbaddaden ysbaddaden added this to the 1.18.0 milestone Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants