Skip to content

Remove autogenerated files#4640

Merged
Lezek123 merged 10 commits intoJoystream:masterfrom
Lezek123:remove-autogenerated-files
Feb 22, 2023
Merged

Remove autogenerated files#4640
Lezek123 merged 10 commits intoJoystream:masterfrom
Lezek123:remove-autogenerated-files

Conversation

@Lezek123
Copy link
Copy Markdown
Contributor

Addresses #4639

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
pioneer-testnet ⬜️ Ignored (Inspect) Feb 22, 2023 at 0:06AM (UTC)

@Lezek123 Lezek123 marked this pull request as draft February 16, 2023 15:28
@Lezek123 Lezek123 marked this pull request as ready for review February 16, 2023 16:46
Copy link
Copy Markdown
Collaborator

@dobertRowneySr dobertRowneySr left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@zeeshanakram3 zeeshanakram3 left a comment

Choose a reason for hiding this comment

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

LGTM

@Lezek123 Lezek123 merged commit 2f3d09f into Joystream:master Feb 22, 2023
@mnaamani
Copy link
Copy Markdown
Member

yarn build:packages now runs the openapi types generation step which requires Java runtime to be installed. We should probbaly add that requirement to README and perhaps update setup.sh to try to install it as well?

$ graphql-codegen
  ✔ Parse configuration
  ✔ Generate outputs
$ yarn generate:types:all && yarn build:client && yarn build:node
$ yarn generate:types:graphql && yarn generate:types:json-schema && yarn generate:types:api
$ yarn graphql-codegen -c ./src/services/queryNode/codegen.yml
$ /Users/mokhtar/joystream/joystream/node_modules/.bin/graphql-codegen -c ./src/services/queryNode/codegen.yml
  ✔ Parse configuration
  ✔ Generate outputs
$ yarn ts-node --transpile-only ./src/services/metadata/generateTypes.ts
$ /Users/mokhtar/joystream/joystream/node_modules/.bin/ts-node --transpile-only ./src/services/metadata/generateTypes.ts
$ yarn openapi-typescript ./src/api-spec/openapi.yaml -o ./src/services/webApi/types/generated.ts -c ../prettierrc.js
$ /Users/mokhtar/joystream/joystream/node_modules/.bin/openapi-typescript ./src/api-spec/openapi.yaml -o ./src/services/webApi/types/generated.ts -c ../prettierrc.js
✨ openapi-typescript 4.5.0
🔭 Loading spec from file:///Users/mokhtar/joystream/joystream/storage-node/src/api-spec/openapi.yaml…
🚀 ./src/api-spec/openapi.yaml -> /Users/mokhtar/joystream/joystream/storage-node/src/services/webApi/types/generated.ts [209ms]
$ tsc --build ./client/tsconfig.json
$ tsc --build tsconfig.json
$ yarn generate:types:all && yarn build:client && yarn build:node
$ yarn generate:types:graphql && yarn generate:types:api && yarn generate:types:json-schema
$ yarn graphql-codegen -c ./src/services/networking/query-node/codegen.yml
$ /Users/mokhtar/joystream/joystream/node_modules/.bin/graphql-codegen -c ./src/services/networking/query-node/codegen.yml
  ✔ Parse configuration
  ✔ Generate outputs
