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

fix(ertp): remove unneeded ertp type imports #10467

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

erights
Copy link
Member

@erights erights commented Nov 13, 2024

closes: #XXXX
refs: #XXXX

Description

For some reason, vscode does successfully highlight unused jsdoc type imports

image

but yarn lint does not

image

This PR started as a drive-by extracted from #10456 , where I noticed that ERTP in particular had some of these. Since #10456 experiments with a variation on ERTP, simplifying it first in harmless ways helps a bit.

Security Considerations

fewer distractions helps

Scaling Considerations

none

Documentation Considerations

none

Testing Considerations

none

Upgrade Considerations

In the agoric-sdk repo there are no remaining type imports of the legacy type reexport of Baggage from ertp. But if there are such imports in other repos, they will need to be fixed. But this is a static-only issue, not a runtime issue, so it's fine for those repos to be fixed only once they depend on the new @agoric/ertp without that legacy reexport.

@erights erights self-assigned this Nov 13, 2024
Copy link

cloudflare-workers-and-pages bot commented Nov 13, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: fe06d31
Status: ✅  Deploy successful!
Preview URL: https://d1490a6a.agoric-sdk.pages.dev
Branch Preview URL: https://markm-remove-unneeded-ertp-t.agoric-sdk.pages.dev

View logs

* Importing Baggage from `@agoric/ertp` is deprecated. Import Baggage from
* `@agoric/vat-data` instead
*
* @import {Baggage} from '@agoric/vat-data'
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 questionable one. See the discussion under "Upgrade Considerations" in the PR comment.

@erights erights marked this pull request as ready for review November 13, 2024 20:16
@erights erights requested a review from a team as a code owner November 13, 2024 20:16
Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

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

What's the harm in leaving around extra type imports?

@erights
Copy link
Member Author

erights commented Nov 13, 2024

What's the harm in leaving around extra type imports?

Distraction. Makes it a bit harder to find the type imports that are actually used. Also, makes it a bit harder to search for "who meaningfully imports this type?".

Same rationale for avoiding unused imports and other dead notation in general, though clearly of weaker magnitude for type imports.

@erights erights added the automerge:squash Automatically squash merge label Nov 13, 2024
@mergify mergify bot merged commit e96ff82 into master Nov 14, 2024
81 checks passed
@mergify mergify bot deleted the markm-remove-unneeded-ertp-type-imports branch November 14, 2024 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:squash Automatically squash merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants