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

Conan 2 in CI #1020

Open
foundrytom opened this issue Jul 18, 2023 · 3 comments · May be fixed by #1163
Open

Conan 2 in CI #1020

foundrytom opened this issue Jul 18, 2023 · 3 comments · May be fixed by #1163
Assignees
Milestone

Comments

@foundrytom
Copy link
Collaborator

foundrytom commented Jul 18, 2023

What

Decide how we are going to support Conan 2

Why

It's out, and soon we'll fall foul to incompatibilities with older conan versions and the newer ecosystem, eg:

The conflict is caused by:
    The user requested pyyaml==6.0.1
    conan 1.59.0 depends on PyYAML<=6.0 and >=3.11

ACs

  • Remove existing dependent pins where solved by v2 (see here for example)
  • Use of conan updated to 2.x where it "just works" - dont add workaround etc... just shelve for now instead.
@foundrytom foundrytom added this to the v1.0.0 milestone Jul 18, 2023
@feltech
Copy link
Member

feltech commented Sep 5, 2023

A brief update on this.

Since we removed the cpython package as part of #977, and since the remaining packages are reasonably popular, Conan 2 should now be a simple migration.

Our conanfile.py is now simple enough that I believe we can go back to a nice basic conanfile.txt (as a pure consumer).

The one remaining workaround in our conanfile.py is to be able to use release builds of libraries in a debug build of the project. However, there is a proper way to do it via Conan, as well as a CMake based alternative that seems to work (though I think we should use the Conan way).

@foundrytom
Copy link
Collaborator Author

It'd def be good to have CC actually be up to date and maintained.

@foundrytom
Copy link
Collaborator Author

foundrytom commented Oct 2, 2023

Another reason https://github.com/foundrytom/OpenAssetIO/actions/runs/6381788009/job/17319007059?pr=40 (More cython_sources fun and games)

feltech added a commit to feltech/OpenAssetIO that referenced this issue Oct 13, 2023
Closes OpenAssetIO#1020. Conan v2 has been out for some time now and supports all
of our dependencies.

The command-line syntax is somewhat different, so update all usages to
use the new syntax.

It is no longer possible to mutate a Conan profile via the command line,
so we have to supply a custom profile (or edit the default profile via
an alternative mechanism - not pursued here).

Thankfully, Conan profiles are Jinja templates with some handy utility
functions injected out of the box, in particular the `detect_api`. This
means we can ship a single Conan profile, which will work across all
platforms. Currently, auto-detection is used for all profile fields
except the C++ standard, and on Linux the libstdc++ ABI toggle. Both of
these explicitly specified fields follow VFX Reference Platform CY2022.

Use the `CMakeToolchain` generator, rather than the (now removed)
`cmake_paths`. Hence update the various `CMAKE_TOOLCHAIN_FILE` et al.
references to use `conan_toolchain.cmake`

Signed-off-by: David Feltell <[email protected]>
@feltech feltech linked a pull request Oct 13, 2023 that will close this issue
3 tasks
feltech added a commit to feltech/OpenAssetIO that referenced this issue Oct 13, 2023
Closes OpenAssetIO#1020. Conan v2 has been out for some time now and supports all
of our dependencies.

The command-line syntax is somewhat different, so update all usages to
use the new syntax.

It is no longer possible to mutate a Conan profile via the command line,
so we have to supply a custom profile (or edit the default profile via
an alternative mechanism - not pursued here).

Thankfully, Conan profiles are Jinja templates with some handy utility
functions injected out of the box, in particular the `detect_api`. This
means we can ship a single Conan profile, which will work across all
platforms. Currently, auto-detection is used for all profile fields
except the C++ standard, and on Linux the libstdc++ ABI toggle. Both of
these explicitly specified fields follow VFX Reference Platform CY2022.

Use the `CMakeToolchain` generator, rather than the (now removed)
`cmake_paths`. Hence update the various `CMAKE_TOOLCHAIN_FILE` et al.
references to use `conan_toolchain.cmake`

Signed-off-by: David Feltell <[email protected]>
feltech added a commit to feltech/OpenAssetIO that referenced this issue Oct 13, 2023
Closes OpenAssetIO#1020. Conan v2 has been out for some time now and supports all
of our dependencies.

The command-line syntax is somewhat different, so update all usages to
use the new syntax.

It is no longer possible to mutate a Conan profile via the command line,
so we have to supply a custom profile (or edit the default profile via
an alternative mechanism - not pursued here).

Thankfully, Conan profiles are Jinja templates with some handy utility
functions injected out of the box, in particular the `detect_api`. This
means we can ship a single Conan profile, which will work across all
platforms. Currently, auto-detection is used for all profile fields
except the C++ standard, and on Linux the libstdc++ ABI toggle. Both of
these explicitly specified fields follow VFX Reference Platform CY2022.

