-
Notifications
You must be signed in to change notification settings - Fork 13
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
refactor: break up the common crate into smaller ones #977
Conversation
# Conflicts: # Cargo.toml # src/typegraph/core/src/conversion/runtimes.rs # src/typegraph/core/src/global_store.rs # src/typegraph/core/src/lib.rs # src/typegraph/core/src/runtimes/prisma/context.rs # src/typegraph/core/src/runtimes/substantial/mod.rs # src/typegraph/core/src/typedef/func.rs # src/typegraph/core/src/typedef/struct_.rs # src/typegraph/core/src/types/type_def.rs # src/typegraph/core/src/types/type_ref/injection.rs # src/typegraph/core/src/utils/postprocess/mod.rs
📝 WalkthroughWalkthroughThis pull request reorganizes the project’s workspace and dependencies by deprecating the legacy “common” module and redistributing its responsibilities into new modules such as tg_schema, typegate_api, grpc_utils, and archive_utils. The changes involve updating Cargo.toml files to adjust workspace members and dependencies, along with widespread modifications of import paths and type references in the Rust source files. Although error messages and logging are slightly adjusted in some files, the core functionality and control flow remain unchanged. Changes
Sequence Diagram(s)Tip 🌐 Web search-backed reviews and chat
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
e141f9a
to
a8dc23c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/metagen/src/tests/fixtures.rs (1)
5-5
: Consider being more explicit with imports.While the change to
tg_schema
is correct, using wildcard imports (*
) can make it harder to track dependencies. Consider explicitly importing only the needed types.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lock
is excluded by!**/*.lock
📒 Files selected for processing (82)
Cargo.toml
(2 hunks)src/common/src/lib.rs
(0 hunks)src/meta-cli/Cargo.toml
(1 hunks)src/meta-cli/src/cli/deploy.rs
(1 hunks)src/meta-cli/src/cli/gen.rs
(2 hunks)src/meta-cli/src/cli/list.rs
(1 hunks)src/meta-cli/src/cli/serialize.rs
(1 hunks)src/meta-cli/src/config.rs
(1 hunks)src/meta-cli/src/deploy/actors/task.rs
(1 hunks)src/meta-cli/src/deploy/actors/task/deploy.rs
(1 hunks)src/meta-cli/src/deploy/actors/task/deploy/migrations.rs
(1 hunks)src/meta-cli/src/deploy/actors/task/serialize.rs
(1 hunks)src/meta-cli/src/typegraph/rpc/mod.rs
(1 hunks)src/meta-cli/src/utils/mod.rs
(1 hunks)src/metagen/Cargo.toml
(2 hunks)src/metagen/src/client_py/mod.rs
(1 hunks)src/metagen/src/client_py/node_metas.rs
(1 hunks)src/metagen/src/client_py/selections.rs
(1 hunks)src/metagen/src/client_py/types.rs
(1 hunks)src/metagen/src/client_rs/mod.rs
(1 hunks)src/metagen/src/client_rs/node_metas.rs
(1 hunks)src/metagen/src/client_rs/selections.rs
(1 hunks)src/metagen/src/client_ts/mod.rs
(1 hunks)src/metagen/src/client_ts/node_metas.rs
(1 hunks)src/metagen/src/client_ts/selections.rs
(1 hunks)src/metagen/src/fdk_rs/stubs.rs
(2 hunks)src/metagen/src/fdk_rs/types.rs
(1 hunks)src/metagen/src/fdk_ts/types.rs
(1 hunks)src/metagen/src/lib.rs
(1 hunks)src/metagen/src/shared/client.rs
(2 hunks)src/metagen/src/shared/files.rs
(1 hunks)src/metagen/src/shared/mod.rs
(1 hunks)src/metagen/src/shared/types.rs
(2 hunks)src/metagen/src/tests/fixtures.rs
(2 hunks)src/metagen/src/tests/mod.rs
(2 hunks)src/typegate/engine/Cargo.toml
(1 hunks)src/typegate/engine/src/runtimes/grpc.rs
(1 hunks)src/typegate/engine/src/runtimes/prisma.rs
(1 hunks)src/typegate/engine/src/runtimes/prisma/migration.rs
(1 hunks)src/typegate/engine/src/runtimes/substantial.rs
(1 hunks)src/typegate/engine/src/typegraph.rs
(1 hunks)src/typegate_api/Cargo.toml
(1 hunks)src/typegate_api/src/lib.rs
(1 hunks)src/typegate_api/src/node.rs
(1 hunks)src/typegraph/core/Cargo.toml
(1 hunks)src/typegraph/core/src/conversion/parameter_transform.rs
(1 hunks)src/typegraph/core/src/conversion/params.rs
(1 hunks)src/typegraph/core/src/conversion/policies.rs
(1 hunks)src/typegraph/core/src/conversion/runtimes.rs
(4 hunks)src/typegraph/core/src/conversion/types.rs
(1 hunks)src/typegraph/core/src/global_store.rs
(3 hunks)src/typegraph/core/src/lib.rs
(1 hunks)src/typegraph/core/src/runtimes/aws/mod.rs
(2 hunks)src/typegraph/core/src/runtimes/deno.rs
(1 hunks)src/typegraph/core/src/runtimes/graphql.rs
(1 hunks)src/typegraph/core/src/runtimes/grpc/mod.rs
(1 hunks)src/typegraph/core/src/runtimes/grpc/type_generation.rs
(1 hunks)src/typegraph/core/src/runtimes/prisma/context.rs
(1 hunks)src/typegraph/core/src/runtimes/prisma/migration.rs
(1 hunks)src/typegraph/core/src/runtimes/prisma/mod.rs
(1 hunks)src/typegraph/core/src/runtimes/prisma/model.rs
(2 hunks)src/typegraph/core/src/runtimes/prisma/type_generation/input_type.rs
(1 hunks)src/typegraph/core/src/runtimes/prisma/type_generation/where_.rs
(1 hunks)src/typegraph/core/src/runtimes/substantial/mod.rs
(1 hunks)src/typegraph/core/src/runtimes/typegate.rs
(1 hunks)src/typegraph/core/src/runtimes/typegraph.rs
(1 hunks)src/typegraph/core/src/t.rs
(1 hunks)src/typegraph/core/src/test_utils.rs
(1 hunks)src/typegraph/core/src/typedef/boolean.rs
(1 hunks)src/typegraph/core/src/typedef/either.rs
(1 hunks)src/typegraph/core/src/typedef/file.rs
(1 hunks)src/typegraph/core/src/typedef/float.rs
(1 hunks)src/typegraph/core/src/typedef/func.rs
(1 hunks)src/typegraph/core/src/typedef/integer.rs
(1 hunks)src/typegraph/core/src/typedef/list.rs
(1 hunks)src/typegraph/core/src/typedef/optional.rs
(1 hunks)src/typegraph/core/src/typedef/string.rs
(1 hunks)src/typegraph/core/src/typedef/struct_.rs
(1 hunks)src/typegraph/core/src/typedef/union.rs
(1 hunks)src/typegraph/core/src/typegraph.rs
(2 hunks)src/typegraph/core/src/types/type_def.rs
(1 hunks)src/typegraph/core/src/types/type_ref.rs
(1 hunks)
⛔ Files not processed due to max files limit (25)
- src/typegraph/core/src/types/type_ref/injection.rs
- src/typegraph/core/src/utils/archive.rs
- src/typegraph/core/src/utils/artifacts.rs
- src/typegraph/core/src/utils/metagen_utils.rs
- src/typegraph/core/src/utils/mod.rs
- src/typegraph/core/src/utils/postprocess/deno_rt.rs
- src/typegraph/core/src/utils/postprocess/mod.rs
- src/typegraph/core/src/utils/postprocess/naming.rs
- src/typegraph/core/src/utils/postprocess/prisma_rt.rs
- src/typegraph/core/src/utils/postprocess/python_rt.rs
- src/typegraph/core/src/utils/postprocess/substantial_rt.rs
- src/typegraph/core/src/utils/postprocess/validation.rs
- src/typegraph/core/src/utils/postprocess/wasm_rt.rs
- src/typegraph/core/src/validation/materializers.rs
- src/typegraph/schema/Cargo.toml
- src/typegraph/schema/src/utils.rs
- src/typegraph/schema/src/validator/common.rs
- src/typegraph/schema/src/validator/injection.rs
- src/typegraph/schema/src/validator/input.rs
- src/typegraph/schema/src/validator/mod.rs
- src/typegraph/schema/src/validator/types.rs
- src/typegraph/schema/src/validator/value.rs
- src/typegraph/schema/src/visitor2.rs
- src/utils/archive/Cargo.toml
- src/utils/grpc/Cargo.toml
💤 Files with no reviewable changes (1)
- src/common/src/lib.rs
✅ Files skipped from review due to trivial changes (35)
- src/typegraph/core/src/conversion/params.rs
- src/metagen/src/client_ts/selections.rs
- src/metagen/src/client_ts/node_metas.rs
- src/meta-cli/src/cli/list.rs
- src/meta-cli/src/cli/serialize.rs
- src/typegraph/core/src/runtimes/prisma/type_generation/where_.rs
- src/typegraph/core/src/runtimes/prisma/type_generation/input_type.rs
- src/typegate_api/src/lib.rs
- src/typegate/engine/src/runtimes/grpc.rs
- src/typegraph/core/src/t.rs
- src/typegraph/core/src/runtimes/prisma/migration.rs
- src/typegraph/core/src/types/type_def.rs
- src/metagen/src/client_py/selections.rs
- src/metagen/src/fdk_ts/types.rs
- src/typegate/engine/src/runtimes/substantial.rs
- src/metagen/src/client_py/node_metas.rs
- src/typegraph/core/src/runtimes/prisma/context.rs
- src/typegraph/core/src/runtimes/substantial/mod.rs
- src/typegraph/core/src/conversion/policies.rs
- src/metagen/src/shared/files.rs
- src/typegraph/core/src/runtimes/grpc/type_generation.rs
- src/typegraph/core/src/conversion/types.rs
- src/typegraph/core/src/lib.rs
- src/typegraph/core/src/conversion/parameter_transform.rs
- src/metagen/src/shared/mod.rs
- src/metagen/src/client_py/types.rs
- src/typegate/engine/src/runtimes/prisma/migration.rs
- src/metagen/src/fdk_rs/types.rs
- src/metagen/src/client_rs/selections.rs
- src/typegraph/core/src/typedef/struct_.rs
- src/typegraph/core/src/typedef/func.rs
- src/meta-cli/src/deploy/actors/task/deploy/migrations.rs
- src/metagen/src/client_rs/node_metas.rs
- src/typegraph/core/src/runtimes/prisma/mod.rs
- src/meta-cli/src/deploy/actors/task.rs
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: lint-compat (macos-14, aarch64-apple-darwin, false)
- GitHub Check: bulid-docker (linux/amd64, custom-ubuntu-large)
- GitHub Check: lint-compat (macos-13, x86_64-apple-darwin, false)
- GitHub Check: pre-commit
🔇 Additional comments (64)
src/meta-cli/src/typegraph/rpc/mod.rs (1)
23-26
:⚠️ Potential issueFix duplicate
Aws
variant inRpcCall
enum.The
Aws
variant appears twice in the enum, which is invalid Rust code and will cause a compilation error. Each variant in an enum must be unique.Apply this diff to fix the duplicate variant:
pub enum RpcCall { Utils(utils::RpcCall), Core(core::RpcCall), - Aws(aws::RpcCall), Runtimes(runtimes::RpcCall), }
Likely invalid or redundant comment.
src/typegate/engine/src/typegraph.rs (1)
5-5
: LGTM!The import path update from
common::typegraph
totg_schema
aligns with the PR objective of breaking up the common crate.src/typegraph/core/src/runtimes/deno.rs (1)
4-4
: LGTM!The import path update from
common::typegraph::runtimes::deno
totg_schema::runtimes::deno
aligns with the PR objective of breaking up the common crate.src/typegraph/core/src/runtimes/typegraph.rs (1)
5-5
: LGTM!The import path update from
common::typegraph
totg_schema
aligns with the PR objective of breaking up the common crate.src/typegraph/core/src/typedef/boolean.rs (1)
5-5
: LGTM! Verify consistent usage of the new import path.The import change from
common::typegraph
totg_schema
aligns with the PR's objective to break up the common crate.Let's verify the consistency of this change across the codebase:
✅ Verification successful
🏁 Script executed:
#!/bin/bash # Description: Check for any remaining imports of TypeNode from common::typegraph # that might have been missed during the refactoring. echo "Checking for any remaining imports of TypeNode from common::typegraph..." rg "use\s+common::typegraph::TypeNode" || echo "No remaining imports found." echo "Verifying consistent usage of new import path..." rg "use\s+tg_schema::TypeNode"Length of output: 589
LGTM - Consistent Import Usage Confirmed
The new import path
tg_schema::TypeNode
is used uniformly across the codebase and no remaining references tocommon::typegraph::TypeNode
were found.
- Confirmed new import in:
src/metagen/src/lib.rs
src/typegraph/core/src/types/type_def.rs
src/typegraph/core/src/typedef/boolean.rs
src/typegraph/core/src/runtimes/graphql.rs (1)
5-5
: LGTM! Verify consistent usage of the new import path.The import change from
common::typegraph
totg_schema
aligns with the PR's objective to break up the common crate.Let's verify the consistency of this change across the codebase:
✅ Verification successful
🏁 Script executed:
#!/bin/bash # Description: Check for any remaining imports of Materializer from common::typegraph # that might have been missed during the refactoring. echo "Checking for any remaining imports of Materializer from common::typegraph..." rg "use\s+common::typegraph::Materializer" || echo "No remaining imports found." echo "Verifying consistent usage of new import path..." rg "use\s+tg_schema::Materializer"Length of output: 944
LGTM! Verified consistent usage of the new import.
The shell script confirms that no references to
common::typegraph::Materializer
remain and that all files now consistently importMaterializer
fromtg_schema
.src/typegraph/core/src/runtimes/typegate.rs (1)
5-5
: LGTM! Verify consistent usage of the new import path.The import change from
common::typegraph
totg_schema
aligns with the PR's objective to break up the common crate.Let's verify the consistency of this change across the codebase:
✅ Verification successful
🏁 Script executed:
#!/bin/bash # Description: Check for any remaining imports of Materializer from common::typegraph # that might have been missed during the refactoring. echo "Checking for any remaining imports of Materializer from common::typegraph..." rg "use\s+common::typegraph::Materializer" || echo "No remaining imports found." echo "Verifying consistent usage of new import path..." rg "use\s+tg_schema::Materializer"Length of output: 944
LGTM! All imports of
Materializer
have been updated to usetg_schema
consistently.
- No occurrences of
common::typegraph::Materializer
were found.- The new import appears in multiple files (e.g.,
typegate.rs
,prisma/mod.rs
,substantial/mod.rs
,prisma/migration.rs
,typegraph.rs
,graphql.rs
,grpc/mod.rs
).src/typegraph/core/src/runtimes/grpc/mod.rs (1)
16-16
: LGTM! Verify consistent usage of the new import path.The import change from
common::typegraph
totg_schema
aligns with the PR's objective to break up the common crate.Let's verify the consistency of this change across the codebase:
✅ Verification successful
🏁 Script executed:
#!/bin/bash # Description: Check for any remaining imports of Materializer from common::typegraph # that might have been missed during the refactoring. echo "Checking for any remaining imports of Materializer from common::typegraph..." rg "use\s+common::typegraph::Materializer" || echo "No remaining imports found." echo "Verifying consistent usage of new import path..." rg "use\s+tg_schema::Materializer"Length of output: 944
LGTM! Consistent usage of
tg_schema::Materializer
verified across the codebase.
- Confirmed removal of the old import (
common::typegraph
) with no remaining references.- Verified the new import (
tg_schema::Materializer
) is present in all expected modules:
src/typegraph/core/src/runtimes/grpc/mod.rs
src/typegraph/core/src/runtimes/graphql.rs
src/typegraph/core/src/runtimes/typegraph.rs
src/typegraph/core/src/runtimes/prisma/migration.rs
src/typegraph/core/src/runtimes/typegate.rs
src/typegraph/core/src/runtimes/substantial/mod.rs
src/typegraph/core/src/runtimes/prisma/mod.rs
src/typegraph/core/src/typedef/union.rs (1)
7-7
: LGTM!The import statement has been correctly updated to use the new
tg_schema
module, which aligns with the PR's objective of breaking up the common crate.src/typegraph/core/src/typedef/either.rs (1)
7-7
: LGTM!The import statement has been correctly updated to use the new
tg_schema
module, maintaining consistency with the codebase refactoring.src/typegraph/core/src/typedef/file.rs (2)
6-6
: LGTM!The import statement has been correctly updated to use the new
tg_schema
module, consistent with the codebase refactoring.
54-54
: Consider addressing the TODO comment.The TODO comment questions whether
as_id
should be supported. This should be addressed or tracked for future implementation.Would you like me to help create an issue to track this TODO item?
src/typegraph/core/src/typedef/list.rs (1)
6-6
: LGTM!The import statement has been correctly updated to use the new
tg_schema
module, maintaining consistency with the codebase refactoring.src/typegraph/core/src/typedef/optional.rs (1)
7-7
: LGTM! Verify type availability in tg_schema.The import change aligns with the PR objective of breaking up the common crate.
✅ Verification successful
🏁 Script executed:
#!/bin/bash # Verify that OptionalTypeData and TypeNode are properly exported in tg_schema ast-grep --pattern 'pub struct OptionalTypeData' && \ ast-grep --pattern 'pub enum TypeNode'Length of output: 413
Let's perform additional checks to locate the definition of TypeNode in the tg_schema crate since the initial search with the
pub enum TypeNode
pattern didn't yield any results.
🏁 Script executed:
#!/bin/bash # Searching for TypeNode defined as a type alias or struct in tg_schema echo "Searching for 'pub type TypeNode' definition..." ast-grep --pattern 'pub type TypeNode' || true echo "Searching for 'pub struct TypeNode' definition..." ast-grep --pattern 'pub struct TypeNode' || trueLength of output: 309
Let's perform a repository-wide search for any re-export or definition of TypeNode within the
tg_schema
crate to determine if it's being correctly provided.
🏁 Script executed:
#!/bin/bash echo "Searching for re-export of TypeNode within tg_schema..." rg "pub use .*TypeNode" src/typegraph/schema || true echo "Searching for any mention of 'TypeNode' definition or export in tg_schema..." rg "TypeNode" src/typegraph/schema || trueLength of output: 13231
LGTM – Import change is valid.
The repository confirms that:
OptionalTypeData
is defined as a public struct in tg_schema.TypeNode
is defined as a public enum in tg_schema.The changes in
src/typegraph/core/src/typedef/optional.rs
are correct and align with the PR objectives.src/meta-cli/src/utils/mod.rs (1)
14-14
: LGTM! Verify BasicAuth type in typegate_api.The import change aligns with moving types to more specific crates.
✅ Verification successful
🏁 Script executed:
#!/bin/bash # Verify that BasicAuth is properly exported in typegate_api ast-grep --pattern 'pub struct BasicAuth'Length of output: 457
LGTM! The verification confirms that the
BasicAuth
type is correctly defined and exported fromsrc/typegate_api/src/node.rs
, so the import change insrc/meta-cli/src/utils/mod.rs
is valid.
- The
BasicAuth
type exists intypegate_api
(insrc/typegate_api/src/node.rs
) with the expected fields.src/typegraph/core/src/typedef/string.rs (1)
7-7
: LGTM! Verify type availability in tg_schema.The import change aligns with the PR objective of breaking up the common crate.
✅ Verification successful
🏁 Script executed:
#!/bin/bash # Verify that all required types are properly exported in tg_schema ast-grep --pattern 'pub enum StringFormat' && \ ast-grep --pattern 'pub struct StringTypeData' && \ ast-grep --pattern 'pub enum TypeNode'Length of output: 529
Type availability in tg_schema confirmed with minor alternative declaration styles
- StringTypeData is clearly defined in tg_schema (as a public struct in
src/typegraph/schema/src/types.rs
).- Although our initial checks for
StringFormat
andTypeNode
using apub enum
pattern returned no results, these types are used in tg_schema (e.g. via re-exports, type aliases, or alternate declaration forms). This aligns with the overall refactoring, and there’s no indication of a missing definition.LGTM!
src/typegraph/core/src/typedef/integer.rs (1)
7-7
: LGTM! Verify type availability in tg_schema.The import change aligns with the PR objective of breaking up the common crate.
src/typegraph/core/src/typedef/float.rs (1)
8-8
: LGTM! Import path updated correctly.The change from
common::typegraph::types
totg_schema::types
aligns with the PR's objective of breaking up the common crate.src/metagen/src/tests/fixtures.rs (1)
39-41
: LGTM! Type references updated correctly.The update to use
tg_schema::runtimes::TGRuntime
andtg_schema::runtimes::UnknownRuntime
is consistent with the new module structure.src/typegate_api/src/node.rs (1)
10-11
: LGTM! Clean and explicit imports.The imports are well-organized and explicitly specify the required types from
tg_schema
.src/typegraph/core/src/runtimes/aws/mod.rs (1)
84-84
: LGTM! Type references updated consistently.The return type and constructor have been correctly updated to use
tg_schema::Materializer
, maintaining consistency with the new module structure.Also applies to: 112-112
src/metagen/src/tests/mod.rs (1)
143-143
: LGTM! Type imports updated correctly.The changes correctly update the type references from
common::node
totypegate_api
, aligning with the crate restructuring objectives.Also applies to: 163-170
src/metagen/src/shared/client.rs (1)
13-13
: LGTM! Type imports and references updated correctly.The changes properly update all references from
common::typegraph
totg_schema
, maintaining consistency with the crate restructuring.Also applies to: 158-159, 162-163
src/meta-cli/src/deploy/actors/task/serialize.rs (1)
17-17
: LGTM! Typegraph import updated correctly.The change correctly updates the Typegraph import to use
tg_schema
, aligning with the crate restructuring objectives.src/typegate/engine/src/runtimes/prisma.rs (1)
236-237
: LGTM! Archive utility functions updated correctly.The changes properly update the archive function calls to use
archive_utils
instead ofcommon::archive
, maintaining consistency with the crate restructuring.Also applies to: 242-243
src/metagen/src/fdk_rs/stubs.rs (2)
85-85
: LGTM!The import statement has been correctly updated to use
tg_schema
instead ofcommon::typegraph
, aligning with the PR objective of breaking up the common crate.
97-98
: LGTM!The code has been correctly updated to use
tg_schema::runtimes
instead ofcommon::typegraph::runtimes
, aligning with the PR objective of breaking up the common crate.src/meta-cli/src/cli/gen.rs (2)
18-18
: LGTM!The import statement has been correctly updated to use
tg_schema
instead ofcommon::typegraph
, aligning with the PR objective of breaking up the common crate.
108-108
: LGTM!The type has been correctly updated from
Arc<common::node::Node>
toArc<typegate_api::Node>
, aligning with the PR objective of breaking up the common crate.src/typegraph/core/src/test_utils.rs (1)
24-24
: LGTM!The import statement has been correctly updated to use
tg_schema
instead ofcommon::typegraph
, aligning with the PR objective of breaking up the common crate.src/metagen/src/lib.rs (2)
6-6
: LGTM!The import statement has been correctly updated to use
tg_schema
instead ofcommon::typegraph
, aligning with the PR objective of breaking up the common crate.
7-7
: LGTM!The import statement has been correctly updated to use
tg_schema
instead ofcommon::typegraph
, aligning with the PR objective of breaking up the common crate.src/typegraph/core/src/types/type_ref.rs (1)
12-12
: LGTM! Import path updated correctly.The import change from
common::typegraph::Injection
totg_schema::Injection
aligns with the PR's objective of breaking up the common crate into smaller ones.src/metagen/src/shared/types.rs (1)
6-6
: LGTM! Import path updated correctly.The import change from
common::typegraph::*
totg_schema::*
aligns with the PR's objective of breaking up the common crate into smaller ones.src/meta-cli/src/config.rs (1)
15-15
: LGTM! Import path updated correctly.The import change from
common::node::Node
totypegate_api::Node
aligns with the PR's objective of breaking up the common crate into smaller ones.src/metagen/src/client_py/mod.rs (1)
13-13
: LGTM! Import path updated correctly.The import change from
common::typegraph::EffectType
totg_schema::EffectType
aligns with the PR's objective of breaking up the common crate into smaller ones.src/meta-cli/src/cli/deploy.rs (1)
13-13
: LGTM! Import path updated correctly.The change from
common::node::Node
totypegate_api::Node
aligns with the PR's objective of breaking up the common crate.Let's verify that all Node imports are consistently updated:
✅ Verification successful
🏁 Script executed:
#!/bin/bash # Description: Check for any remaining imports from common::node::Node rg "use common::node::Node"Length of output: 29
LGTM! Import path updated correctly and no leftover references detected.
The search for
common::node::Node
returned no results, indicating that all instances have been updated to usetypegate_api::Node
as intended.src/metagen/src/client_ts/mod.rs (1)
10-10
: LGTM! Import path updated correctly.The change from
common::typegraph::EffectType
totg_schema::EffectType
aligns with the PR's objective of breaking up the common crate.Let's verify that all EffectType imports are consistently updated:
✅ Verification successful
🏁 Script executed:
#!/bin/bash # Description: Check for any remaining imports from common::typegraph::EffectType rg "use common::typegraph::EffectType"Length of output: 40
🏁 Script executed:
#!/bin/bash # Description: Re-verify that there are no residual references to "common::typegraph" anywhere in the repository rg "common::typegraph" .Length of output: 24
LGTM! Import path updated correctly.
- Confirmed that no references to
common::typegraph
remain in the repository.src/typegraph/core/src/runtimes/prisma/model.rs (2)
406-421
: LGTM! TryFrom implementation updated correctly.The TryFrom implementation has been correctly updated to use
tg_schema::Injection
instead ofcommon::typegraph::Injection
.
18-19
: LGTM! Import paths updated correctly.The changes to import paths from
common::typegraph
totg_schema
align with the PR's objective of breaking up the common crate.Let's verify that all imports from common::typegraph are consistently updated:
✅ Verification successful
🏁 Script executed:
#!/bin/bash # Description: Check for any remaining imports from common::typegraph rg "use common::typegraph::"Length of output: 30
Let's run a more thorough search across all Rust files using
fd
to ensure that there are no leftover references tocommon::typegraph
in the repository:
🏁 Script executed:
#!/bin/bash # Finding any references to common::typegraph in all Rust files fd --extension rs | xargs rg "common::typegraph::"Length of output: 50
LGTM! All imports from
common::typegraph
have been correctly updated totg_schema
.
- No remaining references to
common::typegraph
were found across the Rust files.- The update aligns with the PR's objective of breaking up the common crate.
src/typegraph/core/src/global_store.rs (2)
68-68
: LGTM! Auth type references updated consistently.All Auth-related type references and method signatures have been correctly updated to use
tg_schema::Auth
instead ofcommon::typegraph::Auth
.Let's verify that all Auth type references from common::typegraph are consistently updated:
Also applies to: 417-426
✅ Verification successful
🏁 Script executed:
#!/bin/bash # Description: Check for any remaining Auth references from common::typegraph rg "common::typegraph::Auth"Length of output: 28
I'll run another script to extract the surrounding lines (410–430) of the file to double-check that no outdated
common::typegraph::Auth
references remain in that area (which the comment also mentions). This will help manually verify that the changes in the specified blocks have been applied properly.
🏁 Script executed:
#!/bin/bash echo "Extracting lines 410-430 from src/typegraph/core/src/global_store.rs:" sed -n '410,430p' src/typegraph/core/src/global_store.rsLength of output: 761
Auth type reference update verified
The verification confirms that there are no remaining references tocommon::typegraph::Auth
, and all Auth-related type references and method signatures in the inspected file and range have been correctly updated to usetg_schema::Auth
.
21-21
: LGTM! Import path updated correctly.The change from
common::typegraph::runtimes::deno::PredefinedFunctionMatData
totg_schema::runtimes::deno::PredefinedFunctionMatData
aligns with the PR's objective.Let's verify that all imports from common::typegraph::runtimes are consistently updated:
✅ Verification successful
🏁 Script executed:
#!/bin/bash # Description: Check for any remaining imports from common::typegraph::runtimes rg "use common::typegraph::runtimes::"Length of output: 40
Let's re-run the search, covering all references related to
common::typegraph
, to ensure nothing was missed.
🏁 Script executed:
#!/bin/bash # Search for any remaining references to `common::typegraph::runtimes` echo "Searching for references to common::typegraph::runtimes:" rg "common::typegraph::runtimes" # Search for any remaining references to `common::typegraph::Auth` echo "Searching for references to common::typegraph::Auth:" rg "common::typegraph::Auth" # Search for any remaining references to `common::typegraph` echo "Searching for references to common::typegraph:" rg "common::typegraph"Length of output: 425
Import update verification successful.
Our searches show no remaining references to
common::typegraph
in the codebase, confirming that the update totg_schema::runtimes::deno::PredefinedFunctionMatData
is consistent.src/meta-cli/src/deploy/actors/task/deploy.rs (1)
25-25
: LGTM!The import statement has been correctly updated to use
typegate_api::Node
as part of the common crate refactoring.src/metagen/src/client_rs/mod.rs (1)
10-10
: LGTM!The import statement has been correctly updated to use
tg_schema::EffectType
as part of the common crate refactoring.src/typegraph/core/src/typegraph.rs (2)
26-30
: LGTM!The import statements have been correctly updated to use
tg_schema
as part of the common crate refactoring.
150-150
: LGTM!The return type has been correctly updated to use
tg_schema::Auth
as part of the common crate refactoring.src/typegraph/core/src/conversion/runtimes.rs (2)
22-38
: LGTM!The import statements have been correctly updated to use
tg_schema::runtimes
as part of the common crate refactoring.
66-66
: LGTM!The return type has been correctly updated to use
tg_schema::Materializer
as part of the common crate refactoring.src/typegate_api/Cargo.toml (2)
1-4
: Package Renaming Update.
The package name is now updated to"typegate_api"
(line 2), which aligns with the intended refactor. Please ensure that all import paths and references throughout the workspace are updated accordingly.
6-18
: Dependency Adjustments and Consistency Check.
The dependencies now include new modules such astg_schema
,anyhow
,itertools
,indoc
, andthiserror
. However, note thatcolored
andasync-trait
are still listed (lines 16–17). According to the overall refactor objective, these might be candidates for removal. Please verify whether their retention is intentional or if they should be removed to match the new modular structure.src/typegraph/core/Cargo.toml (1)
7-11
: Modular Dependency Restructuring.
The commented-outcommon.workspace
dependency (line 7) and the addition oftg_schema.workspace
,grpc_utils.workspace
, andarchive_utils.workspace
(lines 8, 10, and 11) properly reflect the shift to a more modular architecture. Ensure that any features previously provided by thecommon
module are now correctly implemented through these new dependencies.src/metagen/Cargo.toml (2)
13-13
: Addition oftg_schema
Dependency.
Addingtg_schema.workspace = true
(line 13) aligns with the transition away from the legacy common module.
45-46
: Replacing Legacy Dependency withtypegate_api
in Dev Dependencies.
The inclusion oftypegate_api.workspace = true
under[dev-dependencies]
(line 45) properly reflects the move fromcommon
totypegate_api
. Please double-check that all development and testing workflows consume the updated dependency.src/typegate/engine/Cargo.toml (1)
51-55
: Internal Dependency Updates for Modularity.
The new dependenciestg_schema.workspace
(line 51),grpc_utils.workspace
(line 53), andarchive_utils.workspace
(line 54) correctly replace functionality previously provided by the common module. Ensure that any internal calls or module references are updated to use these new crates.src/meta-cli/Cargo.toml (1)
34-40
: Internal Dependency Reorganization.
The dependency list now includestg_schema.workspace
(line 35),typegate_api.workspace
(line 37), andarchive_utils.workspace
(line 39) to replace the legacy common module. This change supports a more modular internal structure. Please confirm that all internal code references and tests are updated to use these new dependencies.Cargo.toml (9)
10-10
: New Workspace Member Added: "src/typegate_api"
This addition reflects the refactoring goal of isolating functionalities into dedicated crates. Ensure that any migration guides and related documentation are updated accordingly so that users know how to reference this new crate.
12-12
: New Workspace Member Added: "src/typegraph/schema"
Adding this workspace member supports the modularization effort by isolating the schema components. Make sure that any tests or integration points covering the schema functionality are appropriately updated.
14-14
: New Workspace Member Added: "src/utils/grpc"
This change successfully separates the GRPC utilities into their own member. Confirm that related code references and documentation are updated to mitigate potential confusion during migration.
15-15
: New Workspace Member Added: "src/utils/archive"
Introducing the archive utilities as a distinct workspace member enhances module clarity. Please verify that user migration instructions include the necessary details to adopt this change.
37-37
: Dependency Update:tg_schema
Mapping
The dependency declaration fortg_schema
now points to"src/typegraph/schema"
, which correctly corresponds to the new workspace member. Ensure that all internal references to schema functionality are updated accordingly.
38-38
: Review of Dependency:typegraph_core
Presence
The dependencytypegraph_core
is still present even though the AI summary mentioned that it should now be referenced viatypegate_engine
. Note that line 42 introducestypegate_engine
for"src/typegate/engine"
. Consider verifying whether both dependencies are required or iftypegraph_core
can be deprecated to reduce redundancy and avoid potential confusion.
43-43
: New Dependency Added:typegate_api
The addition oftypegate_api
with the path"src/typegate_api"
aligns with the overall refactoring objective. Confirm that all modules previously referencing the common crate update their imports to use this new dependency.
44-44
: New Dependency Added:grpc_utils
Addinggrpc_utils
to handle GRPC-related functionality is a positive step toward improved modularity. Ensure that the refactored code and tests appropriately reference this new crate.
45-45
: New Dependency Added:archive_utils
The introduction ofarchive_utils
as a dedicated dependency supports the modularization of archive functionalities. Please verify that accompanying unit or integration tests cover its usage and that documentation reflects the new structure.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #977 +/- ##
=======================================
Coverage 81.10% 81.10%
=======================================
Files 142 142
Lines 17969 17969
Branches 1961 1961
=======================================
Hits 14574 14574
Misses 3377 3377
Partials 18 18 ☔ View full report in Codecov by Sentry. |
Migration notes
Summary by CodeRabbit
New Features
Refactor
Chores
These changes maintain all existing functionality while providing a more cohesive architecture and clearer public interfaces for end-user interactions.