-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[public api] System.Runtime.Environment - OSName("FreeBSD") or OSName("BSD") #14536
Comments
Just to be absolutely sure we're discussing the same issue: Are you talking about what programmers will ultimately see when invoking In the following comment, I'll assume the former, but please correct me if I'm wrong. For the public API, while we can certainly come up with a technical reason or argument for a specific identifier, I would assume that for something like this, participants from Microsoft will ultimately be the ones who makes the decision. And if so, who? Or am I wrong? Is coreclr "beyond" that? I've heard things about a wish to blur the lines between external and internal, but I'm not sure how far this process has come nor at what stage we're at right now.
As a programmer, if I were to probe what OS I'm on it's can only be for two reasons:
For the first case, either value is fine. For second case, it's not. If I want to probe the OS I'm running on to make runtime-decisions, it may be for whatever reason (filesystem-model, network-implementation/behaviour, service-model, known OS-level tools available to execute, etc). In that case something like |
I would vote for "FreeBSD". |
Unless MSFT feels differently on the matter |
See dotnet/corefx#1999 (comment)
|
@ghuntley can this be closed? |
@ghuntley is FreeBSD port ready for this? If yes, can you please submit formal API proposal with the added static field? |
Duplicate of dotnet/corefx#23989. |
This issue is to discuss what the final identifier will be within the entire public API surface and what will be the build target identifier that msbuild will use.
https://github.com/dotnet/corefx/issues/1576 started the discussion of wether to use
OSName("FreeBSD")
vsOSName("BSD")
in the unit tests and is recommended reading before progressing with reading this issue.FreeBSD
won but it can be easily refactored due to being a non-public contract.The BSD's (FreeBSD/NetBSD/OpenBSD/DragonFlyBSD) unlike Linux all have different kernels so potentially it might be required to split them out as separate platforms. This might be completely unnecessary whereby the additional BSD's may just work as a direct result of the port team's efforts. There are enough differences between the different BSDs that it could be needed to differentiate between them however.
We have some time before a decision needs to be cemented in as there is a more pressing issue as mentioned by @stephentoub and registered as issue dotnet/corefx#1626
I feel uneasy about using either
OSName("FreeBSD")
(platform fragmentation) orOSName("BSD")
(too generic) with the amount of information available at this point in time but obviously a direction needs to be chosen.@janhenke @josteink (core members of the portteam) have put forward on multiple times that they would prefer
FreeBSD
and I have no strong preferences in any which direction as long as the future implications are considered carefully because this decision affects the public API surface.Ultimately advice, direction and a decision will be needed by MSFT on this matter.
note: issue was edited/refactored based on feedback from josenink since original post.
The text was updated successfully, but these errors were encountered: