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

Adapt build_and_upload_schemas CI job to new schema format #795

Closed
webmaster128 opened this issue Sep 5, 2022 · 4 comments · Fixed by #798
Closed

Adapt build_and_upload_schemas CI job to new schema format #795

webmaster128 opened this issue Sep 5, 2022 · 4 comments · Fixed by #798
Assignees
Milestone

Comments

@webmaster128
Copy link
Member

webmaster128 commented Sep 5, 2022

With the changes in 1.1.0, the full API is in one file. We can show this by getting rid of all the .tar.gz logic in the CI config:

      - run:
          name: Build and run schema generator for packages
          command: |
            for S in ./packages/*/examples/schema.rs
            do
              P=$(dirname $S)/..
              echo "Generating schema for $P ..."
              (cd $P && cargo schema --locked && tar -zcf ~/project/schemas/$(basename $(pwd))_schema.tar.gz ./schema)
            done
      - run:
          name: Build and run schema generator for contracts
          command: |
            for C in ./contracts/*/
            do
              echo "Generating schema for $C ..."
              (cd $C && cargo schema --locked && tar -zcf ~/project/schemas/$(basename $(pwd))_schema.tar.gz ./schema)
            done

Uploading a single .json per contract would be much nicer.

@webmaster128 webmaster128 added this to the 0.15.0 milestone Sep 13, 2022
@ethanfrey
Copy link
Member

Uploading a single .json per contract would be much nicer.

Yes, excited for one wasm and one json per contract.

@uint
Copy link
Contributor

uint commented Sep 13, 2022

We cannot do this with packages since they don't have InstantiateMsgs. The new schema solution I intended for full contracts, not packages. Do we need to consider packages as well?

Or maybe we just want to stop generating schemas for packages? All those types will appear in the schema generated by end contracts anyway.

@uint
Copy link
Contributor

uint commented Sep 13, 2022

I'll also note I doubt something like ts-codegen can do anything useful with an arbitrary package.

@webmaster128
Copy link
Member Author

We cannot do this with packages since they don't have InstantiateMsgs. The new schema solution I intended for full contracts, not packages. Do we need to consider packages as well?

Good point. Then let's keep packages unchanged. For them the more primitive schema per type is probably still nice to have a look during development.

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 a pull request may close this issue.

3 participants