Skip to content

Add --mode arbitrary|project to smithy diff#1721

Merged
mtdowling merged 1 commit intomainfrom
diff-project-mode
Apr 6, 2023
Merged

Add --mode arbitrary|project to smithy diff#1721
mtdowling merged 1 commit intomainfrom
diff-project-mode

Conversation

@mtdowling
Copy link
Copy Markdown
Member

This commit adds a --mode option to Smithy diff to support the arbitrary mode (the current mode used to compare two models), and the project mode used to compare the current project against another project or model. When running in project mode, the imports and sources of the current model are used to load the "new" model (the current project), but they aren't used to load the "old" model. If the --old argument points to a directory that contains a smithy-build.json file, its imports and sources are used when loading the old model, though its dependencies are ignored and it's loaded using the resolved classpath of the new model. This ensures that the models are comparable and won't cause comparison issues when trying to compare things like traits across class loaders.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mtdowling mtdowling requested a review from a team as a code owner April 5, 2023 05:09
@mtdowling mtdowling changed the base branch from correct-smithy-diff to main April 6, 2023 17:32
This commit adds a --mode option to Smithy diff to support the
arbitrary mode (the current mode used to compare two models), and
the project mode used to compare the current project against another
project or model. When running in project mode, the imports and
sources of the current model are used to load the "new" model
(the current project), but they aren't used to load the "old" model.
If the --old argument points to a directory that contains a
smithy-build.json file, its imports and sources are used when loading
the old model, though its dependencies are ignored and it's loaded
using the resolved classpath of the new model. This ensures that the
models are comparable and won't cause comparison issues when trying
to compare things like traits across class loaders.
@mtdowling mtdowling force-pushed the diff-project-mode branch from 9154017 to 98d5ff1 Compare April 6, 2023 17:34
@mtdowling mtdowling merged commit 9b16244 into main Apr 6, 2023
@mtdowling mtdowling deleted the diff-project-mode branch April 7, 2023 03:29
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.

2 participants