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

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

Merged
merged 1 commit into from
Apr 6, 2023
Merged

Conversation

mtdowling
Copy link
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