-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
cleanup of Filesystem-related functions #12819
Conversation
capitalization bikeshed - |
+1 for FileSystem |
b5d7dab
to
1836794
Compare
filesystem is a word |
1836794
to
353ea25
Compare
https://en.wikipedia.org/wiki/File_system: can be two words or one. |
More prevalent usage seems to be two words; frequent abbreviation as "FS" seems to fit well with calling it FileSystem. |
+1 for "Filesystem". Since the one-word version is already standard English, using CamelCase to concatenate the two-word version looks unnatural to me. |
I don't care either way, just data points: Apache Hadoop API -> |
Ruby Zip module: http://www.rubydoc.info/gems/rubyzip/Zip/FileSystem |
There is Boost.Filesystem (although the actual namespace is |
Ruby seems pretty inconsistent there, since they use |
Don't care, either way is better than just FS. |
Since |
that seems to be a lot of emphasis on "System", which I don't think is warranted given that I rarely see "file system" in a document without also finding "filesystem" in the same document somewhere else (indicating that this has rapidly become a word). I'm not really interested in bikeshedding this, but if someone wants to propose a shorter name, I might be listening. Python uses |
What about |
This doesn't use the shell or interact with it in any way. I still just don't like the way FileSystem seems to emphasize the word "System", since filesystem is already a valid regular word. |
No need to rush this, I don't see why this would need to be an 0.4 target. |
A file system contains directories and files, and doesn't this API do more than just deal with files? |
This is absolutely not going into 0.4. |
353ea25
to
8756160
Compare
rebased to be ready to merge when CI is happy |
deprecation warnings should actually tell the user what replacement code to use. |
i can't really predict why the user thought they wanted to call these functions, so I pointed them to the man page where it describes why linux thinks of them as deprecated. |
What are they documented to do? Deprecated functions should have something done about their docs, but not sure if that should happen at deprecation time or when the deprecation gets removed. The deprecation warning is not the right place to send someone to read a man page because they called a function that you don't like. People are also using this function on systems that don't have such a man page. Just suggest the replacement code
|
return (st.mode & 0o222) > 0 | ||
end | ||
function isexecutable(st::FS.StatStruct) | ||
depwarn("isexecutable is deprecated as it implied that the file would actually be executable by the user. see also the man page for `access`", :isreadable) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:isexecutable
what are they supposed to do? currently they are defined to return true if there might be a user (excluding root) that could have done the specified action at the instant prior to the time the question was answered. however, i can't think of a place case where that definition is useful. the current docs say:
but that is not a question that |
8756160
to
41cf4c7
Compare
We don't usually give reasons for deprecation in warnings, we primarily tell the user what to change their code to. Here the ambiguity means users who care probably should do some nontrivial refactoring, but we should at least spell out in the warning how to accomplish what these functions used to do (even if technically buggy). |
…take), and cleanup bugz like memory leaks on errors and missing isopen tests
db58ec0
to
9dae3ec
Compare
cleanup of Filesystem-related functions
As discussed here: #53286 (comment) Readds the methods that were removed in #12819.
As discussed here: JuliaLang#53286 (comment) Readds the methods that were removed in JuliaLang#12819.
isopen
tests