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

build: migrate to Yarn v3 #2212

Conversation

zondervancalvez
Copy link
Contributor

@zondervancalvez zondervancalvez commented Nov 22, 2022

Signed-off-by: zondervancalvez zondervan.v.calvez@accenture.com
Fixes #1142

@zondervancalvez zondervancalvez force-pushed the zondervancalvez/issue1142 branch from a442cc9 to 7f3cf03 Compare November 23, 2022 08:03
@zondervancalvez zondervancalvez force-pushed the zondervancalvez/issue1142 branch from 7f3cf03 to 2130e27 Compare June 7, 2023 09:25
@zondervancalvez zondervancalvez force-pushed the zondervancalvez/issue1142 branch from 2130e27 to e506dcf Compare June 29, 2023 13:31
@zondervancalvez zondervancalvez marked this pull request as ready for review June 29, 2023 13:32
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@zondervancalvez The build is broken (build-dev CI job)

@zondervancalvez zondervancalvez force-pushed the zondervancalvez/issue1142 branch from e506dcf to 8c924bf Compare June 30, 2023 03:47
@zondervancalvez zondervancalvez requested a review from petermetz July 3, 2023 06:04
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@zondervancalvez Thank you!
I added a few comments/questions and change requests, please see above!

@@ -43,14 +43,14 @@
"dist/*"
],
"scripts": {
"codegen": "run-p 'codegen:*'",
"codegen": "yarn run codegen:openapi && yarn run codegen:proto",
Copy link
Contributor

Choose a reason for hiding this comment

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

@zondervancalvez Could you please explain why was this specific change necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After few tests, we revert this to original and added minor changes.

"codegen": "run-p 'codegen:*'",
"codegen:openapi": "run-p generate-sdk",
"generate-sdk": "run-p generate-sdk:*",
"codegen": "yarn run codegen:openapi",
Copy link
Contributor

Choose a reason for hiding this comment

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

@zondervancalvez Same question here as in my other comment. Why run only a specific script instead of the pattern?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After few tests, we revert this to original and added minor changes. We added single quote to generate-sdk:*

tools/ci.sh Outdated
@@ -116,6 +116,7 @@ function mainTask()
if [ "${DEV_BUILD_DISABLED:-false}" = "true" ]; then
echo "$(date +%FT%T%z) [CI] Dev build disabled. Skipping..."
else
yarn install
Copy link
Contributor

Choose a reason for hiding this comment

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

@zondervancalvez The configure script already runs yarn install, must we run it twice, e.g. during and right before the configure script as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We updated the yarn run configure script so that it will run first the yarn install command.

BUILD.md Outdated
@@ -135,6 +133,12 @@ cd cactus
npm run enable-corepack
```

* Run this command to migrate lockfile (Also, run this everytime you have changes before running `yarn run cofugure`)
Copy link
Contributor

Choose a reason for hiding this comment

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

@zondervancalvez I'm guessing that's a typo in the script name, please fix!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After some changes and re-testing, we already removed this.

Copy link
Contributor

Choose a reason for hiding this comment

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

@zondervancalvez It is still in the diff.

BUILD.md Outdated
@@ -135,6 +133,12 @@ cd cactus
npm run enable-corepack
```

* Run this command to migrate lockfile (Also, run this everytime you have changes before running `yarn run cofugure`)
Copy link
Contributor

Choose a reason for hiding this comment

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

@zondervancalvez Please go into a little more detail about the lockfile migration: explain that it is needed when someone was using yarn v1 but once it was migrated then there is no need. Also explain in a few words how to recognize which version it is (the lockfile has a version declaration in it somewhere IIRC)

Also, run this everytime you have changes before running yarn run cofugure

Is this true though? If I change some .ts code and then want to run the configure script, what difference does the extra yarn install will make in that case in general if I already migrated my lockfile earlier?

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@zondervancalvez A couple more asks:

  1. Please write a legible commit message body explaining in detail the what/why/how/etc. of the changes.
  2. Rebase onto upstream/main and fix the merge conflicts

@zondervancalvez zondervancalvez force-pushed the zondervancalvez/issue1142 branch 7 times, most recently from 387a49f to 4348716 Compare July 11, 2023 07:48
Fixes hyperledger-cacti#1142

Signed-off-by: zondervancalvez <zondervan.v.calvez@accenture.com>
@zondervancalvez zondervancalvez force-pushed the zondervancalvez/issue1142 branch from 4348716 to 71671ca Compare July 11, 2023 07:53
@petermetz petermetz closed this Jul 24, 2023
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.

build(yarn): migrate from v1.2.17 to v3.6.0
2 participants