-
Notifications
You must be signed in to change notification settings - Fork 114
Updated OS type identification #162
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
Conversation
Thanks @interkosmos, this looks like an improvement. Do note that you'll need to update any functions that use I'm hoping #155 will be merged soon, and this further increase the usage of I have no experience with Solaris or BSD so I don't know what quirks need to be specifically addressed, but we may run into the problem that we cannot test them in the CI. |
@LKedward BSD could be tested using Cirrus CI, which provides FreeBSD images. Grouping it together with OSX and Linux will probably be fine for most use cases right now, to avoid another CI provider for this project. Testing cygwin is not (easily) possible on the GH actions windows image as well, which means another CI provider would be required for this purpose (like Appveyor). No idea where to find a CI solution for Solaris. |
In most cases, the behaviour of |
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.
fpm/src/environment.f90
Outdated
!! | ||
!! At first, the environment variable `OS` is checked, which is usually | ||
!! found on Windows. Then, `OSTYPE` is read in and compared with common | ||
!! names. If this fails too, check the existance of files that can be |
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.
!! names. If this fails too, check the existance of files that can be | |
!! names. If this fails too, check the existence of files that can be |
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.
Thank you!
@interkosmos, would you mind also updating the following uses of fpm/fpm/src/fpm_filesystem.f90 Lines 51 to 56 in e02171d
fpm/fpm/src/fpm_filesystem.f90 Lines 117 to 124 in e02171d
fpm/fpm/src/fpm_filesystem.f90 Lines 148 to 158 in e02171d
fpm/fpm/src/fpm_command_line.f90 Lines 66 to 73 in e02171d
|
The current failure is (on Windows):
So that needs to be fixed before we can merge it. |
@certik: does this happend because |
@interkosmos can you try reverting to the non colon form of the |
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.
Great work @interkosmos. CI is now passing so this looks good to go! Only left one minor comment regarding a remaining colon use statement.
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.
Looks good.
Next time I recommend to do changes like " -> '
(and white space formatting) in a separate pull request, as those are unrelated to the "OS type identification" improvement. It makes it easier to review of what actually changed.
Please excuse the inconvenience. |
As noted in the source code and discussed in #144, the OS detection of
get_os_type()
infpm/src/environment.f90
is not accurate. Please review this request, which checks environment variables and the existance of some files in order to determine the OS more precisely.