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

Trying to upgrade libraries in VCPKG #3862

Merged
merged 8 commits into from
Sep 30, 2023

Conversation

baziorek
Copy link
Contributor

@baziorek baziorek commented Sep 2, 2023

Description

In PR #3852 I needed to revert upgrading VCPKG. It caused libraries to downgrade. So now we need to try to upgrade libraries manually one by one.

Corrections (marked as [x] when CI passed):

  • iroha-ed25519 (no updates)
  • protobuf 3.15.8 -> 3.21.12
  • abseil 2021-03-24 -> 20230125.0
  • benchmark 1.5.2 -> 1.7.1
  • gflags 2.2.2-1 -> 2.2.2#5
  • nlohmann-json 3.9.1 -> 3.11.2
  • rapidjson 2020-09-14 -> 2022-06-28#3
  • rxcpp 4.1.0-1 -> 4.1.1#1
  • rocksdb 6.14.6 -> 7.9.2
  • fmt 7.1.3#4 -> 9.1.0#1 - PROBLEM with upgrading library with patch
  • spdlog 1.8.5#2 -> 1.11.0 - PROBLEM with upgrading library with patch
  • gtest 1.10.0#4 -> 1.13.0 - PROBLEM with upgrading library with patch
  • grpc 1.37.0#1 -> 1.51.1 - PROBLEM with upgrading library with patch
  • soci[boost,postgresql] - PROBLEM with upgrading library with patch
  • prometheus-cpp 0.12.2 -> 1.1.0 - PROBLEM with upgrading library with patch
  • boost-* - PROBLEM with upgrading library with patch

Linked issue

Closes #{issue_number}

Benefits

Newer packages - it will compile longer, less bugs, more security etc.

Checklist

  • I've read CONTRIBUTING.md
  • I've used the standard signed-off commit format (or will squash just before merging)
  • All applicable CI checks pass (or I promised to make them pass later)
  • (optional) I've written unit tests for the code changes
  • I replied to all comments after code review, marking all implemented changes with thumbs up

More information:

I was using the tutorial (as inspiration): https://stackoverflow.com/questions/72588408/vcpkg-how-to-edit-package-file-when-compilation-fails-when-installing-package

  1. First I've build all packages with VCPKG in newest versions (details: Trying to fix sfinae problems by reverting vcpkg upgrade (Iroha 1) #3852)
  2. Then I used older version of vcpkg (+ packages).
  3. I've created repository in ./vcpkg-build
  4. For each patch I've used the function:
function update_library
{
    # this function should be run in vcpkg-build directory, where sub-repository is initialised 
    # according to: https://stackoverflow.com/questions/72588408/vcpkg-how-to-edit-package-file-when-compilation-fails-when-installing-package
    library_name=$1
    source_directory_name_to_copy_files='vcpkg-build_newest' # remember to set proper name
    echo "Trying to update: $library_name, from version: $(./vcpkg list | grep $library_name)"
    
    rm ports/${library_name}/*
    cp ../${source_directory_name_to_copy_files}/ports/${library_name}/* ports/${library_name}/
    git add ports/${library_name}/
    git status
    git diff --cached > ../vcpkg/patches/upgrade_${library_name}_to_.patch
    git reset --hard
}
# example:
update_library protobuf

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>
Grzegorz Bazior (Yodiss PSA) added 7 commits September 2, 2023 20:42
Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>
Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>
Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>
Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>
Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>
Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>
Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>
@baziorek
Copy link
Contributor Author

baziorek commented Sep 4, 2023

Summary

Some libraries can be updated with patches, but not all of them can be upgraded that way. Rest of libraries needs to be updates by vcpkg upgrade. Unfortunately, just vcpkg upgrade is breaking compilation, so for now IMO it is better to leave like that.

After upgrades of 8 libraries, Iroha 1 still compiles and CI is passing. But I'm not sure if it hasn't broken anything. That is why IMO it is better to make release 1.6.0 without the PR, but the PR can be 1.6.1.

@baziorek baziorek marked this pull request as ready for review September 4, 2023 10:51
@Arjentix
Copy link
Contributor

@baziorek , sorry for such a big delay. Looks like I will be the one who will review your PR as I have C++ experience and have already reviewed your another work.

However, please, keep in mind that I'm Iroha 2 developer and know pretty much nothing about Iroha 1, so don't mind correcting me if I'll be wrong.
Same goes for my C++ skills which I haven't used for more than a year....

@Arjentix Arjentix self-assigned this Sep 28, 2023
@baziorek
Copy link
Contributor Author

@baziorek , sorry for such a big delay. Looks like I will be the one who will review your PR as I have C++ experience and have already reviewed your another work.

However, please, keep in mind that I'm Iroha 2 developer and know pretty much nothing about Iroha 1, so don't mind correcting me if I'll be wrong. Same goes for my C++ skills which I haven't used for more than a year....

Thanks for approving the PR. In the PR there are only libraries upgrades, so if it compiles it will work (as long as libraries do not change their behaviour).

@Arjentix Should I wait for second approve, or it can be merged?

@Arjentix
Copy link
Contributor

@baziorek , you can merge

@baziorek baziorek merged commit a62d7ea into main Sep 30, 2023
25 checks passed
@baziorek baziorek mentioned this pull request Oct 14, 2023
5 tasks
@baziorek baziorek deleted the trying2UpgradeLibrary_iroha1_protobuf branch October 14, 2023 17:43
@baziorek baziorek mentioned this pull request Oct 17, 2023
5 tasks
baziorek pushed a commit that referenced this pull request Oct 17, 2023
…fix MacBuild

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>
baziorek pushed a commit that referenced this pull request Oct 18, 2023
baziorek added a commit to dominious1/iroha that referenced this pull request Jan 26, 2024
* Trying to upgrade protobuf 3.15.8->3.21.12

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>

* Trying to upgrade abseil 2021-03-24->20230125.0

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>

* Trying to upgrade benchmark 1.5.2 -> 1.7.1

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>

* Trying to upgrade gflags 2.2.2-1 -> 2.2.2#5

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>

* Trying to upgrade nlohmann-json 3.9.1 -> 3.11.2

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>

* Trying to upgrade rapidjson 2020-09-14 -> 2022-06-28

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>

* Trying to upgrade rxcpp 4.1.0-1 -> 4.1.1

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>

* Trying to upgrade rocksdb 6.14.6 -> 7.9.2

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>

---------

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>
Co-authored-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>
dominious1 pushed a commit to dominious1/iroha that referenced this pull request Feb 1, 2024
* Trying to upgrade protobuf 3.15.8->3.21.12

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>

* Trying to upgrade abseil 2021-03-24->20230125.0

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>

* Trying to upgrade benchmark 1.5.2 -> 1.7.1

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>

* Trying to upgrade gflags 2.2.2-1 -> 2.2.2#5

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>

* Trying to upgrade nlohmann-json 3.9.1 -> 3.11.2

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>

* Trying to upgrade rapidjson 2020-09-14 -> 2022-06-28

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>

* Trying to upgrade rxcpp 4.1.0-1 -> 4.1.1

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>

* Trying to upgrade rocksdb 6.14.6 -> 7.9.2

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>

---------

Signed-off-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>
Co-authored-by: Grzegorz Bazior (Yodiss PSA) <g.bazior@yodiss.pl>
Signed-off-by: dominious1 <piotr567@proton.me>
@nxsaken nxsaken added the iroha1 The legacy version of Iroha. label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.5 iroha1 The legacy version of Iroha. version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants