Repository: conan-io/conan

Issue:
[bug] LLVM/Clang 13 not supported
<!--
  Please don't forget to update the issue title.
  Include all applicable information to help us reproduce your problem.

  To help us debug your issue please explain:
-->

### Environment Details (include every applicable attribute)
  * Operating System+version: Linux OpenMandriva Cooker
  * Compiler+version: LLVM/Clang 13 rc1 (build from 20210822)
  * Conan version: 1.39.0
  * Python version: 3.9.5

### Steps to reproduce (Include if Applicable)
- Compile Conan 1.39 with LLVM/Clang 13
- Compile with Clang 13 other package that depends on Conan (in my case Audacity 3.0.3 and cryfs 0.11.0rc)
- See build error below

### Logs (Executed commands with output) (Include/Attach if Applicable)

<!--
  Your log content should be related to the bug description, it can be:
  - Conan command output
  - Server output (Artifactory, conan_server)
-->
```
DEBUG util.py:636:  -- Configuring packages for Release
DEBUG util.py:636:  -- Conan: checking conan executable
DEBUG util.py:636:  -- Conan: Found program /usr/bin/conan
DEBUG util.py:636:  -- Conan: Version found Conan version 1.39.0
DEBUG util.py:636:  -- Conan executing: /usr/bin/conan install . --build missing --settings build_type=Release --settings compiler=clang --settings compiler.version=13 --settings compiler.libcxx=libstdc++11
DEBUG util.py:636:  Auto detecting your dev setup to initialize the default profile (/builddir/.conan/profiles/default)
DEBUG util.py:636:  CC and CXX: /usr/bin/clang, /usr/bin/clang++ 
DEBUG util.py:636:  Found clang 13.0
DEBUG util.py:636:  clang>=8, using the major as version
DEBUG util.py:636:  Default settings
DEBUG util.py:636:  	os=Linux
DEBUG util.py:636:  	os_build=Linux
DEBUG util.py:636:  	arch=x86_64
DEBUG util.py:636:  	arch_build=x86_64
DEBUG util.py:636:  	compiler=clang
DEBUG util.py:636:  	compiler.version=13
DEBUG util.py:636:  	compiler.libcxx=libstdc++
DEBUG util.py:636:  	build_type=Release
DEBUG util.py:636:  *** You can change them in /builddir/.conan/profiles/default ***
DEBUG util.py:636:  *** Or override with -s compiler='other' -s ...s***
DEBUG util.py:634:  ERROR: Invalid setting '13' is not a valid 'settings.compiler.version' value.
DEBUG util.py:634:  Possible values are ['3.3', '3.4', '3.5', '3.6', '3.7', '3.8', '3.9', '4.0', '5.0', '6.0', '7.0', '7.1', '8', '9', '10', '11', '12']
DEBUG util.py:634:  Read "http://docs.conan.io/en/latest/faq/troubleshooting.html#error-invalid-setting"
DEBUG util.py:634:  CMake Error at cmake-proxies/cmake-modules/conan.cmake:631 (message):
DEBUG util.py:634:    Conan install failed='1'
DEBUG util.py:634:  Call Stack (most recent call first):
DEBUG util.py:634:    cmake-proxies/cmake-modules/AudacityDependencies.cmake:233 (conan_cmake_install)
DEBUG util.py:634:    cmake-proxies/cmake-modules/AudacityDependencies.cmake:254 (_conan_install)
DEBUG util.py:634:    CMakeLists.txt:509 (resolve_conan_dependencies)
DEBUG util.py:636:  -- Configuring incomplete, errors occurred!
DEBUG util.py:636:  See also "/builddir/build/BUILD/audacity-Audacity-3.0.3/build/CMakeFiles/CMakeOutput.log".
DEBUG util.py:636:  See also "/builddir/build/BUILD/audacity-Audacity-3.0.3/build/CMakeFiles/CMakeError.log".
DEBUG util.py:636:  RPM build errors:
DEBUG util.py:634:  error: Bad exit status from /var/tmp/rpm-tmp.4LaUKh (%build)
DEBUG util.py:634:      Macro expanded in comment on line 16: %{version}.tar.xz
DEBUG util.py:634:      Bad exit status from /var/tmp/rpm-tmp.4LaUKh (%build)
DEBUG util.py:787:  Child return code was: 1
INFO util.py:698:  EXCEPTION: [Error()]
```


Discussion:
Hi @AngryPenguinPL 

Have you realized this error message, including the link (http://docs.conan.io/en/latest/faq/troubleshooting.html#error-invalid-setting) to the docs?

```
DEBUG util.py:634:  ERROR: Invalid setting '13' is not a valid 'settings.compiler.version' value.
DEBUG util.py:634:  Possible values are ['3.3', '3.4', '3.5', '3.6', '3.7', '3.8', '3.9', '4.0', '5.0', '6.0', '7.0', '7.1', '8', '9', '10', '11', '12']
DEBUG util.py:634:  Read "http://docs.conan.io/en/latest/faq/troubleshooting.html#error-invalid-setting"
```


Conan typically doesn't added pre-releases compilers (clang 13 not https://releases.llvm.org/ yet, it seems), as something might change with defaults that requires build helpers changes.
Yes, I have read it.
I know official support for Clang 13 will come sooner or later, but it would be nice if it was earlier :)
I don't mean just being able to compile with variables or edit settings - because that seems to be what I can do at any time. Rather, I mean automatism, since Clang 13 will be released soon, some distributions in their unstable / devel branch are beginning to slowly implement it and repopulate repositories with packages rebuilt with  Clang 13. So it would be nice if there was at least some commit to master conan, which would handle Clang 13 so that we can rebuild the repositories automatically without manual intervention. But as I say, this is not some super urgent matter, but would be very welcome.
It is true, and it is also true that we are getting push for adding VS2022 (here: https://github.com/conan-io/conan/pull/9370), and the rule must be the same for all. Options:

- Do not add versions until officially released (policy so far)
- Add versions even if they are not officially released, for all compilers (while they are in pre-release, beta)
- Add versions only of those compilers with some guarantee that their defaults affecting binary compatibility (default cppstd, for example) will not change before release. I don't know if this can be guaranteed.

I'll bring the issue to the team.
Lets add pre-releases of new compiler versions to settings.yml. 
We will add a note to the docs, to clarify the natural instability of these versions, but that should be expected by everyone using them, shouldn't be an issue.

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
@@ -96,7 +96,7 @@
         clang:
             version: ["3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "4.0",
                       "5.0", "6.0", "7.0", "7.1",
-                      "8", "9", "10", "11", "12"]
+                      "8", "9", "10", "11", "12", "13"]
             libcxx: [None, libstdc++, libstdc++11, libc++, c++_shared, c++_static]
             cppstd: [None, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23]
             runtime: [None, MD, MT, MTd, MDd]
diff --git a/conans/client/migrations_settings.py b/conans/client/migrations_settings.py
--- a/conans/client/migrations_settings.py
+++ b/conans/client/migrations_settings.py
@@ -2394,7 +2394,7 @@
     clang:
         version: ["3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "4.0",
                   "5.0", "6.0", "7.0", "7.1",
-                  "8", "9", "10", "11", "12"]
+                  "8", "9", "10", "11", "12", "13"]
         libcxx: [None, libstdc++, libstdc++11, libc++, c++_shared, c++_static]
         cppstd: [None, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23]
         runtime: [None, MD, MT, MTd, MDd]


Test patch: