-
Notifications
You must be signed in to change notification settings - Fork 993
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
- conan profile new --detect for MSYS #2798
Conversation
conans/client/conf/detect.py
Outdated
return result | ||
|
||
|
||
def detect_subsystem(): |
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.
I'm wondering if we should improve
conan/conans/client/tools/oss.py
Line 263 in 760a071
def detect_windows_subsystem(): |
to also detect when you are actually running conan inside the subsystem, and not only having a bash available.
From the recipes point of view if I ask
self.os_info.detect_windows_subsystem()
it should return the subsystem I'm running. It will increase the compatibility of the recipes with Conan running inside the subsystem.But I'm not saying that we should use the
detect_windows_subsystem
without changes in this detection because here is important to distinguish that we are running INSIDE the subsystem.
But anyway, look at my following comment, I'm not sure if we should adjust the subsystem subsetting even detecting we are running inside a subsystem.
conans/client/conf/detect.py
Outdated
@@ -248,6 +264,9 @@ def _detect_os_arch(result, output): | |||
the_os = detected_os() | |||
result.append(("os", the_os)) | |||
result.append(("os_build", the_os)) | |||
the_subsystem = detect_subsystem() | |||
if the_subsystem: | |||
result.append(("os.subsystem", the_subsystem)) |
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 subsetting was invented to distinguish the "native" built apps for the subsystem (using internal dll) or native windows apps.
That you are running Conan in a subsystem it doesn't mean that you are building subsystem-native apps, for example, you can run MSYS2 in mingw mode to build windows native apps.
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.
so, remove it?
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.
I would say, yes, remove it. The subsystem subsetting shouldn't be autodetected.
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.
If you can remove it today (any time) we can add it to 1.3
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.
sure, will do
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.
@lasote done
if result.startswith("MINGW32_NT") or result.startswith("MINGW64_NT"): | ||
return "Windows" | ||
if result.startswith("MSYS_NT"): | ||
return "Windows" |
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.
I'm ok with this.
Signed-off-by: SSE4 <tomskside@gmail.com>
Signed-off-by: SSE4 <tomskside@gmail.com>
Signed-off-by: SSE4 tomskside@gmail.com
develop
branch, documenting this one. Also adding a description of the changes in thechangelog.rst
file. https://github.com/conan-io/docsCloses #2799 Closes #2638