Skip to content

Remove common/index.ts and vscode from common/logging#2531

Merged
koesie10 merged 1 commit intomainfrom
koesie10/remove-common-index
Jun 21, 2023
Merged

Remove common/index.ts and vscode from common/logging#2531
koesie10 merged 1 commit intomainfrom
koesie10/remove-common-index

Conversation

@koesie10
Copy link
Copy Markdown
Member

The logging part of common was exported in common/index.ts and could be imported by importing common. I don't think this makes a lot of sense, so I removed it.

The common/logging/index.ts also contained exports of the common/logging/vscode directory, which means that importing common/logging automatically brings in the vscode module. This removes that export, so now there are two separate imports needed for importing the common part and the vscode specific part. This should make it easier to keep them separate and be more explicit about what you're importing.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

The `logging` part of `common` was exported in `common/index.ts` and
could be imported by importing `common`. I don't think this makes a lot
of sense, so I removed it.

The `common/logging/index.ts` also contained exports of the
`common/logging/vscode` directory, which means that importing
`common/logging` automatically brings in the `vscode` module. This
removes that export, so now there are two separate imports needed for
importing the common part and the `vscode` specific part. This should
make it easier to keep them separate and be more explicit about what
you're importing.
@koesie10 koesie10 requested review from a team as code owners June 21, 2023 08:23
Copy link
Copy Markdown
Contributor

@robertbrignull robertbrignull left a comment

Choose a reason for hiding this comment

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

Oh wow, you used to be able to do import { extLogger, Logger, ProgressReporter } from "../common"; and get a VS Code logger by importing from /common 😮

Changes LGTM

@koesie10 koesie10 merged commit 7f9208f into main Jun 21, 2023
@koesie10 koesie10 deleted the koesie10/remove-common-index branch June 21, 2023 10:11
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.

2 participants