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

Remove unnecessary exports #2159

Merged
merged 13 commits into from
Jun 11, 2024
Merged

Remove unnecessary exports #2159

merged 13 commits into from
Jun 11, 2024

Conversation

awharn
Copy link
Member

@awharn awharn commented May 28, 2024

What It Does

Removes a set of exports that are not referenced outside of the related packages
Deprecates some functions/classes that are identical and appear twice in the codebase

This PR is presently in a draft state to get team opinions on additional things that can be removed. All of the items removed here did not appear outside of their respective packages. However, GitHub search only works against V2 LTS.

How to Test

Review Checklist
I certify that I have:

Additional Comments

Copy link

codecov bot commented May 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.18%. Comparing base (c12da19) to head (7ef1504).
Report is 2 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2159      +/-   ##
==========================================
- Coverage   91.22%   91.18%   -0.05%     
==========================================
  Files         629      628       -1     
  Lines       17912    17874      -38     
  Branches     3795     3692     -103     
==========================================
- Hits        16341    16299      -42     
- Misses       1570     1574       +4     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@t1m0thyj t1m0thyj left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @awharn!

@traeok traeok self-requested a review June 3, 2024 15:05
@JTonda JTonda requested a review from gejohnston June 3, 2024 15:05
@awharn awharn marked this pull request as ready for review June 3, 2024 15:06
Copy link
Member

@traeok traeok left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for cleaning up these exports and reviewing the deprecated functions 😋
I just have a couple questions about the comments that were added in this PR.

packages/imperative/src/cmd/index.ts Show resolved Hide resolved
Comment on lines +31 to 34
/**
* @deprecated
*/
export abstract class Operation<T> implements ITaskWithStatus {
Copy link
Member

Choose a reason for hiding this comment

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

Do we have a planned replacement for the Operation class going forward, or do we plan on removing it entirely? I'm not sure who is all using this as it is an abstract class, but we might want to elaborate on the long-term intentions in the deprecation message.

Copy link
Member Author

Choose a reason for hiding this comment

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

From what I saw, nobody ever used this at all.

Copy link
Member

Choose a reason for hiding this comment

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

That's fair - since its still being exported, do you think we should err on the side of caution and add something short such as "No replacement planned, will be removed in v4"? I don't think that many devs would use this class either, but I think it would be helpful to provide context in case a private repo or company plug-in is leveraging this class without our knowledge.

Copy link
Member Author

Choose a reason for hiding this comment

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

I was planning on having that in the changelog, unless you think it needs to be in the typedoc too.

Copy link
Member

@gejohnston gejohnston left a comment

Choose a reason for hiding this comment

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

These changes go a long way towards diffferentiating between those functions that we just happen to use and those functions that consumers are supposed to see.

I found one item which I do not think that we should hide from consumers. Check out my specific comment and see if you agree.

packages/imperative/src/rest/index.ts Outdated Show resolved Hide resolved
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
@awharn awharn requested a review from gejohnston June 4, 2024 15:10
Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

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

LGTM! 😋

packages/imperative/src/cmd/index.ts Show resolved Hide resolved
packages/zosfiles/src/index.ts Show resolved Hide resolved
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
…ports

Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Copy link
Contributor

@anaxceron anaxceron left a comment

Choose a reason for hiding this comment

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

Thanks @awharn -- made one comment

@@ -2,6 +2,11 @@

All notable changes to the Zowe core SDK package will be documented in this file.

## Recent Changes

- LTS Breaking: Modified the core SDK. [#2083](https://github.com/zowe/zowe-cli/issues/2083)
Copy link
Contributor

Choose a reason for hiding this comment

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

In call changelog references, can we say why we're modifying the core SDK? For performance, for tech currency?

Copy link
Member Author

Choose a reason for hiding this comment

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

The only modification made was to deprecate the IHeaderContent interface to remove duplication between the Core SDK and Imperative, which is captured on the next line. Would it be preferred to remove this line and only have the deprecation line?

Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
…ports

Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
…ports

Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Copy link

sonarcloud bot commented Jun 11, 2024

@zFernand0 zFernand0 merged commit 9906413 into next Jun 11, 2024
46 checks passed
@zFernand0 zFernand0 deleted the remove-unnecessary-exports branch June 11, 2024 19:26
Copy link

Release succeeded for the next branch. 🎉

The following packages have been published:

  • npm: @zowe/secrets-for-zowe-sdk@8.0.0-next.202406111958
  • npm: @zowe/imperative@8.0.0-next.202406111958
  • npm: @zowe/cli-test-utils@8.0.0-next.202406111958
  • npm: @zowe/core-for-zowe-sdk@8.0.0-next.202406111958
  • npm: @zowe/zos-uss-for-zowe-sdk@8.0.0-next.202406111958
  • npm: @zowe/provisioning-for-zowe-sdk@8.0.0-next.202406111958
  • npm: @zowe/zos-console-for-zowe-sdk@8.0.0-next.202406111958
  • npm: @zowe/zos-files-for-zowe-sdk@8.0.0-next.202406111958
  • npm: @zowe/zos-logs-for-zowe-sdk@8.0.0-next.202406111958
  • npm: @zowe/zosmf-for-zowe-sdk@8.0.0-next.202406111958
  • npm: @zowe/zos-workflows-for-zowe-sdk@8.0.0-next.202406111958
  • npm: @zowe/zos-jobs-for-zowe-sdk@8.0.0-next.202406111958
  • npm: @zowe/zos-tso-for-zowe-sdk@8.0.0-next.202406111958
  • npm: @zowe/cli@8.0.0-next.202406111958

Powered by Octorelease 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants