Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move File.readable?, .writable?, .executable? to File::Info #14484

Merged

Conversation

straight-shoota
Copy link
Member

@straight-shoota straight-shoota commented Apr 13, 2024

These methods provide lower-level insights into the file system. Their use cases are rare and exposure in the top-level File namespace is confusing due to the similarly-named methods File.read and File.write.

Resolves part of #14245

Copy link
Contributor

@ysbaddaden ysbaddaden left a comment

Choose a reason for hiding this comment

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

I'm wondering about the policy around deprecated methods and their documentation: shall we keep the doc comment, only have the Deprecated annotation, add a See Type#method link (which maybe the Deprecated annotation could handle)?

@straight-shoota
Copy link
Member Author

It's probably best to keep the current documentation. The method still works like that and deprecation is just a friendly indicator for future changes.

The deprecation message typically refers to the replacement (which is implicitly linked). So there's no need for an explicit See XY.

@crysbot
Copy link

crysbot commented Apr 23, 2024

This pull request has been mentioned on Crystal Forum. There might be relevant details there:

https://forum.crystal-lang.org/t/add-file-info-methods-to-path/6781/1

Copy link
Contributor

@ysbaddaden ysbaddaden left a comment

Choose a reason for hiding this comment

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

I thought I had approved this PR already.

Though there should just be a few fixes to use the non deprecated calls then fix/upgrade the markd shard

@straight-shoota straight-shoota added this to the 1.13.0 milestone Jun 10, 2024
@straight-shoota straight-shoota merged commit 70fb98e into crystal-lang:master Jun 12, 2024
61 checks passed
@straight-shoota straight-shoota deleted the chore/move-file.readable branch June 12, 2024 09:24
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.

None yet

3 participants