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

[googleapis] Use is_msvc to abstract away compiler name setting #14626

Merged

Conversation

jcar87
Copy link
Contributor

@jcar87 jcar87 commented Dec 7, 2022

Specify library name and version: googleapis/all

An issue was reported were installation was failing due to an out of date settings.yml were msvc was missing (conan-io/conan#12646). In Conan 2 the opposite is the case ("Visual Studio" is no longer the compiler name). This PR updates the recipe logic such that it uses the helper that abstracts away the compiler check in a way that is compatible with both (and, also, covers the case for users with an older settings.yml in conan 1.x)

@ghost
Copy link

ghost commented Dec 7, 2022

I detected other pull requests that are modifying googleapis/all recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prsso don't hesitate to report issues/improvements there.

from conan.tools.scm import Version

from conan.errors import ConanInvalidConfiguration

from helpers import parse_proto_libraries

required_conan_version = ">=1.45.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
required_conan_version = ">=1.45.0"
required_conan_version = ">=1.47.0"

Copy link
Contributor

Choose a reason for hiding this comment

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

due to ConanInvalidConfiguration from conan.errors

@SpaceIm
Copy link
Contributor

SpaceIm commented Dec 7, 2022

An issue was reported were installation was failing due to an out of date settings.yml were msvc was missing (conan-io/conan#12646). In Conan 2 the opposite is the case ("Visual Studio" is no longer the compiler name). This PR updates the recipe logic such that it uses the helper that abstracts away the compiler check in a way that is compatible with both (and, also, covers the case for users with an older settings.yml in conan 1.x)

So conan should implement conan-io/conan#11158 (comment), otherwise cross-compatibility will be quite tedious.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline

All green in build 1 (066c65b8146ae3f47c9623597093d0f9b25f4619):

  • googleapis/cci.20220531@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-14626/recipes/googleapis/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-14626/recipes/googleapis/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-14626/recipes/googleapis/all/conanfile.py", line 6, in <module>
        from conans import CMake, tools
    ImportError: cannot import name 'CMake' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • googleapis/cci.20220711@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-14626/recipes/googleapis/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-14626/recipes/googleapis/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-14626/recipes/googleapis/all/conanfile.py", line 6, in <module>
        from conans import CMake, tools
    ImportError: cannot import name 'CMake' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • googleapis/cci.20210730@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-14626/recipes/googleapis/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-14626/recipes/googleapis/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-14626/recipes/googleapis/all/conanfile.py", line 6, in <module>
        from conans import CMake, tools
    ImportError: cannot import name 'CMake' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • googleapis/cci.20211122@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-14626/recipes/googleapis/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-14626/recipes/googleapis/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-14626/recipes/googleapis/all/conanfile.py", line 6, in <module>
        from conans import CMake, tools
    ImportError: cannot import name 'CMake' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    

@conan-center-bot conan-center-bot merged commit 63ce451 into conan-io:master Dec 8, 2022
@jcar87 jcar87 deleted the bugfix/googleapis-use-is-msvc-check branch December 8, 2022 13:11
datalogics-robb pushed a commit to datalogics-robb/conan-center-index that referenced this pull request Mar 6, 2023
…-index

* 'develop' of octocat.dlogics.com:datalogics/conan-center-index: (6046 commits)
  cmake: Remove the private tag from the openssl requirement
  (conan-io#14689) doctest: Use self.info.clear() instead of header_only()
  (conan-io#14684) imath: add version 3.1.6
  (conan-io#14679) tgbot: add version 1.5
  (conan-io#14672) luau: add version 0.556
  (conan-io#14673) fast_double_parser: add version 0.7.0
  (conan-io#14664) sqlite_orm: add version 1.8
  (conan-io#14663) magic_enum: add version 0.8.2
  (conan-io#14658) Update changelog 09-December-2022
  (conan-io#14525) Add Boost.LEAF to Conan Center
  (conan-io#13722) Add wavelet_buffer v0.4.0
  (conan-io#14655) etl: add version 20.35.5
  (conan-io#14654) nss 3.86
  (conan-io#14652) flatbuffers: add version 22.12.06
  (conan-io#14427) libxml2: fix CMake vars in CMakeDeps & bump icu
  (conan-io#14626) [googleapis] Use is_msvc to abstract away compiler name setting
  (conan-io#14619) (conan-io#14620) libzip: Use robust github mirror
  (conan-io#14617) pybind11_json: add version 0.2.13
  (conan-io#14476) add libhydrogen/cci.20221115
  (conan-io#13917) cimg: conan v2 support + bump dependencies + disable dependencies by default
  ...
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