internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: conan-io/conan

Issue:
Deprecation message for `cppinfo.cppflags`
Introduce a new alias of `cppflags` named `cxxflags` and change the docs. If possible, show a deprecation message when cppflags is used.
The choice of `cppflags` meaning `c++flags` was not good, because `cppflags` means preprocessor flags and it is confusing.


Discussion:
May consider this check (raising an error) for the conan-center hook?, cc/ @danimtb 

Resolving patch:
diff --git a/conans/model/build_info.py b/conans/model/build_info.py
--- a/conans/model/build_info.py
+++ b/conans/model/build_info.py
@@ -1,6 +1,7 @@
 import os
 from collections import OrderedDict
 
+import deprecation
 
 DEFAULT_INCLUDE = "include"
 DEFAULT_LIB = "lib"
@@ -25,7 +26,7 @@ def __init__(self):
         self.libs = []  # The libs to link against
         self.defines = []  # preprocessor definitions
         self.cflags = []  # pure C flags
-        self.cppflags = []  # C++ compilation flags
+        self.cxxflags = []  # C++ compilation flags
         self.sharedlinkflags = []  # linker flags
         self.exelinkflags = []  # linker flags
         self.rootpath = ""
@@ -85,6 +86,17 @@ def res_paths(self):
             self._res_paths = self._filter_paths(self.resdirs)
         return self._res_paths
 
+    # Compatibility for 'cppflags' (old style property to allow decoration)
+    @deprecation.deprecated(deprecated_in="1.13", removed_in="2.0", details="Use 'cxxflags' instead")
+    def get_cppflags(self):
+        return self.cxxflags
+
+    @deprecation.deprecated(deprecated_in="1.13", removed_in="2.0", details="Use 'cxxflags' instead")
+    def set_cppflags(self, value):
+        self.cxxflags = value
+
+    cppflags = property(get_cppflags, set_cppflags)
+
 
 class CppInfo(_CppInfo):
     """ Build Information declared to be used by the CONSUMERS of a
@@ -140,7 +152,7 @@ def merge_lists(seq1, seq2):
 
         # Note these are in reverse order
         self.defines = merge_lists(dep_cpp_info.defines, self.defines)
-        self.cppflags = merge_lists(dep_cpp_info.cppflags, self.cppflags)
+        self.cxxflags = merge_lists(dep_cpp_info.cxxflags, self.cxxflags)
         self.cflags = merge_lists(dep_cpp_info.cflags, self.cflags)
         self.sharedlinkflags = merge_lists(dep_cpp_info.sharedlinkflags, self.sharedlinkflags)
         self.exelinkflags = merge_lists(dep_cpp_info.exelinkflags, self.exelinkflags)


Test patch:
Repository: conan-io/conan

Issue:
Bug in conan search --revisions
In develop, if you forget to pass the reference to the command:

```
conan search --revisions


Traceback (most recent call last):
  File "/home/luism/workspace/conan_sources/conans/client/command.py", line 1570, in run
    method(args[0][1:])
  File "/home/luism/workspace/conan_sources/conans/client/command.py", line 1052, in search
    pref = PackageReference.loads(args.pattern_or_reference)
  File "/home/luism/workspace/conan_sources/conans/model/ref.py", line 154, in loads
    text = text.strip()
AttributeError: 'NoneType' object has no attribute 'strip'

ERROR: 'NoneType' object has no attribute 'strip'
```


Discussion:

Resolving patch:
diff --git a/conans/client/command.py b/conans/client/command.py
--- a/conans/client/command.py
+++ b/conans/client/command.py
@@ -1050,7 +1050,7 @@ def search(self, *args):
             if args.revisions:
                 try:
                     pref = PackageReference.loads(args.pattern_or_reference)
-                except (TypeError, ConanException):
+                except (TypeError, ConanException, AttributeError):
                     pass
                 else:
                     info = self._conan.get_package_revisions(pref.full_repr(),


Test patch:
diff --git a/conans/test/functional/command/search_test.py b/conans/test/functional/command/search_test.py
--- a/conans/test/functional/command/search_test.py
+++ b/conans/test/functional/command/search_test.py
@@ -1,15 +1,11 @@
 import json
 import os
-
 import shutil
 import textwrap
-
+import time
 import unittest
 from collections import OrderedDict
-from textwrap import dedent
 
-import shutil
-import time
 from mock import patch
 
 from conans import COMPLEX_SEARCH_CAPABILITY, DEFAULT_REVISION_V1
@@ -1350,6 +1346,12 @@ def test_invalid_references_test(self):
                    assert_error=True)
         self.assertIn("Cannot list the revisions of a specific package revision", client.out)
 
+    def test_invalid_command_call(self):
+        client = TestClient()
+        client.run("search --revisions", assert_error=True)
+        self.assertIn("With --revision, specify a reference", client.out)
+        self.assertIn("or a package reference with recipe revision", client.out)
+
 
 class SearchRemoteAllTestCase(unittest.TestCase):
     def setUp(self):
Repository: conan-io/conan

Issue:
Conan crash due to wrong function signature in migrations.py
Installing Conan version 1.12.3 and running it (simply "conan" from the cmd line) results in crash.
The error stems from wrong signature in function call in conans/client/migrations.py.

On line 129, there is the following call

`migrate_to_default_profile(conf_path, default_profile_path, output=self.out)`

but the definition of `migrate_to_default_profile` on line 159 reads

`def migrate_to_default_profile(conf_path, default_profile_path)`

the call is incompatible with the signature. `output=self.out` should be removed since it is not used in `migrate_to_default_profile`







Discussion:
Hi @RadMap 

Yes, this seems a bug, when upgrading from versions prior than ``if old_version < Version("0.25"):``, which even if the code is there, it was quite unexpected.

If you want to workaround it, you could remove the file ``.conan/profiles/default`` from your conan cache, everything should work then.

We will have a look, and try to solve it as soon as possible. Thanks for reporting!

Resolving patch:
diff --git a/conans/client/migrations.py b/conans/client/migrations.py
--- a/conans/client/migrations.py
+++ b/conans/client/migrations.py
@@ -2,18 +2,16 @@
 import shutil
 
 from conans import DEFAULT_REVISION_V1
-from conans.model.manifest import FileTreeManifest
-from conans.model.package_metadata import PackageMetadata
-
-from conans.model.ref import ConanFileReference, PackageReference
-
-from conans.paths import PACKAGE_METADATA
 from conans.client.cache.cache import CONAN_CONF, PROFILES_FOLDER
 from conans.client.tools import replace_in_file
 from conans.errors import ConanException
 from conans.migrations import Migrator
+from conans.model.manifest import FileTreeManifest
+from conans.model.package_metadata import PackageMetadata
+from conans.model.ref import ConanFileReference, PackageReference
 from conans.model.version import Version
 from conans.paths import EXPORT_SOURCES_DIR_OLD
+from conans.paths import PACKAGE_METADATA
 from conans.paths.package_layouts.package_cache_layout import PackageCacheLayout
 from conans.util.files import list_folder_subdirs, load, save
 
@@ -139,7 +137,7 @@ def _make_migrations(self, old_version):
                               % (CONAN_CONF, DEFAULT_PROFILE_NAME))
                 conf_path = os.path.join(self.cache.conan_folder, CONAN_CONF)
 
-                migrate_to_default_profile(conf_path, default_profile_path, output=self.out)
+                migrate_to_default_profile(conf_path, default_profile_path)
 
                 self.out.warn("Migration: export_source cache new layout")
                 migrate_c_src_export_source(self.cache, self.out)


Test patch:
Repository: conan-io/conan

Issue:
CPT won't work with Conan 1.14.0-dev
To help us debug your issue please explain:

Conan Version: 1.14.0-dev

Hi!

After to merge the PR #4713 and exclude the test module from Conan installer, CPT will not be able to run its tests because we re-use many of Conan test tools there.

How could we install the test module only when required?

I've searched some options, and found some possible solutions in the internet:

- Create multiple eggs. One for Conan, One for test.
  Very complex IMO
- Use setuptools namespaces.
  I only read that is support on python +3.3. 
- Package all things as before, and remove only the test folder after to install.
  Most simple solution I think. I made this workaround some time ago:
  https://github.com/uilianries/conan-ldap-authentication/blob/master/setup.py#L55
  To install the test_folder, we can use extra. For now `conan[test]` only installs the development requirements, but we could change to skip the folder deletion.

You can check the log [here](
https://travis-ci.org/conan-io/conan-package-tools/jobs/506451807#L684).

Regards!

- [x] I've read the [CONTRIBUTING guide](https://github.com/conan-io/conan/blob/develop/.github/CONTRIBUTING.md).
- [ ] I've specified the Conan version, operating system version and any tool that can be relevant.
- [ ] I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.




Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -31,6 +31,10 @@ def get_requires(filename):
     project_requirements.extend(get_requires("conans/requirements_osx.txt"))
 project_requirements.extend(get_requires("conans/requirements_server.txt"))
 dev_requirements = get_requires("conans/requirements_dev.txt")
+# The tests utils are used by conan-package-tools
+exclude_test_packages = ["conans.test.{}*".format(d)
+                         for d in os.listdir(os.path.join(here, "conans/test"))
+                         if os.path.isdir(os.path.join(here, "conans/test", d)) and d != "utils"]
 
 
 def load_version():
@@ -88,7 +92,7 @@ def load_version():
 
     # You can just specify the packages manually here if your project is
     # simple. Or you can use find_packages().
-    packages=find_packages(exclude=("conans.test*",)),
+    packages=find_packages(exclude=exclude_test_packages),
 
     # Alternatively, if you want to distribute just a my_module.py, uncomment
     # this:


Test patch:
diff --git a/conans/test/optimize_conanfile_load_test.py b/conans/test/unittests/client/optimize_conanfile_load_test.py
similarity index 100%
rename from conans/test/optimize_conanfile_load_test.py
rename to conans/test/unittests/client/optimize_conanfile_load_test.py
Repository: conan-io/conan

Issue:
Wrong message about "conan link"
remover.py, line 103, the message when you try to remove a package being an editable is: `WARN: Package 'zlib/1.2.11@conan/stable' is installed as editable, unlink it first using command 'conan link zlib/1.2.11@conan/stable --remove'`


Discussion:

Resolving patch:
diff --git a/conans/client/remover.py b/conans/client/remover.py
--- a/conans/client/remover.py
+++ b/conans/client/remover.py
@@ -101,8 +101,8 @@ def _remote_remove(self, ref, package_ids, remote):
 
     @staticmethod
     def _message_removing_editable(ref):
-        return "Package '{r}' is installed as editable, unlink it first using " \
-               "command 'conan link {r} --remove'".format(r=ref)
+        return "Package '{r}' is installed as editable, remove it first using " \
+               "command 'conan editable remove {r}'".format(r=ref)
 
     def _local_remove(self, ref, src, build_ids, package_ids):
         if self._cache.installed_as_editable(ref):


Test patch:
diff --git a/conans/test/functional/editable/forbidden_commands_test.py b/conans/test/functional/editable/forbidden_commands_test.py
--- a/conans/test/functional/editable/forbidden_commands_test.py
+++ b/conans/test/functional/editable/forbidden_commands_test.py
@@ -24,13 +24,13 @@ class APck(ConanFile):
         t.run('editable add . {}'.format(ref))
         self.assertTrue(t.cache.installed_as_editable(ref))
         t.run('remove {} --force'.format(ref), assert_error=True)
-        self.assertIn("Package 'lib/version@user/name' is installed as editable, unlink it first "
-                      "using command 'conan link lib/version@user/name --remove'", t.out)
+        self.assertIn("Package 'lib/version@user/name' is installed as editable, remove it first "
+                      "using command 'conan editable remove lib/version@user/name'", t.out)
 
         # Also with a pattern, but only a warning
         t.run('remove lib* --force')
         self.assertIn("WARN: Package 'lib/version@user/name' is installed as editable, "
-                      "unlink it first using command 'conan link lib/version@user/name --remove'",
+                      "remove it first using command 'conan editable remove lib/version@user/name'",
                       t.out)
         self.assertTrue(t.cache.installed_as_editable(ref))
Repository: conan-io/conan

Issue:
cmake_find_package_multi: find_dependency(NO_MODULE) requires CMake >= 3.9





Discussion:
Investigate if with some other trick or path it can be solved without using `NO_MODULE`, otherwise check cmake version and use `find_package` for cmake < 3.9
Implementation here: https://github.com/Kitware/CMake/blob/master/Modules/CMakeFindDependencyMacro.cmake
Looks like reasonable to use `find_package` when cmake < 3.9

Resolving patch:
diff --git a/conans/client/generators/cmake_find_package.py b/conans/client/generators/cmake_find_package.py
--- a/conans/client/generators/cmake_find_package.py
+++ b/conans/client/generators/cmake_find_package.py
@@ -84,7 +84,12 @@ def property_lines(prop):
             lines.append("find_dependency(%s REQUIRED)" % dep)
         else:
             # https://github.com/conan-io/conan/issues/4994
-            lines.append("find_dependency(%s REQUIRED NO_MODULE)" % dep)
+            # https://github.com/conan-io/conan/issues/5040
+            lines.append('if(${CMAKE_VERSION} VERSION_LESS "3.9.0")')
+            lines.append('  find_package(%s REQUIRED NO_MODULE)' % dep)
+            lines.append("else()")
+            lines.append('  find_dependency(%s REQUIRED NO_MODULE)' % dep)
+            lines.append("endif()")
 
         lines.extend(property_lines("INTERFACE_LINK_LIBRARIES"))
         lines.extend(property_lines("INTERFACE_COMPILE_DEFINITIONS"))


Test patch:
Repository: conan-io/conan

Issue:
Move memsharded/hello repository to the conan-io organization
When using the ``conan new`` command, the conanfile.py created points to https://github.com/memsharded/hello and it is a bit weird to use an example out of the organization.

We should move it to a isolated repo in the conan-io org and give it a better name, like: hello-cpp-lib-example

After that, the ``conan new`` command should be updated to use the new repo




Discussion:
@memsharded please, give us feedback about this. 
I would like to have this done as @jgsogo pointed out in https://github.com/conan-io/docs/pull/1262#discussion_r279651179

Do you agree on transferring the repo to the conan-io organization?
I think having a "conan-hello" repo in conan-community and the binaries uploaded to Conan Center will be helpful for the examples in the documentation too
Yes, I totally agree.

Probably it deserves a bit of clean-up, because it might have some weird patterns, like the "static_shared" branch, etc. The only problem is the moment I transfer it, it will be broken in develop. I suggest a completely new repo, deprecate mine (older versions of the doc would still use mine!)
Ok, I will create a new repo with the static_shared contents in the master branch and we will keep your repo too for old references

Resolving patch:
diff --git a/conans/client/cmd/new.py b/conans/client/cmd/new.py
--- a/conans/client/cmd/new.py
+++ b/conans/client/cmd/new.py
@@ -21,13 +21,12 @@ class {package_name}Conan(ConanFile):
     generators = "cmake"
 
     def source(self):
-        self.run("git clone https://github.com/memsharded/hello.git")
-        self.run("cd hello && git checkout static_shared")
+        self.run("git clone https://github.com/conan-io/hello.git")
         # This small hack might be useful to guarantee proper /MT /MD linkage
         # in MSVC if the packaged project doesn't have variables to set it
         # properly
-        tools.replace_in_file("hello/CMakeLists.txt", "PROJECT(MyHello)",
-                              '''PROJECT(MyHello)
+        tools.replace_in_file("hello/CMakeLists.txt", "PROJECT(HelloWorld)",
+                              '''PROJECT(HelloWorld)
 include(${{CMAKE_BINARY_DIR}}/conanbuildinfo.cmake)
 conan_basic_setup()''')
 


Test patch:
diff --git a/conans/test/integration/devflow_test.py b/conans/test/integration/devflow_test.py
--- a/conans/test/integration/devflow_test.py
+++ b/conans/test/integration/devflow_test.py
@@ -244,7 +244,7 @@ def build_local_different_folders_test(self):
         install_dir = os.path.join(client.current_folder, "install_x86_64")
         tools.replace_in_file(os.path.join(client.current_folder, "src", "hello", "CMakeLists.txt"),
                               "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake",
-                              '"%s/conanbuildinfo.cmake"' % install_dir,
+                              '"%s/conanbuildinfo.cmake"' % install_dir.replace("\\", "/"),
                               output=client.out)
 
         client.run("install . --install-folder install_x86_64 -s arch=x86_64")
Repository: conan-io/conan

Issue:
[BUG] Conan Tools does not export detected_os
To help us debug your issue please explain:

When I was updating cmake_installer, I just found that `detected_os` is not exported by conans.tools

Conan Version 1.15.0

```python
from conans import tools

if __name__ == "__main__":
	tools.detected_os()
```

**ERROR**: 
```
Traceback (most recent call last):
  File "conanfile.py", line 4, in <module>
    tools.detected_os()
AttributeError: module 'conans.tools' has no attribute 'detected_os'
```

- [X] I've read the [CONTRIBUTING guide](https://github.com/conan-io/conan/blob/develop/.github/CONTRIBUTING.md).
- [X] I've specified the Conan version, operating system version and any tool that can be relevant.
- [X] I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.




Discussion:

Resolving patch:
diff --git a/conans/tools.py b/conans/tools.py
--- a/conans/tools.py
+++ b/conans/tools.py
@@ -111,6 +111,7 @@ def replace_path_in_file(*args, **kwargs):
 # from conans.client.tools.oss
 args_to_string = tools_oss.args_to_string
 detected_architecture = tools_oss.detected_architecture
+detected_os = tools_oss.detected_os
 OSInfo = tools_oss.OSInfo
 cross_building = tools_oss.cross_building
 get_cross_building_settings = tools_oss.get_cross_building_settings


Test patch:
diff --git a/conans/test/unittests/client/conf/detect/detected_os_test.py b/conans/test/unittests/client/conf/detect/detected_os_test.py
--- a/conans/test/unittests/client/conf/detect/detected_os_test.py
+++ b/conans/test/unittests/client/conf/detect/detected_os_test.py
@@ -5,6 +5,7 @@
 import unittest
 from mock import mock
 from conans.client.tools.oss import detected_os, OSInfo
+from conans import tools
 
 
 class DetectedOSTest(unittest.TestCase):
@@ -44,3 +45,7 @@ def test_freebsd(self):
     def test_solaris(self):
         with mock.patch("platform.system", mock.MagicMock(return_value='SunOS')):
             self.assertEqual(detected_os(), "SunOS")
+
+    def test_export_tools(self):
+        with mock.patch("platform.system", mock.MagicMock(return_value='FreeBSD')):
+            self.assertEqual(tools.detected_os(), "FreeBSD")
Repository: conan-io/conan

Issue:
Conan remote update command error in 1.15
With the Conan 1.15 release it is no longer possible to use the `conan remote update` command to ensure an existing remote is configured to be at the specified index. Reverting to Conan 1.14 sees the command work as expected.

    conan remote update ci-conan https://my-artifactory-instance.com/artifactory/api/conan/ci-conan --insert=0 
    ERROR: Remote 'ci-conan' already exists with same URL




Discussion:

Resolving patch:
diff --git a/conans/client/cache/remote_registry.py b/conans/client/cache/remote_registry.py
--- a/conans/client/cache/remote_registry.py
+++ b/conans/client/cache/remote_registry.py
@@ -230,7 +230,7 @@ def update(self, remote_name, url, verify_ssl=True, insert=None):
 
     def _add_update(self, remote_name, url, verify_ssl, insert=None):
         prev_remote = self._get_by_url(url)
-        if prev_remote and verify_ssl == prev_remote.verify_ssl:
+        if prev_remote and verify_ssl == prev_remote.verify_ssl and insert is None:
             raise ConanException("Remote '%s' already exists with same URL" % prev_remote.name)
         updated_remote = Remote(remote_name, url, verify_ssl)
         if insert is not None:


Test patch:
diff --git a/conans/test/functional/command/remote_test.py b/conans/test/functional/command/remote_test.py
--- a/conans/test/functional/command/remote_test.py
+++ b/conans/test/functional/command/remote_test.py
@@ -258,6 +258,17 @@ def update_test_insert(self):
         self.assertIn("r3: https://r3", lines[1])
         self.assertIn("r2: https://r2new2", lines[2])
 
+    def test_update_insert_same_url(self):
+        # https://github.com/conan-io/conan/issues/5107
+        client = TestClient()
+        client.run("remote add r1 https://r1")
+        client.run("remote add r2 https://r2")
+        client.run("remote add r3 https://r3")
+        client.run("remote update r2 https://r2 --insert=0")
+        client.run("remote list")
+        self.assertLess(str(client.out).find("r2"), str(client.out).find("r1"))
+        self.assertLess(str(client.out).find("r1"), str(client.out).find("r3"))
+
     def verify_ssl_test(self):
         client = TestClient()
         client.run("remote add my-remote http://someurl TRUE")
Repository: conan-io/conan

Issue:
Missing 8.3 version of gcc
Hi,
[conan 1.15.0]
is this possible to add the 8.3 version of gcc into the default settings.yml generated ?

Regards,


Discussion:

Resolving patch:
diff --git a/conans/client/conf/__init__.py b/conans/client/conf/__init__.py
--- a/conans/client/conf/__init__.py
+++ b/conans/client/conf/__init__.py
@@ -58,8 +58,8 @@
                   "5", "5.1", "5.2", "5.3", "5.4", "5.5",
                   "6", "6.1", "6.2", "6.3", "6.4",
                   "7", "7.1", "7.2", "7.3",
-                  "8", "8.1", "8.2",
-                  "9"]
+                  "8", "8.1", "8.2", "8.3",
+                  "9", "9.1"]
         libcxx: [libstdc++, libstdc++11]
         threads: [None, posix, win32] #  Windows MinGW
         exception: [None, dwarf2, sjlj, seh] # Windows MinGW


Test patch: