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

Refactor namespace logic out of default command logic #129

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

popematt
Copy link
Contributor

@popematt popematt commented Jul 2, 2024

Issue #, if available:

Follow up for #128.

Description of changes:

  • Changes the defaults of IonCliCommand's is_stable() to false and is_porcelain() to true.
  • Creates a new trait for namespaces so that they are stable and plumbing by default. Also has the benefit of extracting the namespace logic out of IonCliCommand.

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

@popematt popematt requested a review from jobarr-amzn July 2, 2024 22:51
@@ -16,11 +16,20 @@ impl IonCliCommand for FromJsonCommand {
}

fn is_stable(&self) -> bool {
false // TODO: Should this be true?
Copy link
Contributor

Choose a reason for hiding this comment

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

We've debated over whether or not there should be upconversion of e.g. timestamps before... but it seems like that's not something you'd want as the default behavior. Ideally it seems like you'd want the default to be a stable, lossless transformation.

I guess what I'm saying is that I don't see any reason this couldn't be stable.

@jobarr-amzn jobarr-amzn merged commit e7d900f into amazon-ion:master Jul 2, 2024
4 checks passed
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