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

prometheus-cpp: add version 1.2.4, require C++11 only #22079

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

toge
Copy link
Contributor

@toge toge commented Dec 31, 2023

Specify library name and version: prometheus-cpp/*


@conan-center-bot conan-center-bot added Failed Missing dependencies Build failed due missing dependencies in Conan Center labels Dec 31, 2023
@conan-center-bot

This comment has been minimized.

@toge toge changed the title prometheus: add version 1.2.0 prometheus-cpp: add version 1.2.0 Dec 31, 2023
@RubenRBS
Copy link
Member

RubenRBS commented Jan 7, 2024

Regenerating missing binaries now

@toge toge changed the title prometheus-cpp: add version 1.2.0 prometheus-cpp: add version 1.2.1 Jan 14, 2024
@toge toge changed the title prometheus-cpp: add version 1.2.1 prometheus-cpp: add version 1.2.3 Feb 13, 2024
@conan-center-bot conan-center-bot added Bump version PR bumping version without recipe modifications and removed Failed Missing dependencies Build failed due missing dependencies in Conan Center labels Feb 13, 2024
@conan-center-bot

This comment has been minimized.

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

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

There is a change regarding the minimal C++ standard required to build this project, it's C++11 again.

jupp0r/prometheus-cpp@v1.1.0...v1.2.3

I would suggest trying to build everything with C++11 directly, excluding the C++14 check.

@toge toge changed the title prometheus-cpp: add version 1.2.3 prometheus-cpp: add version 1.2.4 Mar 3, 2024
@toge toge changed the title prometheus-cpp: add version 1.2.4 prometheus-cpp: add version 1.2.4, required C++11 only Mar 3, 2024
@toge toge changed the title prometheus-cpp: add version 1.2.4, required C++11 only prometheus-cpp: add version 1.2.4, require C++11 only Mar 3, 2024
@toge
Copy link
Contributor Author

toge commented Mar 3, 2024

@uilianries
Thank you for your review!
I remove C++14 check and works fine for my environtments.
Let's try cci's CI.

@conan-center-bot conan-center-bot added Failed and removed Bump version PR bumping version without recipe modifications labels Mar 3, 2024
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@@ -36,15 +35,19 @@ class PrometheusCppConan(ConanFile):

@property
def _min_cppstd(self):
return 11 if Version(self.version) < "1.1.0" else 14
return "14" if Version(self.version) != "1.1.0" else "11"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return "14" if Version(self.version) != "1.1.0" else "11"
return "14" if Version(self.version) >= "1.1.0" else "11"

Includes 1.1.0 and higher to C++14

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As you mentioned, prometheus-cpp/1.2.4 requires only C++11 again.
So prometheus-cpp/1.1.0 is the only version to require C++14.

I realized the above code is wrong condition, I already fixed it.

@@ -5,8 +5,8 @@ find_package(prometheus-cpp CONFIG REQUIRED)

add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE prometheus-cpp::push prometheus-cpp::pull)
if(${prometheus-cpp_VERSION} VERSION_LESS "1.1.0")
Copy link
Member

Choose a reason for hiding this comment

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

You could simplify all these line to target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) only. C++14 is compatible with C++11, so it should not break the test package, so we don't need this condition.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe cxx_std_11 is required in all versions except 1.1.0.
To simplify this code, should I use target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) in all versions?

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 8 (95b53f90651d823bfdfd88a4f778d5a9594b25e3):

  • prometheus-cpp/1.0.1:
    All packages built successfully! (All logs)

  • prometheus-cpp/1.1.0:
    All packages built successfully! (All logs)

  • prometheus-cpp/1.0.0:
    All packages built successfully! (All logs)

  • prometheus-cpp/0.11.0:
    All packages built successfully! (All logs)

  • prometheus-cpp/1.2.4:
    All packages built successfully! (All logs)

  • prometheus-cpp/0.12.3:
    All packages built successfully! (All logs)

  • prometheus-cpp/0.12.1:
    All packages built successfully! (All logs)


Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 8 (95b53f90651d823bfdfd88a4f778d5a9594b25e3):

  • prometheus-cpp/1.0.0:
    All packages built successfully! (All logs)

  • prometheus-cpp/1.2.4:
    All packages built successfully! (All logs)

  • prometheus-cpp/1.1.0:
    All packages built successfully! (All logs)

  • prometheus-cpp/0.12.3:
    All packages built successfully! (All logs)

  • prometheus-cpp/1.0.1:
    All packages built successfully! (All logs)

  • prometheus-cpp/0.12.1:
    All packages built successfully! (All logs)

  • prometheus-cpp/0.11.0:
    All packages built successfully! (All logs)

@toge toge marked this pull request as draft March 26, 2024 08:55
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.

None yet

5 participants