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

Introduce Sys.isWSL() #56671

Closed
wants to merge 5 commits into from
Closed

Conversation

PallHaraldsson
Copy link
Contributor

No description provided.

@PallHaraldsson PallHaraldsson marked this pull request as draft November 24, 2024 16:16
@PallHaraldsson PallHaraldsson marked this pull request as ready for review November 24, 2024 16:35
@jdadavid
Copy link

Seems to me that you are replacing Sys.iswindows rather than creating Sys.isWSL ?

Comment on lines +523 to +526
This function requires at least Julia 1.12.
"""
# https://superuser.com/questions/1749781/how-can-i-check-if-the-environment-is-wsl-from-a-shell-script
isWSL(os::Symbol) = ispath("/proc/sys/fs/binfmt_misc/WSLInterop") # WSL sigil
Copy link
Member

Choose a reason for hiding this comment

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

I think putting a comment there might break the docstring lookup

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, why camelcase which isn't used anywhere in Julia?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, you aren't using the input argument, besides not defining the method you try to use elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes like this seems better:
#36354 (comment)

How about Sys.detectwsl?

I'll just abandon this/make a draft, since there's this other PR. If I don't see it move then I may work on it here later. There one implementation here outside of Julia:

https://github.com/tpapp/DefaultApplication.jl/pull/17/files

@fredrikekre
Copy link
Member

See #36425

@PallHaraldsson PallHaraldsson marked this pull request as draft November 25, 2024 14:12
@giordano
Copy link
Contributor

Closing as per this comment

I'll just abandon this

It doesn't make sense to keep open a pull request which is abandoned by its own author, and which is broken on multiple levels (inconsistent style, bad naming, broken implementation, can't even agree between the method introduced and the method called) in just two lines of code.

@giordano giordano closed this Nov 26, 2024
@PallHaraldsson PallHaraldsson deleted the patch-32 branch November 26, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants