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

mongo-cxx-driver: use validate() for checking configuration #4057

Merged

Conversation

mathbunnyru
Copy link
Contributor

@mathbunnyru mathbunnyru commented Jan 2, 2021

Specify library name and version: mongo-cxx-driver/3.6.2

  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the
    conan-center hook activated.

Comment on lines +127 to +128
if self.options.with_ssl and not bool(self.options["mongo-c-driver"].with_ssl):
raise ConanInvalidConfiguration("mongo-cxx-driver with_ssl=True requires mongo-c-driver with a ssl implementation")
Copy link
Contributor Author

@mathbunnyru mathbunnyru Jan 2, 2021

Choose a reason for hiding this comment

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

The old code here, everything is from configure() or build() methods.

I followed the recommendation from here:
https://blog.conan.io/2020/12/14/New-conan-release-1-32.html
the validate() method should take over all responsibility for raising ConanInvalidConfiguration errors

@mathbunnyru
Copy link
Contributor Author

conan create all mongo-cxx-driver/3.6.2@ --build=missing -o mongo-cxx-driver:with_ssl=True -o mongo-c-driver:with_ssl=False now doesn't build dependencies, which is awesome.

@conan-center-bot
Copy link
Collaborator

An unexpected error happened and has been reported. Help is on its way! 🏇

@prince-chrismc
Copy link
Contributor

Should the be a new hook?

version = tools.Version(self.settings.compiler.version)
if version < self._compilers_minimum_version[compiler]:
raise ConanInvalidConfiguration(
"{} requires a compiler that supports at least C++{}".format(
Copy link
Contributor

Choose a reason for hiding this comment

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

I'll have to read that blog post but I would have expected this in configure method

@SpaceIm
Copy link
Contributor

SpaceIm commented Jan 2, 2021

I would move validate() between requirements() and source(). It helps to understand the logic and eventually consequences.

You can also bump mongo-c-driver to 1.17.3

@mathbunnyru
Copy link
Contributor Author

Should the be a new hook?

For now I created the issue https://github.com/conan-io/conan/issues/8278

@mathbunnyru
Copy link
Contributor Author

mathbunnyru commented Jan 2, 2021

I would move validate() between requirements() and source(). It helps to understand the logic and eventually consequences.

You can also bump mongo-c-driver to 1.17.3

Done. Also bumped boost.

@conan-center-bot
Copy link
Collaborator

An unexpected error happened and has been reported. Help is on its way! 🏇

prince-chrismc
prince-chrismc previously approved these changes Jan 2, 2021
Copy link
Contributor

@prince-chrismc prince-chrismc left a comment

Choose a reason for hiding this comment

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

very weak approval, I dont know this new method 🙊

Croydon
Croydon previously approved these changes Jan 3, 2021
@mathbunnyru mathbunnyru closed this Jan 4, 2021
@mathbunnyru mathbunnyru reopened this Jan 4, 2021
@conan-center-bot
Copy link
Collaborator

Some configurations of 'mongo-cxx-driver/3.6.1' failed in build 3 (9792706f6a0ff3d04eefdf7565d6bf247ed83221):

@mathbunnyru
Copy link
Contributor Author

Both errors are: ERROR: Missing prebuilt package for 'mongo-c-driver/1.17.3'
What should I do to fix this?

@SpaceIm
Copy link
Contributor

SpaceIm commented Jan 4, 2021

Indeed:

  • with conan search mongo-c-driver/1.17.3@ --table=file.html -r conan-center, I see 87 packages (1 is missing: Linux/clang6.0/static)
  • 1.17.3 is not even displayed on https://conan.io/center/mongo-c-driver

You can open an issue in CCI.

@prince-chrismc
Copy link
Contributor

What should I do to fix this?

Call the ghostbusters infra team!

team

//cc @jgsogo @danimtb if you guys have some time to take a peek at the issue we always appreciate it!

@mathbunnyru
Copy link
Contributor Author

If it's somethin' weird an' it don't look good
Who ya gonna call?
(Ghostbusters!)

#4076

@ghost
Copy link

ghost commented Jan 8, 2021

I detected other pull requests that are modifying mongo-cxx-driver/all recipe:

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

@mathbunnyru mathbunnyru changed the title mongo-cxx-driver: bump to 3.6.2 and use validate() for checking confi… mongo-cxx-driver: use validate() for checking configuration Jan 15, 2021
@mathbunnyru
Copy link
Contributor Author

mathbunnyru commented Jan 15, 2021

I decided to stick with the current version of mongo-c-driver, to merge this PR faster.
The version could be updated later without any problems (when the package is fixed).

@prince-chrismc
Copy link
Contributor

🤞 CI passes... dang missing binaries

@mathbunnyru
Copy link
Contributor Author

Merged master, there was an important fix to this recipe.

@mathbunnyru
Copy link
Contributor Author

🤞 CI passes... dang missing binaries

Let's hope and pray :)

@conan-center-bot
Copy link
Collaborator

Some configurations of 'mongo-cxx-driver/3.6.1' failed in build 4 (8e05648d34c2ec5139159cbe148b6676f2d3c2ee):

@conan-center-bot
Copy link
Collaborator

All green in build 5 (8e05648d34c2ec5139159cbe148b6676f2d3c2ee)! 😊

  • mongo-cxx-driver/3.6.1: Generated 132 packages (+ 1 invalid config from build()). All logs here
  • mongo-cxx-driver/3.6.2: Generated 132 packages (+ 1 invalid config from build()). All logs here

@mathbunnyru
Copy link
Contributor Author

@Croydon may I ask you to review again, please?

@conan-center-bot conan-center-bot merged commit d383eb9 into conan-io:master Jan 18, 2021
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.

6 participants