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

Add Sys.is* for all recognized kernels #30249

Merged
merged 1 commit into from Dec 5, 2018

Conversation

5 participants
@ararslan
Copy link
Member

commented Dec 3, 2018

I've found myself wanting Sys.isfreebsd while writing some FreeBSD-specific package code in my spare time. Per Elliot's suggestion (see below), this adds predicates for all kernels.

@ViralBShah

This comment has been minimized.

Copy link
Member

commented Dec 3, 2018

Should it be isbsd to be a bit more general?

@musm

This comment has been minimized.

Copy link
Contributor

commented Dec 3, 2018

isbsd already exists,
see #22794 , where it seemed that most people did not favor adding this function

@ararslan

This comment has been minimized.

Copy link
Member Author

commented Dec 3, 2018

It was mostly me that didn't find it necessary at the time, but I've come around on it (hence the PR).

@staticfloat

This comment has been minimized.

Copy link
Member

commented Dec 3, 2018

I kind of feel we should just jump the shark and just provide a convenience function for every kernel we officially recognize (e.g. OpenBSD, NetBSD, etc....). It's not like it's a significant effort for us to support these single-line methods, and since it's so easy the typical argument of "don't add it until we need it" feels less strong somehow.

@ararslan

This comment has been minimized.

Copy link
Member Author

commented Dec 3, 2018

I agree, I like that approach. (Though who knows whether we'll even be able to support OpenBSD; they need a heinous number of their own patches just to build LLVM...)

@staticfloat

This comment has been minimized.

Copy link
Member

commented Dec 3, 2018

I like to think that we, as a community, error on the side of optimism, rather than pessimism.

@ararslan ararslan force-pushed the aa/sys-isfreebsd branch from d814772 to 543eec6 Dec 3, 2018

@ararslan ararslan changed the title Add Sys.isfreebsd Add Sys.is* for all recognized kernels Dec 3, 2018

@ararslan ararslan removed the freebsd label Dec 3, 2018

Show resolved Hide resolved base/sysinfo.jl Outdated

@ararslan ararslan added the needs news label Dec 3, 2018

@ararslan ararslan force-pushed the aa/sys-isfreebsd branch from f456420 to ce34372 Dec 3, 2018

@ararslan ararslan removed the needs news label Dec 3, 2018

@ararslan ararslan force-pushed the aa/sys-isfreebsd branch 3 times, most recently from 1e6a661 to a22e2a9 Dec 4, 2018

@ararslan ararslan force-pushed the aa/sys-isfreebsd branch from a22e2a9 to 90a1d63 Dec 4, 2018

Add Sys.is* for all recognized kernels
We have `Sys.is*` for a subset of supported platforms, but not for all
recognized kernels, e.g. FreeBSD, OpenBSD, etc. `Sys.isbsd` isn't
specific enough in some cases, and `Sys.KERNEL === x` is inconsistent
with other systems.

@ararslan ararslan force-pushed the aa/sys-isfreebsd branch from 90a1d63 to 6b0ba40 Dec 5, 2018

@staticfloat staticfloat merged commit ff0acfe into master Dec 5, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
julia freebsd ci Build done
Details

@ararslan ararslan deleted the aa/sys-isfreebsd branch Dec 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.