denoland / deno_ast

Source text parsing, lexing, and AST related functionality for Deno
https://crates.io/crates/deno_ast
MIT License
155 stars 46 forks source link

Develop script to update all repos locally and run tests #28

Closed dsherret closed 3 years ago

dsherret commented 3 years ago

It is very painful to find an swc regression in the CLI after releasing all the crates. It would be good to mitigate this occurrence and automate crate updating. This would be a deno script similar to the release scripts.

Here's my current thoughts...

Assumptions

Phase 1 - Setup

  1. Ensure all repos are on main or switch to it if no local changes. Error if there are local changes.
  2. Update the local main to the latest upstream remote main.
  3. Bump swc versions to the latest version in both dprint-swc-ecma-ast-view and deno_ast.
  4. Update all repos to refer to local versions of each other.

Phase 2 - Cargo Build

  1. Run cargo build in each repo.

At this point, any breaking changes between repos can be resolved.

Phase 3 - Testing

  1. Prompt to run cargo test in each repo (based on dependency tree) until a confirmation is given.
  2. Once a confirmation is given run cargo test in the remainding repos.

At this point, any testing issues can be manually resolved.

Phase 4 - Accepting Changes—Open PRs

  1. A prompt will be given asking to bump each repo's major, minor, or patch.
  2. Reverts all the local path changes.
  3. Updates all the versions in every repo, creates a branch, commits, and pushes a branch for every repo.

At this point, the developer would have to manually open PRs for each branch one after the other based on dependency order, which is still somewhat painful, but not as bad.