-
Notifications
You must be signed in to change notification settings - Fork 74
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
OS.hpp removed as unused #660
Conversation
and the code caused problems on Alpine linux. This header has been (incorrectly) included in many files, but is not needed. Removes `getMemoryUsage` method which has been exported to python, but apparently also never used.
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.
Best type of fixing an error, by removing the whole file(s).
The functionality of OS was working, but never used. If deeped required, I can just fix the compile for Alpine.
But I think pruning the unused code is a better option, esp. since this is a support code, not mandatory for us.
|
||
#else | ||
char * s = ::getcwd(buff, PATH_MAX - 1); | ||
NTA_CHECK(s != nullptr) << OS::getErrorMessage(); | ||
NTA_CHECK(s != nullptr) << "getcwd failed!"; |
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.
simplified behavior, but only in test and I don't think it's worth keeping that functionality.
which is removed
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.
This looks fine to me. All of these functions are clearly outside of the scope of this library, and are not needed for it.
OS functions which were already removed from NuPIC:
- getHostname
- getUserNTADir
- setUserNTADir
- getProcessID
- getTempDir
- makeTempFilename
- sleep
- executeCommand
- genCryptoString
- verifyHostname
- isProcessAliveWin32
- killWin32
- getStackTrace
OS functions removed by this PR:
- getErrorMessage
- getLastErrorCode
- getErrorMessageFromErrorCode
- getHomeDir
- getUserName
- getProcessMemoryUsage
- executeCommand
Nice compilation of the removed methods, and thanks for the review! TODO: |
Path and Directory can be removable when all compilers support std::filesystem. |
and the code caused problems on Alpine linux.
This header has been (incorrectly) included in many files,
but is not needed.
Removes
getMemoryUsage
method which has been exported to python,but apparently also never used.
Fixes #659
For #175