Use the `CMakeToolchain` generator, rather than the (now removed)
`cmake_paths`. Hence update the various `CMAKE_TOOLCHAIN_FILE` et al.
references to use `conan_toolchain.cmake`

Signed-off-by: David Feltell <[email protected]>
feltech added a commit to feltech/OpenAssetIO that referenced this issue Oct 13, 2023
Closes OpenAssetIO#1020. Conan v2 has been out for some time now and supports all
of our dependencies.

The command-line syntax is somewhat different, so update all usages to
use the new syntax.

It is no longer possible to mutate a Conan profile via the command line,
so we have to supply a custom profile (or edit the default profile via
an alternative mechanism - not pursued here).

Thankfully, Conan profiles are Jinja templates with some handy utility
functions injected out of the box, in particular the `detect_api`. This
means we can ship a single Conan profile, which will work across all
platforms. Currently, auto-detection is used for all profile fields
except the C++ standard, and on Linux the libstdc++ ABI toggle. Both of
these explicitly specified fields follow VFX Reference Platform CY2022.

Use the `CMakeToolchain` generator, rather than the (now removed)
`cmake_paths`. Hence update the various `CMAKE_TOOLCHAIN_FILE` et al.
references to use `conan_toolchain.cmake`

Signed-off-by: David Feltell <[email protected]>
feltech added a commit to feltech/OpenAssetIO that referenced this issue Oct 13, 2023
Closes OpenAssetIO#1020. Conan v2 has been out for some time now and supports all
of our dependencies.

The command-line syntax is somewhat different, so update all usages to
use the new syntax.

It is no longer possible to mutate a Conan profile via the command line,
so we have to supply a custom profile (or edit the default profile via
an alternative mechanism - not pursued here).

Thankfully, Conan profiles are Jinja templates with some handy utility
functions injected out of the box, in particular the `detect_api`. This
means we can ship a single Conan profile, which will work across all
platforms. Currently, auto-detection is used for all profile fields
except the C++ standard, and on Linux the libstdc++ ABI toggle. Both of
these explicitly specified fields follow VFX Reference Platform CY2022.

Use the `CMakeToolchain` generator, rather than the (now removed)
`cmake_paths`. Hence update the various `CMAKE_TOOLCHAIN_FILE` et al.
references to use `conan_toolchain.cmake`

Signed-off-by: David Feltell <[email protected]>
feltech added a commit to feltech/OpenAssetIO that referenced this issue Oct 13, 2023
Closes OpenAssetIO#1020. Conan v2 has been out for some time now and supports all
of our dependencies.

The command-line syntax is somewhat different, so update all usages to
use the new syntax.

It is no longer possible to mutate a Conan profile via the command line,
so we have to supply a custom profile (or edit the default profile via
an alternative mechanism - not pursued here).

Thankfully, Conan profiles are Jinja templates with some handy utility
functions injected out of the box, in particular the `detect_api`. This
means we can ship a single Conan profile, which will work across all
platforms. Currently, auto-detection is used for all profile fields
except the C++ standard, and on Linux the libstdc++ ABI toggle. Both of
these explicitly specified fields follow VFX Reference Platform CY2022.

Use the `CMakeToolchain` generator, rather than the (now removed)
`cmake_paths`. Hence update the various `CMAKE_TOOLCHAIN_FILE` et al.
references to use `conan_toolchain.cmake`

Signed-off-by: David Feltell <[email protected]>
feltech added a commit to feltech/OpenAssetIO that referenced this issue Oct 13, 2023
Closes OpenAssetIO#1020. Conan v2 has been out for some time now and supports all
of our dependencies.

The command-line syntax is somewhat different, so update all usages to
use the new syntax.

It is no longer possible to mutate a Conan profile via the command line,
so we have to supply a custom profile (or edit the default profile via
an alternative mechanism - not pursued here).

Thankfully, Conan profiles are Jinja templates with some handy utility
functions injected out of the box, in particular the `detect_api`. This
means we can ship a single Conan profile, which will work across all
platforms. Currently, auto-detection is used for all profile fields
except the C++ standard, and on Linux the libstdc++ ABI toggle. Both of
these explicitly specified fields follow VFX Reference Platform CY2022.

Use the `CMakeToolchain` generator, rather than the (now removed)
`cmake_paths`. Hence update the various `CMAKE_TOOLCHAIN_FILE` et al.
references to use `conan_toolchain.cmake`

Signed-off-by: David Feltell <[email protected]>
feltech added a commit to feltech/OpenAssetIO that referenced this issue Oct 13, 2023
Closes OpenAssetIO#1020. Conan v2 has been out for some time now and supports all
of our dependencies.

The command-line syntax is somewhat different, so update all usages to
use the new syntax.

It is no longer possible to mutate a Conan profile via the command line,
so we have to supply a custom profile (or edit the default profile via
an alternative mechanism - not pursued here).

