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: cleanup public symbols and rename transform package #971

Merged
merged 9 commits into from
Oct 5, 2023

Conversation

aajtodd
Copy link
Contributor

@aajtodd aajtodd commented Oct 4, 2023

Issue #

n/a

Description of changes

Miscellaneous cleanup

  • refactor: Render serialization/deserialization types into serde rather than transform package. This better matches our own terminology and was leftover from "do what Java does".
  • refactor: Relocate TlsVersion into the net subpackage rather than config
  • refactor: Make StringContent and ByteArrayContent internal and force consumers to go through the companion objects for the given types. e.g. ByteStream.fromBytes(...) rather than ByteArrayContent(...). Same for HttpBody.fromBytes(...).

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicate changelog

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm wonder how that happened 🤔 , good catch.

{
"id": "2652a0e3-6588-4542-a35d-eafd5adf8c77",
"type": "misc",
"description": "Refactor codegen to place serialization and serialization into the `serde` package rather than the `transform` package. Relocate `TlsVersion` to the `net` package. Make `ByteArrayContent` and friends `internal` and force consumers to go through companion object convenience functions."
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd vote for splitting these unrelated changes out into separate changelog entries

if (TopDownIndex(ctx.model).getContainedOperations(ctx.service).isNotEmpty()) {
writer.addImport("${ctx.settings.pkg.name}.transform", "*")
writer.addImport(ctx.settings.pkg.serde, "*")
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this still reference the package name somewhere? I was thinking it would be ${ctx.settings.pkg.name}.serde

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ctx.settings.pkg.serde effectively resolves to ${ctx.settings.pkg.name}.serde

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 5, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
3.1% 3.1% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@aajtodd aajtodd merged commit e7bb219 into main Oct 5, 2023
@aajtodd aajtodd deleted the misc-cleanup branch October 5, 2023 19:34
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.

3 participants