Skip to content

CLI - separate build codegen actions#1385

Merged
dOrgJelli merged 38 commits intoorigin-devfrom
pileks/feat/cli-separate-build-codegen-actions
Jan 3, 2023
Merged

CLI - separate build codegen actions#1385
dOrgJelli merged 38 commits intoorigin-devfrom
pileks/feat/cli-separate-build-codegen-actions

Conversation

@pileks
Copy link
Copy Markdown
Contributor

@pileks pileks commented Nov 3, 2022

Closes #1365 and allows for further work on #1363 and others (namely Plugin Build Strategies, TBD).

CLI test cases will be fixed once #1384 is merged! Merged.

This PR entirely separates the build and codegen command functionalities.

Running polywrap codegen on a plugin project will no longer emit wrap.info into the ./build folder.

This PR also introduces a possible circular dependency issue, as some of our plugin projects will stop working once the newest CLI version is released.
A possible workaround for this is to have the build script of each project run polywrap codegen and continue with the build regardless of the result of the codegen, then removing it once we have the next release up.
Thoughts?

Remaining work/merge prerequisites:

  • Merge CLI Build - clean up yarn.lock files in test cases after testing local build strategy #1384
  • See what to do in regards to the circular dependency issue described above.
    • I have decided to solve this by adding a build:patch script to all plugin packages which attempts to run polywrap build in order to output the WRAP ABI. If it fails, a message is echoed and the script exits with code 0, making the build work for the current version polywrap in dependencies and for the new, unreleased version. This way we won't have an interruption in the build process, and can later on write out the proper codegen/build logic (which is first codegen then build AND make sure that both exit succesfully).

@pileks pileks marked this pull request as ready for review November 4, 2022 14:37
@pileks pileks changed the title Pileks/feat/cli separate build codegen actions CLI - separate build codegen actions Nov 9, 2022
@dOrgJelli dOrgJelli changed the base branch from origin-0.10-dev to origin-dev November 15, 2022 19:29
Copy link
Copy Markdown
Contributor

@krisbitney krisbitney left a comment

Choose a reason for hiding this comment

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

LGTM!

I left a couple of comments with questions. Let me know what you think. Maybe no changes are needed.

Comment thread packages/cli/src/commands/build.ts
Comment thread packages/cli/src/commands/build.ts
krisbitney
krisbitney previously approved these changes Dec 20, 2022
@krisbitney
Copy link
Copy Markdown
Contributor

krisbitney commented Dec 30, 2022

Can this be merged @pileks @dOrgJelli @Niraj-Kamdar ?

@pileks
Copy link
Copy Markdown
Contributor Author

pileks commented Jan 2, 2023

@krisbitney From a standpoint of implementation - Yes, it's just a matter of being reviewed! 😄

krisbitney
krisbitney previously approved these changes Jan 3, 2023
Comment thread packages/cli/lang/en.json Outdated
Comment thread packages/cli/src/commands/build.ts Outdated
Copy link
Copy Markdown
Contributor

@dOrgJelli dOrgJelli left a comment

Choose a reason for hiding this comment

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

Also @pileks we should update the CLI's README.

@pileks
Copy link
Copy Markdown
Contributor Author

pileks commented Jan 3, 2023

@dOrgJelli I've performed the minimal required changes to the readme just now.

We can refactor the readme to use doc-snippets in a later PR - for now this should be it.

LMK if this works.

@dOrgJelli dOrgJelli merged commit 2f90216 into origin-dev Jan 3, 2023
@dOrgJelli dOrgJelli deleted the pileks/feat/cli-separate-build-codegen-actions branch April 10, 2023 17:05
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.

CLI - Separate build and codegen command actions

4 participants