Thankfully, Conan profiles are Jinja templates with some handy utility
functions injected out of the box, in particular the `detect_api`. This
means we can ship a single Conan profile, which will work across all
platforms. Currently, auto-detection is used for all profile fields
except the C++ standard, and on Linux the libstdc++ ABI toggle. Both of
these explicitly specified fields follow VFX Reference Platform CY2022.

Use the `CMakeToolchain` generator, rather than the (now removed)
`cmake_paths`. Hence update the various `CMAKE_TOOLCHAIN_FILE` et al.
references to use `conan_toolchain.cmake`

Signed-off-by: David Feltell <[email protected]>
feltech added a commit to feltech/OpenAssetIO that referenced this issue Oct 16, 2023
Closes OpenAssetIO#1020. Conan v2 has been out for some time now and supports all
of our dependencies.

The command-line syntax is somewhat different, so update all usages to
use the new syntax.

It is no longer possible to mutate a Conan profile via the command line,
so we have to supply a custom profile (or edit the default profile via
an alternative mechanism - not pursued here).

Thankfully, Conan profiles are Jinja templates with some handy utility
functions injected out of the box, in particular the `detect_api`. This
means we can ship a single Conan profile, which will work across all
platforms. Currently, auto-detection is used for all profile fields
except the C++ standard, and on Linux the libstdc++ ABI toggle. Both of
these explicitly specified fields follow VFX Reference Platform CY2022.

Use the `CMakeToolchain` generator, rather than the (now removed)
`cmake_paths`. Hence update the various `CMAKE_TOOLCHAIN_FILE` et al.
references to use `conan_toolchain.cmake`

Signed-off-by: David Feltell <[email protected]>
feltech added a commit to feltech/OpenAssetIO that referenced this issue Oct 16, 2023
Closes OpenAssetIO#1020. Conan v2 has been out for some time now and supports all
of our dependencies.

The command-line syntax is somewhat different, so update all usages to
use the new syntax.

It is no longer possible to mutate a Conan profile via the command line,
so we have to supply a custom profile (or edit the default profile via
an alternative mechanism - not pursued here).

Thankfully, Conan profiles are Jinja templates with some handy utility
functions injected out of the box, in particular the `detect_api`. This
means we can ship a single Conan profile, which will work across all
platforms. Currently, auto-detection is used for all profile fields
except the C++ standard, and on Linux the libstdc++ ABI toggle. Both of
these explicitly specified fields follow VFX Reference Platform CY2022.

Use the `CMakeToolchain` generator, rather than the (now removed)
`cmake_paths`. Hence update the various `CMAKE_TOOLCHAIN_FILE` et al.
references to use `conan_toolchain.cmake`

Signed-off-by: David Feltell <[email protected]>
feltech added a commit to feltech/OpenAssetIO that referenced this issue Oct 16, 2023
Closes OpenAssetIO#1020. Conan v2 has been out for some time now and supports all
of our dependencies.

The command-line syntax is somewhat different, so update all usages to
use the new syntax.

It is no longer possible to mutate a Conan profile via the command line,
so we have to supply a custom profile (or edit the default profile via
an alternative mechanism - not pursued here).

Thankfully, Conan profiles are Jinja templates with some handy utility
functions injected out of the box, in particular the `detect_api`. This
means we can ship a single Conan profile, which will work across all
platforms. Currently, auto-detection is used for all profile fields
except the C++ standard, and on Linux the libstdc++ ABI toggle. Both of
these explicitly specified fields follow VFX Reference Platform CY2022.

Use the `CMakeToolchain` generator, rather than the (now removed)
`cmake_paths`. Hence update the various `CMAKE_TOOLCHAIN_FILE` et al.
references to use `conan_toolchain.cmake`

Signed-off-by: David Feltell <[email protected]>
feltech added a commit to feltech/OpenAssetIO that referenced this issue Oct 16, 2023
Closes OpenAssetIO#1020. Conan v2 has been out for some time now and supports all
of our dependencies.

The command-line syntax is somewhat different, so update all usages to
use the new syntax.

It is no longer possible to mutate a Conan profile via the command line,
so we have to supply a custom profile (or edit the default profile via
an alternative mechanism - not pursued here).

Thankfully, Conan profiles are Jinja templates with some handy utility
functions injected out of the box, in particular the `detect_api`. This
means we can ship a single Conan profile, which will work across all
platforms. Currently, auto-detection is used for all profile fields
except the C++ standard, and on Linux the libstdc++ ABI toggle. Both of
these explicitly specified fields follow VFX Reference Platform CY2022.

Use the `CMakeToolchain` generator, rather than the (now removed)
`cmake_paths`. Hence update the various `CMAKE_TOOLCHAIN_FILE` et al.
references to use `conan_toolchain.cmake`

Signed-off-by: David Feltell <[email protected]>
@foundrytom foundrytom changed the title Conan 2 Conan 2 / C++ distribution strategy Nov 16, 2023
@foundrytom foundrytom changed the title Conan 2 / C++ distribution strategy Conan 2 in CI Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

3 participants