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

M4 Conan 2.0 compatibility #14544

Merged
merged 13 commits into from
Jan 27, 2023
Merged

Conversation

System-Arch
Copy link
Contributor

Specify library name and version: m4/1.4.19

Updated so that test_package passes with Conan 2.0 (resolves #14540). Also added support to be able to build if source is obtained from Git repo (rather than pre-digested tar ball).


@conan-center-bot

This comment has been minimized.

recipes/m4/all/conanfile.py Outdated Show resolved Hide resolved
Comment on lines 100 to 104
# Support building with source from Git reop
with chdir(self, self.source_folder):
command = "./bootstrap"
if os.path.exists(command) and not os.path.exists("configure"):
self.run(command)
Copy link
Contributor

Choose a reason for hiding this comment

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

but we don't build from git repo...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @SpaceIm,
While CCI doesn't build from Git source, I hope that shouldn't preclude the ability to use these recipes in other contexts that do.

Copy link
Contributor

@SpaceIm SpaceIm Dec 3, 2022

Choose a reason for hiding this comment

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

Sure it should. This recipe builds with a specific source, trying to support another one is a burden maintenance and won't be tested anyway. To be able to build from another source, you have to change recipe anyway, so I don't see the point of these modifications in conan-center.
Please do not resolve open discussions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @SpaceIm,
Sorry for marking discussion as resolved. I'm still learning the proper etiquette as it was unclear to me when issues get marked as resolved.
Regarding the technical issues, with Conan 2.0, it is easy to use the "build" and "export-pkg" commands to maintain a private repo while using Git for the source along with the CCI recipes when they are compatible with building directly from source. Most are, but a few, like this one, require an extra bootstrapping step to account for the build steps that were taken prior to creating the distribution tar balls. Building directly from Git-maintained source is preferable when one needs to fix bugs or make custom modifications to the libraries. I don't think the extra few lines of recipe code cause harm, as they eliminate the need to maintain private forks for the recipes themselves and the functionality may prove useful to others who wish to do the same.

Copy link
Member

Choose a reason for hiding this comment

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

@System-Arch the point is, we need to keep the behavior as building from CCI to keep the reproducibility. Using bootstrap you are running a case which is not required for the CI. Please revert it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@uilianries,
This bootstrap logic is only active if one is building from a Git repo in which case the build area will lack a pre-existing "configure" file. If that file is already present (as is the case with a tar ball), the bootstrap step is skipped and this extra couple of lines of code become a no-op. Thus I don't believe they have any impact on "reproducibility."

On a deeper philosophical note, is the goal of the CCI recipes only to populate CCI or is it to encourage the wide-scale adoption of Conan (and especially the new and improved Conan 2.0, which has better intrinsic support for interfacing with Git). I have been assuming it is the latter and that the CCI community would applaud efforts to make recipes as broadly applicable as possible. Otherwise, organizations are forced to maintain private recipe forks, which reduces the incentive to upstream their efforts back to CCI. Thanks for reconsidering your position here.

Copy link
Contributor

Choose a reason for hiding this comment

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

I added this to our shepherds meetings to revisit as a topic :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I missed last weeks meeting but the team decided against this, @jcar87 was supposed to add a comment :)

for now let's remove these so we can get the amazing work in hopefully once some of the other problems are cleared there's more room this things

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@System-Arch
Copy link
Contributor Author

Hi @prince-chrismc,
Both the V1 and V2 CI failures are the result of the CI pipelines using older versions of Conan 1.x and Conan 2.0. Is there something preventing the automation from always using the latest Conan releases, as such a strategy would prevent these types of build failures? Thanks

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@ghost
Copy link

ghost commented Jan 5, 2023

I detected other pull requests that are modifying m4/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.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@uilianries
Copy link
Member

Is there something preventing the automation from always using the latest Conan releases, as such a strategy would prevent these types of build failures

@System-Arch Yes, there are two main points:

  • Updating Conan client is separated from CCI. To update a version in the CI requires more efforts, as we need to regenerate some docker images, update ansible scripts and adjust jenkins with new labels. It could be automated, but still, it's a separated step.
  • Months ago we decided to keep one step behind from the latest release, there is an issue discussing about but can't find it now. The problem is, when a new minor version is released, it may contain bugs which may break the CI and we will need to wait for a patch version, then update all CI again. We had an incident which stopped the CI in the past, so we decided to run not the latest version, because usually new features are not really needed in the CCI (if they are needed, we update ASAP) and preferred to keep stability instead, because a CI running is better than a broken CI.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 13 (f97567a824c61105fee091c480122f1f309e9f71):

  • m4/1.4.18@:
    All packages built successfully! (All logs)

  • m4/1.4.19@:
    All packages built successfully! (All logs)

@conan-center-bot conan-center-bot merged commit 5a4200a into conan-io:master Jan 27, 2023
StellaSmith pushed a commit to StellaSmith/conan-center-index that referenced this pull request Feb 2, 2023
* M4 Conan 2.0 compatibility

* Restore v1 support for M4 env. var.

* Set env_info.PATH in Conan 2 compatible manner

* Removed cond. logic for self.output.PATH.append (see conan-io/conan#12673)

* Added workaround for Conan issue conan-io#12685

* Tweaked how win_bash is set

* Removed workaround for Conan issue conan-io#12685 (fixed in beta8)

* Fixed lint issue

* Conan 2.0 renamed output in self.run()

* Bumped required_conan_version to clear "failed" label

* Removed optional bootstrap support per CCI decision

* Removed import for chdir

* Removed handling of COPYING as symlink (which it is in Git repo)
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.

[package] m4/1.4.19: Fails test_package with latest Conan 2.0
6 participants