$ yarn generate:types:public-api && yarn generate:types:operator-api
$ yarn openapi-typescript ./src/api-spec/public.yml -o ./src/types/generated/PublicApi.ts -c ../prettierrc.js
$ /Users/mokhtar/joystream/joystream/node_modules/.bin/openapi-typescript ./src/api-spec/public.yml -o ./src/types/generated/PublicApi.ts -c ../prettierrc.js
✨ openapi-typescript 4.5.0
🔭 Loading spec from file:///Users/mokhtar/joystream/joystream/distributor-node/src/api-spec/public.yml…
🚀 ./src/api-spec/public.yml -> /Users/mokhtar/joystream/joystream/distributor-node/src/types/generated/PublicApi.ts [186ms]
$ yarn openapi-typescript ./src/api-spec/operator.yml -o ./src/types/generated/OperatorApi.ts -c ../prettierrc.js
$ /Users/mokhtar/joystream/joystream/node_modules/.bin/openapi-typescript ./src/api-spec/operator.yml -o ./src/types/generated/OperatorApi.ts -c ../prettierrc.js
✨ openapi-typescript 4.5.0
🔭 Loading spec from file:///Users/mokhtar/joystream/joystream/distributor-node/src/api-spec/operator.yml…
🚀 ./src/api-spec/operator.yml -> /Users/mokhtar/joystream/joystream/distributor-node/src/types/generated/OperatorApi.ts [176ms]
$ yarn ts-node --transpile-only ./src/schemas/scripts/generateTypes.ts
$ /Users/mokhtar/joystream/joystream/node_modules/.bin/ts-node --transpile-only ./src/schemas/scripts/generateTypes.ts
$ tsc --build ./client/tsconfig.json
$ tsc --build tsconfig.json
$ yarn generate:all && tsc --noEmit
$ yarn generate:types:graphql
$ graphql-codegen
  ✔ Parse configuration
  ✔ Generate outputs
✨  Done in 398.15s.

Also just noticed yarn.lock has slightly been modified but latest changes not checked in.

diff --git a/yarn.lock b/yarn.lock
index 176e25a3ae..0df3e0d852 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3486,6 +3486,11 @@
   resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d"
   integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==
 
+"@types/events@*":
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
+  integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==
+
 "@types/express-http-proxy@^1.6.2":
   version "1.6.3"
   resolved "https://registry.yarnpkg.com/@types/express-http-proxy/-/express-http-proxy-1.6.3.tgz#35fc0fb32e7741bc50619869de381ef759621fd0"
@@ -4120,6 +4125,14 @@
   dependencies:
     winston "*"
 
+"@types/ws@^5.1.2":
+  version "5.1.2"
+  resolved "https://registry.yarnpkg.com/@types/ws/-/ws-5.1.2.tgz#f02d3b1cd46db7686734f3ce83bdf46c49decd64"
+  integrity sha512-NkTXUKTYdXdnPE2aUUbGOXE1XfMK527SCvU/9bj86kyFF6kZ9ZnOQ3mK5jADn98Y2vEUD/7wKDgZa7Qst2wYOg==
+  dependencies:
+    "@types/events" "*"
+    "@types/node" "*"
+
 "@types/ws@^6.0.3":
   version "6.0.4"
   resolved "https://registry.yarnpkg.com/@types/ws/-/ws-6.0.4.tgz#7797707c8acce8f76d8c34b370d4645b70421ff1"

@mnaamani mnaamani mentioned this pull request Feb 23, 2023
@mnaamani
Copy link
Copy Markdown
Member

yarn.lock issue addressed here #4658

regarding Java, perhaps its just an issue on MacOs?

@Lezek123
Copy link
Copy Markdown
Contributor Author

yarn build:packages now runs the openapi types generation step which requires Java runtime to be installed

I don't think openapi-typescript requires Java.
Only openapi-generator-cli does, but it's not ran during the build (it's just for generating the storage / distributor client package, which is still checked-out to the repo).

I checked this using node:14 docker image, which doesn't have java:

leszek@leszek-Z590-D:~/projects/joystream/joystream-ws-4$ docker run -it node:14 /bin/bash
root@adaab1272d5c:/# java -v
bash: java: command not found

But it still builds storage and distributor nodes successfully.

Also we have CI checks running on both Mac and Ubuntu where yarn build:packages is executed and they were all successful too.

@mnaamani
Copy link
Copy Markdown
Member

Only openapi-generator-cli does

ok it must have been when I ran yarn generate:all in that case that it ran openapi-generator-cli

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.

4 participants